ByteBuffer was taken as base for Grizzly Buffer interface, but Buffer has several
extensions: it's possible to prepend some data to a Buffer and release Buffer, when it's not required any more.
| Modifier and Type | Method and Description |
|---|---|
| public boolean | |
| public void | |
| public byte[] | Returns: The array that backs this bufferReturns the byte array that backs this buffer (optional operation). |
| public int | Returns: The offset within this buffer's array of the first element of the bufferReturns the offset within this buffer's backing array of the first element of the buffer (optional operation). |
| public Buffer | Returns: The new, read-onlyBufferCreates a new, read-only |
| public int | |
| public Buffer | |
| public Buffer | |
| public void | |
| public void | dumpHex(final Appendable
the appendable)Appendable to dump this Buffer's content to.Generate a hex dump of this |
| public Buffer | |
| public Buffer | |
| public byte | |
| public byte | Returns: The byte at the given indexThe index from which the byte will be read index)Absolute get method. |
| public Buffer | |
| public Buffer | Returns: This bufferThe array into which bytes are to be written dst, int The offset within the array of the first byte to be written; must be non-negative and no larger than
dst.length offset, int The maximum number of bytes to be written to the given array; must be non-negative and no larger than
dst.length - offset length)Relative bulk get method. |
| public Buffer | Returns: This bufferdestination dst)ByteBuffer to put the data intoRelative bulk get method. |
| public Buffer | Returns: This bufferThe dst, int ByteBuffer into which bytes are to be writtenThe offset within the offset, int ByteBuffer of the first byte to be written; must be non-negative and no
larger than dst.remaining()The maximum number of bytes to be written to the given array; must be non-negative and no larger than
dst.remaining() - offset length)Relative bulk get method. |
| public char | Returns: The char value at the buffer's current positionRelative get method for reading a char value. |
| public char | Returns: The char value at the given indexThe index from which the bytes will be read index)Absolute get method for reading a char value. |
| public double | Returns: The double value at the buffer's current positionRelative get method for reading a double value. |
| public double | Returns: The double value at the given indexThe index from which the bytes will be read index)Absolute get method for reading a double value. |
| public float | Returns: The float value at the buffer's current positionRelative get method for reading a float value. |
| public float | Returns: The float value at the given indexThe index from which the bytes will be read index)Absolute get method for reading a float value. |
| public int | Returns: The int value at the buffer's current positionRelative get method for reading an int value. |
| public int | Returns: The int value at the given indexThe index from which the bytes will be read index)Absolute get method for reading an int value. |
| public long | Returns: The long value at the buffer's current positionRelative get method for reading a long value. |
| public long | Returns: The long value at the given indexThe index from which the bytes will be read index)Absolute get method for reading a long value. |
| public short | Returns: The short value at the buffer's current positionRelative get method for reading a short value. |
| public short | Returns: The short value at the given indexThe index from which the bytes will be read index)Absolute get method for reading a short value. |
| public boolean | Returns: true if, and only if, this buffer is backed by an array and is not read-onlyTells whether or not this buffer is backed by an accessible byte array. |
| public boolean | Returns: true if, and only if, there is at least one element remaining in this bufferRedeclares org. Tells whether there are any elements between the current position and the limit. |
| public boolean | |
| public boolean | |
| public boolean | Returns: true if, and only if, this buffer is read-onlyTells whether or not this buffer is read-only. |
| public int | |
| public Buffer | Returns: This bufferThe new limit value; must be non-negative and no larger than this buffer's capacity newLimit)Sets this buffer's limit. |
| public Buffer | |
| public ByteOrder | |
| public Buffer | Returns: This bufferThe new byte order, either bo)BIG_ENDIAN or LITTLE_ENDIANModifies this buffer's byte order. |
| public int | |
| public Buffer | Returns: This bufferThe new position value; must be non-negative and no larger than the current limit newPosition)Sets this buffer's position. |
| public Buffer | |
| public Buffer | |
| public Buffer | Returns: This bufferThe index at which the byte will be written index, byte The byte value to be written b)Absolute put method (optional operation). |
| public Buffer | |
| public Buffer | |
| public Buffer | Returns: This bufferThe source buffer from which bytes are to be read; must not be this buffer src)Relative bulk put method (optional operation). |
| public Buffer | Returns: This bufferThe source buffer from which bytes are to be read; must not be this buffer src, int starting position in the source buffer position, int number of bytes to be copied length)Relative bulk put method (optional operation). |
| public Buffer | Returns: This buffersource of bytes to put into the Buffer src)Relative bulk put method (optional operation). |
| public Buffer | Returns: This bufferThe array from which bytes are to be read src, int The offset within the array of the first byte to be read; must be non-negative and no larger than
array.length offset, int The number of bytes to be read from the given array; must be non-negative and no larger than
array.length - offset length)Relative bulk put method (optional operation). |
| public Buffer | Returns: This bufferThe s)String from which bytes are to be readRelative bulk put method (optional operation). |
| public Buffer | Returns: This bufferThe char value to be written value)Relative put method for writing a char value (optional operation). |
| public Buffer | Returns: This bufferThe index at which the bytes will be written index, char The char value to be written value)Absolute put method for writing a char value (optional operation). |
| public Buffer | Returns: This bufferThe double value to be written value)Relative put method for writing a double value (optional operation). |
| public Buffer | Returns: This bufferThe index at which the bytes will be written index, double The double value to be written value)Absolute put method for writing a double value (optional operation). |
| public Buffer | Returns: This bufferThe float value to be written value)Relative put method for writing a float value (optional operation). |
| public Buffer | Returns: This bufferThe index at which the bytes will be written index, float The float value to be written value)Absolute put method for writing a float value (optional operation). |
| public Buffer | Returns: This bufferThe int value to be written value)Relative put method for writing an int value (optional operation). |
| public Buffer | Returns: This bufferThe index at which the bytes will be written index, int The int value to be written value)Absolute put method for writing an int value (optional operation). |
| public Buffer | Returns: This bufferThe long value to be written value)Relative put method for writing a long value (optional operation). |
| public Buffer | Returns: This bufferThe index at which the bytes will be written index, long The long value to be written value)Absolute put method for writing a long value (optional operation). |
| public Buffer | Returns: This bufferThe short value to be written value)Relative put method for writing a short value (optional operation). |
| public Buffer | Returns: This bufferThe index at which the bytes will be written index, short The short value to be written value)Absolute put method for writing a short value (optional operation). |
| public int | Returns: The number of elements remaining in this bufferRedeclares org. Returns the number of elements between the current position and the limit. |
| public Buffer | |
| public Buffer | |
| public void | |
| public Buffer | Returns: The newBufferCreates a new |
| public Buffer | Returns: The newBufferthe position of the start of the slice position, int the limit to take the slice up to limit)Creates a new |
| public Buffer | Returns: the Buffer, which represents split part [splitPosition, capacity)position of split. splitPosition)Split up the buffer into two parts: [0..splitPosition) and [splitPosition, capacity). |
| public BufferArray | Returns: Returns a newBufferArray instance with this Buffer added as an element to the
BufferArray.
Returns a new |
| public BufferArray | toBufferArray(BufferArray
the base array to append to array)
Returns the specified |
| public BufferArray | toBufferArray(int
the new position for this position, int Bufferthe new limit for this limit)Buffer
Updates this |
| public BufferArray | toBufferArray(BufferArray
the array, int BufferArray to prepend tothe new position for this position, int Bufferthe new limit for this limit)Buffer
Updates this |
| public ByteBuffer | |
| public ByteBuffer | toByteBuffer(int
the position for the starting subsequence for the returned position, int ByteBuffer.the limit for the ending of the subsequence of the returned limit)ByteBuffer.
Converts this |
| public ByteBufferArray | Returns: Converts thisBuffer to a ByteBuffer per toByteBuffer() and returns a
ByteBufferArray containing the converted ByteBuffer.
Converts this |
| public ByteBufferArray | Returns: returns the providedByteBufferArray with the converted ByteBuffer added to provided
array.this buffer as a array)ByteBufferArray
Converts this |
| public ByteBufferArray | Returns: Converts thisBuffer to a ByteBuffer per toByteBuffer(int, int) and returns a
ByteBufferArray containing the converted ByteBuffer.the start position within the source position, int bufferthe limit, or number, of bytes to include in the resulting limit)ByteBuffer
Converts this |
| public ByteBufferArray | Returns: returns the providedByteBufferArray with the converted ByteBuffer added to provided
array.the array, int ByteBufferArray to append this tothe start position within the source position, int bufferthe limit, or number, of bytes to include in the resulting limit)ByteBuffer
Converts this |
| public String | |
| public String | |
| public String | toStringContent(Charset charset, int
the first byte offset in the Buffer (inclusive) position, int the last byte offset in the Buffer (exclusive) limit) |
| public void | |
| public boolean | |
| public Object |