|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.xsocket.ByteBufferQueue
public final class ByteBufferQueue
A ByteBuffer queue for framework-internal usage
Constructor Summary | |
---|---|
ByteBufferQueue()
|
Method Summary | |
---|---|
void |
addFirst(java.nio.ByteBuffer buffer)
add a byte buffer at the first position |
void |
addFirst(java.util.LinkedList<java.nio.ByteBuffer> bufs)
add a list of byte buffer to the first position. |
void |
addFirstSilence(java.util.LinkedList<java.nio.ByteBuffer> bufs)
add a list of byte buffer to the first position. |
void |
append(java.nio.ByteBuffer data)
append a byte buffer to this queue. |
void |
append(java.util.LinkedList<java.nio.ByteBuffer> bufs)
append a list of byte buffer to this queue. |
java.util.LinkedList<java.nio.ByteBuffer> |
drain()
drain the queue |
int |
getFirstBufferSize()
get the size of the first ByteBuffer in queue |
int |
getInsertVersionVersion()
return a int, which represent the insert version. |
int |
getSize()
return the current size |
boolean |
isEmpty()
returns true, if empty |
java.nio.ByteBuffer |
read(int length)
read bytes |
java.nio.ByteBuffer |
removeFirst()
remove the first ByteBuffer |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ByteBufferQueue()
Method Detail |
---|
public boolean isEmpty()
public int getSize()
public int getFirstBufferSize()
public void append(java.nio.ByteBuffer data)
data
- the ByteBuffer to appendpublic void append(java.util.LinkedList<java.nio.ByteBuffer> bufs)
bufs
- the list of ByteBufferpublic void addFirst(java.nio.ByteBuffer buffer)
buffer
- the ByteBuffer to addpublic void addFirst(java.util.LinkedList<java.nio.ByteBuffer> bufs)
bufs
- the list of ByteBuffer to addpublic void addFirstSilence(java.util.LinkedList<java.nio.ByteBuffer> bufs)
bufs
- the list of ByteBuffer to addpublic java.util.LinkedList<java.nio.ByteBuffer> drain()
public java.nio.ByteBuffer removeFirst()
public int getInsertVersionVersion()
public java.nio.ByteBuffer read(int length) throws java.nio.BufferUnderflowException
length
- the length
java.nio.BufferUnderflowException
- if the buffer`s limit has been reachedpublic java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |