A Adaptive allocate and release memory RecyclablePageBuffer. This type of Buffer
Attributes
- Companion
- object
- Graph
-
- Supertypes
Members list
Value members
Abstract methods
Inherited methods
Get the number of readableBytes, until the given needle is found in this buffer. The found offset will be the offset into this buffer, relative to from, of the first byte of a sequence that matches all readable bytes in the given needle buffer. If the needle is not found, -1 is returned.
Get the number of readableBytes, until the given needle is found in this buffer. The found offset will be the offset into this buffer, relative to from, of the first byte of a sequence that matches all readable bytes in the given needle buffer. If the needle is not found, -1 is returned.
This method does not modify the readerOffset or the writerOffset.
Value parameters
- from
-
start index to search
- ignoreCase
-
ignore case
- needle
-
The byte seq value to search for.
- to
-
end index to search
Attributes
- Inherited from:
- Buffer
Get the number of readableBytes, until the given needle is found in this buffer. The found offset will be the offset into this buffer, relative to its readerOffset, of the first byte of a sequence that matches all readable bytes in the given needle buffer. If the needle is not found, -1 is returned.
Get the number of readableBytes, until the given needle is found in this buffer. The found offset will be the offset into this buffer, relative to its readerOffset, of the first byte of a sequence that matches all readable bytes in the given needle buffer. If the needle is not found, -1 is returned.
This method does not modify the readerOffset or the writerOffset.
Value parameters
- needle
-
The buffer value to search for.
Attributes
- Returns
-
The offset, relative to the current readerOffset, of the found value, or -1 if none was found.
- Inherited from:
- Buffer
Get the number of readableBytes, until the given needle1,needle2,needle3,needle4 bytes is found in this buffer. If the needle is not found, -1 is returned.
Get the number of readableBytes, until the given needle1,needle2,needle3,needle4 bytes is found in this buffer. If the needle is not found, -1 is returned.
This method does not modify the readerOffset or the writerOffset.
Value parameters
- needle1
-
The first byte value to search for.
- needle2
-
The second byte value to search for.
- needle3
-
The third byte value to search for.
- needle4
-
The fourth byte value to search for.
Attributes
- Returns
-
The offset, relative to the current readerOffset, of the found value, or -1 if none was found.
- Inherited from:
- Buffer
Get the number of readableBytes, until the given needle1,needle2,needle3 bytes is found in this buffer. If the needle is not found, -1 is returned.
Get the number of readableBytes, until the given needle1,needle2,needle3 bytes is found in this buffer. If the needle is not found, -1 is returned.
This method does not modify the readerOffset or the writerOffset.
Value parameters
- needle1
-
The first byte value to search for.
- needle2
-
The second byte value to search for.
- needle3
-
The third byte value to search for.
Attributes
- Returns
-
The offset, relative to the current readerOffset, of the found value, or -1 if none was found.
- Inherited from:
- Buffer
Get the number of readableBytes, until the given needle1,needle2 bytes is found in this buffer. If the needle is not found, -1 is returned.
Get the number of readableBytes, until the given needle1,needle2 bytes is found in this buffer. If the needle is not found, -1 is returned.
This method does not modify the readerOffset or the writerOffset.
Value parameters
- needle1
-
The first byte value to search for.
- needle2
-
The second byte value to search for.
Attributes
- Returns
-
The offset, relative to the current readerOffset, of the found value, or -1 if none was found.
- Inherited from:
- Buffer
Get the number of readableBytes, until the given needle is found in this buffer. If the needle is not found, -1 is returned.
Get the number of readableBytes, until the given needle is found in this buffer. If the needle is not found, -1 is returned.
This method does not modify the readerOffset or the writerOffset.
Value parameters
- needle
-
The byte value to search for.
Attributes
- Returns
-
The offset, relative to the current readerOffset, of the found value, or -1 if none was found.
- Inherited from:
- Buffer
Get the number of readableBytes, until any the given byte in set is found in this buffer. If the byte is not found, -1 is returned.
Get the number of readableBytes, until any the given byte in set is found in this buffer. If the byte is not found, -1 is returned.
This method does not modify the readerOffset or the writerOffset.
Value parameters
- set
-
any the given byte in set
Attributes
- Inherited from:
- Buffer
Get the number of readableBytes, until any the given byte which is between lower and upper is found in this buffer. If the byte is not found, -1 is returned.
Get the number of readableBytes, until any the given byte which is between lower and upper is found in this buffer. If the byte is not found, -1 is returned.
This method does not modify the readerOffset or the writerOffset.
Value parameters
- lower
-
lower bound byte
- upper
-
upper bound byte
Attributes
- Inherited from:
- Buffer
The capacity of this buffer, that is, the maximum number of bytes it can contain.
The capacity of this buffer, that is, the maximum number of bytes it can contain.
Attributes
- Returns
-
The capacity in bytes.
- Inherited from:
- Buffer
Clears this Buffer. The readerOffset and writerOffset are set to zero.
Clears this Buffer. The readerOffset and writerOffset are set to zero.
Attributes
- Returns
-
This buffer
- Inherited from:
- Buffer
Discards the read bytes, and moves the buffer contents to the beginning of the buffer.
Discards the read bytes, and moves the buffer contents to the beginning of the buffer.
Attributes
- Returns
-
This buffer instance.
- Throws
-
IllegalStateException
if this buffer is in a bad state.
- Inherited from:
- Buffer
Copies the given length of data from this buffer into the given destination buffer, beginning at the given source position in this buffer, and the given destination position in the destination buffer.
Copies the given length of data from this buffer into the given destination buffer, beginning at the given source position in this buffer, and the given destination position in the destination buffer.
This method does not read or modify the writerOffset or the readerOffset on this buffer, nor on the destination buffer.
The read and write offsets of the destination buffer are also ignored, and do not influence destPos or length.
Value parameters
- dest
-
The destination buffer.
- destPos
-
The index into the dest buffer from where the copying should start.
- length
-
The number of bytes to copy.
- srcPos
-
The byte offset into this buffer from where the copying should start; the byte at this offset in this buffer will be copied to the destPos index in the dest buffer.
Attributes
- Throws
-
BufferClosedException
if this or the destination buffer is closed.
BufferReadOnlyExceptionif the destination buffer is read-only.
IndexOutOfBoundsExceptionif the source or destination positions, or the length, are negative, or if the resulting end positions reaches beyond the end of either this buffer, or the destination buffer.
NullPointerExceptionif the destination buffer is null.
- Inherited from:
- Buffer
Copies the given length of data from this buffer into the given destination byte buffer, beginning at the given source position in this buffer, and the given destination position in the destination byte buffer.
Copies the given length of data from this buffer into the given destination byte buffer, beginning at the given source position in this buffer, and the given destination position in the destination byte buffer.
This method does not read or modify the writerOffset or the readerOffset, nor is the position of the destination buffer changed.
The position and limit of the destination byte buffer are also ignored, and do not influence destPos or length.
Value parameters
- dest
-
The destination byte buffer.
- destPos
-
The index into the dest ByteBuffer from where the copying should start.
- length
-
The number of bytes to copy.
- srcPos
-
The byte offset into this buffer from where the copying should start; the byte at this offset in this buffer will be copied to the destPos index in the dest ByteBuffer.
Attributes
- Throws
-
BufferClosedException
if this buffer is closed.
IndexOutOfBoundsExceptionif the source or destination positions, or the length, are negative, or if the resulting end positions reach beyond the end of either this buffer or the destination ByteBuffer.
NullPointerExceptionif the destination buffer is null.
java.nio.ReadOnlyBufferExceptionif the destination byte buffer is read-only.
- Inherited from:
- Buffer
Copies the given length of data from this buffer into the given destination array, beginning at the given source position in this buffer, and the given destination position in the destination array.
Copies the given length of data from this buffer into the given destination array, beginning at the given source position in this buffer, and the given destination position in the destination array.
This method does not read or modify the writerOffset or the readerOffset.
Value parameters
- dest
-
The destination byte array.
- destPos
-
The index into the dest array from where the copying should start.
- length
-
The number of bytes to copy.
- srcPos
-
The byte offset into this buffer from where the copying should start; the byte at this offset in this buffer will be copied to the destPos index in the dest array.
Attributes
- Throws
-
BufferClosedException
if this buffer is closed.
IndexOutOfBoundsExceptionif the source or destination positions, or the length, are negative, or if the resulting end positions reaches beyond the end of either this buffer, or the destination array.
- Inherited from:
- Buffer
Ensures that this buffer has at least the given number of bytes of writableBytes available space for writing. If this buffer already has the necessary space, then this method returns immediately. If this buffer does not already have the necessary space, then it will be expanded using the BufferAllocator the buffer was created with. This method is the same as calling ensureWritable where allowCompaction is true.
Ensures that this buffer has at least the given number of bytes of writableBytes available space for writing. If this buffer already has the necessary space, then this method returns immediately. If this buffer does not already have the necessary space, then it will be expanded using the BufferAllocator the buffer was created with. This method is the same as calling ensureWritable where allowCompaction is true.
Value parameters
- size
-
The requested number of bytes of space that should be available for writing.
Attributes
- Returns
-
This buffer instance.
- Throws
-
BufferClosedException
if this buffer is closed.
IllegalStateExceptionif this buffer is in a bad state.
- Inherited from:
- Buffer
Ensures that this buffer has at least the given number of bytes of writableBytes. If this buffer already has the necessary space, then this method returns immediately. If this buffer does not already have the necessary space, then space will be made available in one or all of the following available ways:
Ensures that this buffer has at least the given number of bytes of writableBytes. If this buffer already has the necessary space, then this method returns immediately. If this buffer does not already have the necessary space, then space will be made available in one or all of the following available ways:
- If allowCompaction is true, and sum of the read and writable bytes would be enough to satisfy the request, and it (depending on the buffer implementation) seems faster and easier to compact the existing buffer rather than allocation a new buffer, then the requested bytes will be made available that way. The compaction will not necessarily work the same way as the compact method, as the implementation may be able to make the requested bytes available with less effort than is strictly mandated by the compact method.
Regardless of the value of the allowCompaction, the implementation may make more space available by just allocating more or larger buffers. This allocation would use the same BufferAllocator that this buffer was created with.
- If allowCompaction is true, then the implementation may choose to do a combination of compaction and allocation.
Value parameters
- allowCompaction
-
true if the method is allowed to modify the readerOffset and writerOffset, otherwise false.
- minimumGrowth
-
The minimum number of bytes to grow by. If it is determined that memory should be allocated and copied, make sure that the new memory allocation is bigger than the old one by at least this many bytes. This way, the buffer can grow by more than what is immediately necessary, thus amortising the costs of allocating and copying.
- size
-
The requested number of bytes of space that should be available for writing.
Attributes
- Returns
-
This buffer instance.
- Throws
-
IllegalArgumentException
if size or minimumGrowth are negative.
IllegalStateExceptionif this buffer is in a bad state.
- Inherited from:
- Buffer
Fills the buffer with the given byte value. This method does not respect the readerOffset or writerOffset, but copies the full capacity of the buffer. The readerOffset and writerOffset are not modified.
Fills the buffer with the given byte value. This method does not respect the readerOffset or writerOffset, but copies the full capacity of the buffer. The readerOffset and writerOffset are not modified.
Value parameters
- value
-
The byte value to write at every offset in the buffer.
Attributes
- Returns
-
This Buffer.
- Inherited from:
- Buffer
Get the boolean value at the given reader offset. The readerOffset is not modified. A boolean gets read as a byte from this buffer. All byte values which are not equal to zero are considered as the boolean value true, zero represents false.
Get the boolean value at the given reader offset. The readerOffset is not modified. A boolean gets read as a byte from this buffer. All byte values which are not equal to zero are considered as the boolean value true, zero represents false.
Value parameters
- index
-
The read offset, an absolute offset into this buffer, to read from.
Attributes
Get the byte value at the given reader offset. The readerOffset is not modified. The value is read using a two's complement 8-bit encoding, in java.nio.ByteOrder.BIG_ENDIAN byte order.
Get the byte value at the given reader offset. The readerOffset is not modified. The value is read using a two's complement 8-bit encoding, in java.nio.ByteOrder.BIG_ENDIAN byte order.
Value parameters
- idx
-
The read offset, an absolute offset into this buffer, to read from.
Attributes
Get the bytes value at the given reader offset. The readerOffset is not modified.
Get the bytes value at the given reader offset. The readerOffset is not modified.
Value parameters
- index
-
The read offset, an absolute offset into this buffer, to read from.
- len
-
Length of bytes to read
Attributes
Get the char value at the given reader offset. The readerOffset is not modified. The value is read using a 2-byte UTF-16 encoding, in java.nio.ByteOrder.BIG_ENDIAN byte order.
Get the char value at the given reader offset. The readerOffset is not modified. The value is read using a 2-byte UTF-16 encoding, in java.nio.ByteOrder.BIG_ENDIAN byte order.
Value parameters
- index
-
The read offset, an absolute offset into this buffer, to read from.
Attributes
Get the char value at the given reader offset. The readerOffset is not modified. The value is read using a 2-byte UTF-16 encoding, in java.nio.ByteOrder.LITTLE_ENDIAN byte order.
Get the char value at the given reader offset. The readerOffset is not modified. The value is read using a 2-byte UTF-16 encoding, in java.nio.ByteOrder.LITTLE_ENDIAN byte order.
Value parameters
- index
-
The read offset, an absolute offset into this buffer, to read from.
Attributes
Get a CharSequence at the given reader offset. The readerOffset is not modified.
Get a CharSequence at the given reader offset. The readerOffset is not modified.
Value parameters
- charset
-
Charset to use for reading.
- index
-
The read offset, an absolute offset into this buffer, to read from.
- len
-
Length of bytes to read
Attributes
Get the double value at the given reader offset. The readerOffset is not modified. The value is read using a 64-bit IEEE floating point encoding, in java.nio.ByteOrder.BIG_ENDIAN byte order.
Get the double value at the given reader offset. The readerOffset is not modified. The value is read using a 64-bit IEEE floating point encoding, in java.nio.ByteOrder.BIG_ENDIAN byte order.
Value parameters
- index
-
The read offset, an absolute offset into this buffer, to read from.
Attributes
Get the double value at the given reader offset. The readerOffset is not modified. The value is read using a 64-bit IEEE floating point encoding, in java.nio.ByteOrder.LITTLE_ENDIAN byte order.
Get the double value at the given reader offset. The readerOffset is not modified. The value is read using a 64-bit IEEE floating point encoding, in java.nio.ByteOrder.LITTLE_ENDIAN byte order.
Value parameters
- index
-
The read offset, an absolute offset into this buffer, to read from.
Attributes
Get the float value at the given reader offset. The readerOffset is not modified. The value is read using a 32-bit IEEE floating point encoding, in java.nio.ByteOrder.BIG_ENDIAN byte order.
Get the float value at the given reader offset. The readerOffset is not modified. The value is read using a 32-bit IEEE floating point encoding, in java.nio.ByteOrder.BIG_ENDIAN byte order.
Value parameters
- index
-
The read offset, an absolute offset into this buffer, to read from.
Attributes
Get the float value at the given reader offset. The readerOffset is not modified. The value is read using a 32-bit IEEE floating point encoding, in java.nio.ByteOrder.LITTLE_ENDIAN byte order.
Get the float value at the given reader offset. The readerOffset is not modified. The value is read using a 32-bit IEEE floating point encoding, in java.nio.ByteOrder.LITTLE_ENDIAN byte order.
Value parameters
- index
-
The read offset, an absolute offset into this buffer, to read from.
Attributes
Get the int value at the given reader offset. The readerOffset is not modified. The value is read using a two's complement 32-bit encoding, in java.nio.ByteOrder.BIG_ENDIAN byte order.
Get the int value at the given reader offset. The readerOffset is not modified. The value is read using a two's complement 32-bit encoding, in java.nio.ByteOrder.BIG_ENDIAN byte order.
Value parameters
- index
-
The read offset, an absolute offset into this buffer, to read from.
Attributes
Get the int value at the given reader offset. The readerOffset is not modified. The value is read using a two's complement 32-bit encoding, in java.nio.ByteOrder.LITTLE_ENDIAN byte order.
Get the int value at the given reader offset. The readerOffset is not modified. The value is read using a two's complement 32-bit encoding, in java.nio.ByteOrder.LITTLE_ENDIAN byte order.
Value parameters
- index
-
The read offset, an absolute offset into this buffer, to read from.
Attributes
Get the long value at the given reader offset. The readerOffset is not modified. The value is read using a two's complement 64-bit encoding, in java.nio.ByteOrder.BIG_ENDIAN byte order.
Get the long value at the given reader offset. The readerOffset is not modified. The value is read using a two's complement 64-bit encoding, in java.nio.ByteOrder.BIG_ENDIAN byte order.
Value parameters
- index
-
The read offset, an absolute offset into this buffer, to read from.
Attributes
Get the long value at the given reader offset. The readerOffset is not modified. The value is read using a two's complement 64-bit encoding, in java.nio.ByteOrder.LITTLE_ENDIAN byte order.
Get the long value at the given reader offset. The readerOffset is not modified. The value is read using a two's complement 64-bit encoding, in java.nio.ByteOrder.LITTLE_ENDIAN byte order.
Value parameters
- index
-
The read offset, an absolute offset into this buffer, to read from.
Attributes
Get the int value at the given reader offset. The readerOffset is not modified. The value is read using a two's complement 24-bit encoding, in java.nio.ByteOrder.BIG_ENDIAN byte order.
Get the int value at the given reader offset. The readerOffset is not modified. The value is read using a two's complement 24-bit encoding, in java.nio.ByteOrder.BIG_ENDIAN byte order.
Value parameters
- index
-
The read offset, an absolute offset into this buffer, to read from.
Attributes
Get the int value at the given reader offset. The readerOffset is not modified. The value is read using a two's complement 24-bit encoding, in java.nio.ByteOrder.LITTLE_ENDIAN byte order.
Get the int value at the given reader offset. The readerOffset is not modified. The value is read using a two's complement 24-bit encoding, in java.nio.ByteOrder.LITTLE_ENDIAN byte order.
Value parameters
- index
-
The read offset, an absolute offset into this buffer, to read from.
Attributes
Get the short value at the given reader offset. The readerOffset is not modified. The value is read using a two's complement 16-bit encoding, in java.nio.ByteOrder.BIG_ENDIAN byte order.
Get the short value at the given reader offset. The readerOffset is not modified. The value is read using a two's complement 16-bit encoding, in java.nio.ByteOrder.BIG_ENDIAN byte order.
Value parameters
- index
-
The read offset, an absolute offset into this buffer, to read from.
Attributes
Get the short value at the given reader offset. The readerOffset is not modified. The value is read using a two's complement 16-bit encoding, in java.nio.ByteOrder.LITTLE_ENDIAN byte order.
Get the short value at the given reader offset. The readerOffset is not modified. The value is read using a two's complement 16-bit encoding, in java.nio.ByteOrder.LITTLE_ENDIAN byte order.
Value parameters
- index
-
The read offset, an absolute offset into this buffer, to read from.
Attributes
Parses the string content stored in the buffer as a signed Double.
Parses the string content stored in the buffer as a signed Double.
An exception of type NumberFormatException is thrown if any of the following situations occurs:
this method fork form JDK JFloat.parseFloat and JDouble.parseDouble
Value parameters
- index
-
The read offset, an absolute offset into this buffer, to read from.
- length
-
string number content length.
Attributes
- Returns
-
the float represented by the string content.
- Inherited from:
- Buffer
Parses the string content stored in the buffer as a signed integer in the radix specified by the third argument. The characters in the string must all be digits of the specified radix (as determined by whether Character.digit(char, int) returns a nonnegative value), except that the first character may be an ASCII minus sign '-' ('\u002D') to indicate a negative value or an ASCII plus sign '+' ('\u002B') to indicate a positive value. The resulting integer value is returned.
Parses the string content stored in the buffer as a signed integer in the radix specified by the third argument. The characters in the string must all be digits of the specified radix (as determined by whether Character.digit(char, int) returns a nonnegative value), except that the first character may be an ASCII minus sign '-' ('\u002D') to indicate a negative value or an ASCII plus sign '+' ('\u002B') to indicate a positive value. The resulting integer value is returned.
An exception of type NumberFormatException is thrown if any of the following situations occurs:
this method fork form JDK Integer.parseInt
Value parameters
- index
-
The read offset, an absolute offset into this buffer, to read from.
- length
-
string number content length.
- radix
-
the radix to be used while parsing the string.
Attributes
- Returns
-
the integer represented by the string content in the specified radix.
- Throws
-
NumberFormatException
if the string content does not contain a parsable int.
- Inherited from:
- Buffer
Get the unsigned byte value at the given reader offset. The readerOffset is not modified. The value is read using an unsigned two's complement 8-bit encoding, in java.nio.ByteOrder.BIG_ENDIAN byte order.
Get the unsigned byte value at the given reader offset. The readerOffset is not modified. The value is read using an unsigned two's complement 8-bit encoding, in java.nio.ByteOrder.BIG_ENDIAN byte order.
Value parameters
- index
-
The read offset, an absolute offset into this buffer, to read from.
Attributes
Get the unsigned int value at the given reader offset. The readerOffset is not modified. The value is read using an unsigned two's complement 32-bit encoding, in java.nio.ByteOrder.BIG_ENDIAN byte order.
Get the unsigned int value at the given reader offset. The readerOffset is not modified. The value is read using an unsigned two's complement 32-bit encoding, in java.nio.ByteOrder.BIG_ENDIAN byte order.
Value parameters
- index
-
The read offset, an absolute offset into this buffer, to read from.
Attributes
Get the unsigned int value at the given reader offset. The readerOffset is not modified. The value is read using an unsigned two's complement 32-bit encoding, in java.nio.ByteOrder.LITTLE_ENDIAN byte order.
Get the unsigned int value at the given reader offset. The readerOffset is not modified. The value is read using an unsigned two's complement 32-bit encoding, in java.nio.ByteOrder.LITTLE_ENDIAN byte order.
Value parameters
- index
-
The read offset, an absolute offset into this buffer, to read from.
Attributes
Get the unsigned int value at the given reader offset. The readerOffset is not modified. The value is read using an unsigned two's complement 24-bit encoding, in java.nio.ByteOrder.BIG_ENDIAN byte order.
Get the unsigned int value at the given reader offset. The readerOffset is not modified. The value is read using an unsigned two's complement 24-bit encoding, in java.nio.ByteOrder.BIG_ENDIAN byte order.
Value parameters
- index
-
The read offset, an absolute offset into this buffer, to read from.
Attributes
Get the unsigned int value at the given reader offset. The readerOffset is not modified. The value is read using an unsigned two's complement 24-bit encoding, in java.nio.ByteOrder.LITTLE_ENDIAN byte order.
Get the unsigned int value at the given reader offset. The readerOffset is not modified. The value is read using an unsigned two's complement 24-bit encoding, in java.nio.ByteOrder.LITTLE_ENDIAN byte order.
Value parameters
- index
-
The read offset, an absolute offset into this buffer, to read from.
Attributes
Get the unsigned short value at the given reader offset. The readerOffset is not modified. The value is read using an unsigned two's complement 16-bit encoding, in java.nio.ByteOrder.BIG_ENDIAN byte order.
Get the unsigned short value at the given reader offset. The readerOffset is not modified. The value is read using an unsigned two's complement 16-bit encoding, in java.nio.ByteOrder.BIG_ENDIAN byte order.
Value parameters
- index
-
The read offset, an absolute offset into this buffer, to read from.
Attributes
Get the unsigned short value at the given reader offset. The readerOffset is not modified. The value is read using an unsigned two's complement 16-bit encoding, in java.nio.ByteOrder.LITTLE_ENDIAN byte order.
Get the unsigned short value at the given reader offset. The readerOffset is not modified. The value is read using an unsigned two's complement 16-bit encoding, in java.nio.ByteOrder.LITTLE_ENDIAN byte order.
Value parameters
- index
-
The read offset, an absolute offset into this buffer, to read from.
Attributes
Check the bytes at index is the gaven bytes.
Check the byte at index is in the gaven bytes
Check the byte at index is in the gaven byte range
Check the byte at index is the gaven byte
Queries if this buffer is backed by native memory, or not.
Queries if this buffer is backed by native memory, or not.
Attributes
- Returns
-
true if this buffer is backed by native, off-heap, memory. Otherwise, false, if this buffer is backed by on-heap memory.
- Inherited from:
- Buffer
Check the next readable bytes is the gaven bytes
Check the next readable byte is in the gaven bytes
Check the next readable byte is in the gaven byte range
Check the next readable byte is the gaven byte
Opens a cursor to iterate the given number bytes of this buffer, starting at the given offset. The readerOffset and writerOffset are not modified by the cursor.
Opens a cursor to iterate the given number bytes of this buffer, starting at the given offset. The readerOffset and writerOffset are not modified by the cursor.
Care should be taken to ensure that the buffer's lifetime extends beyond the cursor and the iteration, and that the readerOffset and writerOffset are not modified while the iteration takes place. Otherwise, unpredictable behaviour might result.
Value parameters
- fromOffset
-
The offset into the buffer where iteration should start. The first byte read from the iterator will be the byte at this offset.
- length
-
The number of bytes to iterate.
Attributes
- Returns
-
A ByteCursor for the given stretch of bytes of this buffer.
- Throws
-
BufferClosedException
If the Buffer has been closed.
IllegalArgumentExceptionif the length is negative, or if the region given by the fromOffset and the length reaches outside the bounds of this buffer.
- Inherited from:
- Buffer
Opens a cursor to iterate the given number bytes of this buffer, starting at the given offset. The readerOffset and writerOffset are not modified by the cursor.
Opens a cursor to iterate the given number bytes of this buffer, starting at the given offset. The readerOffset and writerOffset are not modified by the cursor.
Care should be taken to ensure that the buffer's lifetime extends beyond the cursor and the iteration, and that the readerOffset and writerOffset are not modified while the iteration takes place. Otherwise, unpredictable behaviour might result.
Attributes
- Returns
-
A ByteCursor for the given stretch of bytes of this buffer.
- Throws
-
BufferClosedException
If the Buffer has been closed.
IllegalArgumentExceptionif the length is negative, or if the region given by the fromOffset and the length reaches outside the bounds of this buffer.
- Inherited from:
- Buffer
Opens a cursor to iterate the given number bytes of this buffer, in reverse, starting at the given offset. The readerOffset and writerOffset are not modified by the cursor.
Opens a cursor to iterate the given number bytes of this buffer, in reverse, starting at the given offset. The readerOffset and writerOffset are not modified by the cursor.
Care should be taken to ensure that the buffer's lifetime extends beyond the cursor and the iteration, and that the readerOffset and writerOffset are not modified while the iteration takes place. Otherwise, unpredictable behaviour might result.
Value parameters
- fromOffset
-
The offset into the buffer where iteration should start. The first byte read from the iterator will be the byte at this offset.
- length
-
The number of bytes to iterate.
Attributes
- Returns
-
A ByteCursor for the given stretch of bytes of this buffer.
- Throws
-
IllegalArgumentException
if the length is negative, or if the region given by the fromOffset and the length reaches outside the bounds of this buffer.
- Inherited from:
- Buffer
Opens a cursor to iterate the readable bytes of this buffer, in reverse. The readerOffset and writerOffset are not modified by the cursor.
Opens a cursor to iterate the readable bytes of this buffer, in reverse. The readerOffset and writerOffset are not modified by the cursor.
Care should be taken to ensure that the buffer's lifetime extends beyond the cursor and the iteration, and that the readerOffset and writerOffset are not modified while the iteration takes place. Otherwise, unpredictable behaviour might result.
Attributes
- Returns
-
A ByteCursor for the readable bytes of this buffer.
- Throws
-
BufferClosedException
If the Buffer has been closed.
IllegalArgumentExceptionif the length is negative, or if the region given by the fromOffset and the length reaches outside the bounds of this buffer.
- Inherited from:
- Buffer
Read the boolean value at the current readerOffset, and increases the reader offset by java.lang.Byte.BYTES. A boolean gets read as a byte from this buffer. All byte values which are not equal to zero are considered as the boolean value true, zero represents false.
Read the boolean value at the current readerOffset, and increases the reader offset by java.lang.Byte.BYTES. A boolean gets read as a byte from this buffer. All byte values which are not equal to zero are considered as the boolean value true, zero represents false.
Attributes
- Returns
-
The boolean value at the current reader offset.
- Throws
-
IndexOutOfBoundsException
If readableBytes is less than java.lang.Byte.BYTES.
- Inherited from:
- Buffer
Read the byte value at the current readerOffset, and increases the reader offset by 1. The value is read using a two's complement 8-bit encoding, in java.nio.ByteOrder.BIG_ENDIAN byte order.
Read the byte value at the current readerOffset, and increases the reader offset by 1. The value is read using a two's complement 8-bit encoding, in java.nio.ByteOrder.BIG_ENDIAN byte order.
Attributes
- Returns
-
The byte value at the current reader offset.
- Throws
-
IndexOutOfBoundsException
If readableBytes is less than 1.
- Inherited from:
- Buffer
Read from this buffer, into the destination Buffer This updates the readerOffset of this buffer and also the position of the destination Buffer.
Read from this buffer, into the destination Buffer This updates the readerOffset of this buffer and also the position of the destination Buffer.
Note: the behaviour is undefined if the given Buffer is an alias for the memory in this buffer.
Value parameters
- destination
-
The Buffer to write into.
- length
-
The number of bytes to read.
Attributes
- Returns
-
This buffer.
- Inherited from:
- Buffer
Read from this buffer, into the destination Buffer This updates the readerOffset of this buffer and also the position of the destination Buffer.
Read from this buffer, into the destination Buffer This updates the readerOffset of this buffer and also the position of the destination Buffer.
Note: the behaviour is undefined if the given Buffer is an alias for the memory in this buffer.
Value parameters
- destination
-
The Buffer to write into.
Attributes
- Returns
-
This buffer.
- Inherited from:
- Buffer
Read from this buffer, into the destination array, the given number of bytes. This updates the readerOffset of this buffer by the length argument.
Read from this buffer, into the destination array, the given number of bytes. This updates the readerOffset of this buffer by the length argument.
Value parameters
- destPos
-
Position in the destination to where bytes should be written from this buffer.
- destination
-
The byte array to write into.
- length
-
The number of bytes to copy.
Attributes
- Returns
-
This buffer.
- Inherited from:
- Buffer
Read from this buffer, into the destination array, the given number of bytes. This updates the readerOffset of this buffer by the length argument.
Read from this buffer, into the destination array, the given number of bytes. This updates the readerOffset of this buffer by the length argument.
Value parameters
- destination
-
The byte array to write into.
Attributes
- Returns
-
This buffer.
- Inherited from:
- Buffer
Read from this buffer, into the destination ByteBuffer This updates the readerOffset of this buffer and also the position of the destination ByteBuffer.
Read from this buffer, into the destination ByteBuffer This updates the readerOffset of this buffer and also the position of the destination ByteBuffer.
Note: the behaviour is undefined if the given ByteBuffer is an alias for the memory in this buffer.
Value parameters
- destination
-
The ByteBuffer to write into.
- length
-
The number of bytes to copy. The real length is
math.min(math.min(readableBytes, length), destination.remaining())
Attributes
- Returns
-
This buffer.
- Inherited from:
- Buffer
Read from this buffer, into the destination ByteBuffer This updates the readerOffset of this buffer and also the position of the destination ByteBuffer.
Read from this buffer, into the destination ByteBuffer This updates the readerOffset of this buffer and also the position of the destination ByteBuffer.
Note: the behaviour is undefined if the given ByteBuffer is an alias for the memory in this buffer.
Value parameters
- destination
-
The ByteBuffer to write into.
Attributes
- Returns
-
This buffer.
- Inherited from:
- Buffer
Read the char value at the current readerOffset, and increases the reader offset by 2. The value is read using a 2-byte UTF-16 encoding, in java.nio.ByteOrder.BIG_ENDIAN byte order.
Read the char value at the current readerOffset, and increases the reader offset by 2. The value is read using a 2-byte UTF-16 encoding, in java.nio.ByteOrder.BIG_ENDIAN byte order.
Attributes
- Returns
-
The char value at the current reader offset.
- Throws
-
IndexOutOfBoundsException
If readableBytes is less than 2.
- Inherited from:
- Buffer
Read the char value at the current readerOffset, and increases the reader offset by 2. The value is read using a 2-byte UTF-16 encoding, in java.nio.ByteOrder.LITTLE_ENDIAN byte order.
Read the char value at the current readerOffset, and increases the reader offset by 2. The value is read using a 2-byte UTF-16 encoding, in java.nio.ByteOrder.LITTLE_ENDIAN byte order.
Attributes
- Returns
-
The char value at the current reader offset.
- Throws
-
IndexOutOfBoundsException
If readableBytes is less than 2.
- Inherited from:
- Buffer
Reads a CharSequence of the passed length using the passed Charset. This updates the readerOffset of this buffer.
Reads a CharSequence of the passed length using the passed Charset. This updates the readerOffset of this buffer.
Value parameters
- charset
-
Charset to use for reading.
- length
-
Length of CharSequence to read.
Attributes
- Returns
-
CharSequence read from this buffer.
- Throws
-
IndexOutOfBoundsException
if the passed length is more than the readableBytes of this buffer.
- Inherited from:
- Buffer
Reads a CharSequence of the passed length using the StandardCharsets.UTF_8 charset. This updates the readerOffset of this buffer.
Reads a CharSequence of the passed length using the StandardCharsets.UTF_8 charset. This updates the readerOffset of this buffer.
Value parameters
- length
-
of CharSequence to read.
Attributes
- Returns
-
CharSequence read from this buffer.
- Throws
-
IndexOutOfBoundsException
if the passed length is more than the readableBytes of this buffer.
- Inherited from:
- Buffer
Read the double value at the current readerOffset, and increases the reader offset by java.lang.Double.BYTES. The value is read using a 64-bit IEEE floating point encoding, in java.nio.ByteOrder.BIG_ENDIAN byte order.
Read the double value at the current readerOffset, and increases the reader offset by java.lang.Double.BYTES. The value is read using a 64-bit IEEE floating point encoding, in java.nio.ByteOrder.BIG_ENDIAN byte order.
Attributes
- Returns
-
The double value at the current reader offset.
- Throws
-
IndexOutOfBoundsException
If readableBytes is less than java.lang.Double.BYTES.
- Inherited from:
- Buffer
Read the double value at the current readerOffset, and increases the reader offset by java.lang.Double.BYTES. The value is read using a 64-bit IEEE floating point encoding, in java.nio.ByteOrder.LITTLE_ENDIAN byte order.
Read the double value at the current readerOffset, and increases the reader offset by java.lang.Double.BYTES. The value is read using a 64-bit IEEE floating point encoding, in java.nio.ByteOrder.LITTLE_ENDIAN byte order.
Attributes
- Returns
-
The double value at the current reader offset.
- Throws
-
IndexOutOfBoundsException
If readableBytes is less than java.lang.Double.BYTES.
- Inherited from:
- Buffer
Read the float value at the current readerOffset, and increases the reader offset by java.lang.Float.BYTES. The value is read using a 32-bit IEEE floating point encoding, in java.nio.ByteOrder.BIG_ENDIAN byte order.
Read the float value at the current readerOffset, and increases the reader offset by java.lang.Float.BYTES. The value is read using a 32-bit IEEE floating point encoding, in java.nio.ByteOrder.BIG_ENDIAN byte order.
Attributes
- Returns
-
The float value at the current reader offset.
- Throws
-
IndexOutOfBoundsException
If readableBytes is less than java.lang.Float.BYTES.
- Inherited from:
- Buffer
Read the float value at the current readerOffset, and increases the reader offset by java.lang.Float.BYTES. The value is read using a 32-bit IEEE floating point encoding, in java.nio.ByteOrder.LITTLE_ENDIAN byte order.
Read the float value at the current readerOffset, and increases the reader offset by java.lang.Float.BYTES. The value is read using a 32-bit IEEE floating point encoding, in java.nio.ByteOrder.LITTLE_ENDIAN byte order.
Attributes
- Returns
-
The float value at the current reader offset.
- Throws
-
IndexOutOfBoundsException
If readableBytes is less than java.lang.Float.BYTES.
- Inherited from:
- Buffer
Read the int value at the current readerOffset, and increases the reader offset by java.lang.Integer.BYTES. The value is read using a two's complement 32-bit encoding, in java.nio.ByteOrder.BIG_ENDIAN byte order.
Read the int value at the current readerOffset, and increases the reader offset by java.lang.Integer.BYTES. The value is read using a two's complement 32-bit encoding, in java.nio.ByteOrder.BIG_ENDIAN byte order.
Attributes
- Returns
-
The int value at the current reader offset.
- Throws
-
IndexOutOfBoundsException
If readableBytes is less than java.lang.Integer.BYTES.
- Inherited from:
- Buffer
Read the int value at the current readerOffset, and increases the reader offset by java.lang.Integer.BYTES. The value is read using a two's complement 32-bit encoding, in java.nio.ByteOrder.LITTLE_ENDIAN byte order.
Read the int value at the current readerOffset, and increases the reader offset by java.lang.Integer.BYTES. The value is read using a two's complement 32-bit encoding, in java.nio.ByteOrder.LITTLE_ENDIAN byte order.
Attributes
- Returns
-
The int value at the current reader offset.
- Throws
-
IndexOutOfBoundsException
If readableBytes is less than java.lang.Integer.BYTES.
- Inherited from:
- Buffer
Read the long value at the current readerOffset, and increases the reader offset by java.lang.Long.BYTES java.lang.Long.BYTES. The value is read using a two's complement 64-bit encoding, in java.nio.ByteOrder.BIG_ENDIAN byte order.
Read the long value at the current readerOffset, and increases the reader offset by java.lang.Long.BYTES java.lang.Long.BYTES. The value is read using a two's complement 64-bit encoding, in java.nio.ByteOrder.BIG_ENDIAN byte order.
Attributes
- Returns
-
The long value at the current reader offset.
- Throws
-
IndexOutOfBoundsException
If readableBytes is less than java.lang.Long.BYTES.
- Inherited from:
- Buffer
Read the long value at the current readerOffset, and increases the reader offset by java.lang.Long.BYTES java.lang.Long.BYTES. The value is read using a two's complement 64-bit encoding, in java.nio.ByteOrder.LITTLE_ENDIAN byte order.
Read the long value at the current readerOffset, and increases the reader offset by java.lang.Long.BYTES java.lang.Long.BYTES. The value is read using a two's complement 64-bit encoding, in java.nio.ByteOrder.LITTLE_ENDIAN byte order.
Attributes
- Returns
-
The long value at the current reader offset.
- Throws
-
IndexOutOfBoundsException
If readableBytes is less than java.lang.Long.BYTES.
- Inherited from:
- Buffer
Read the int value at the current readerOffset, and increases the reader offset by 3. The value is read using a two's complement 24-bit encoding, in java.nio.ByteOrder.BIG_ENDIAN byte order.
Read the int value at the current readerOffset, and increases the reader offset by 3. The value is read using a two's complement 24-bit encoding, in java.nio.ByteOrder.BIG_ENDIAN byte order.
Attributes
- Returns
-
The int value at the current reader offset.
- Throws
-
IndexOutOfBoundsException
If readableBytes is less than 3.
- Inherited from:
- Buffer
Read the int value at the current readerOffset, and increases the reader offset by 3. The value is read using a two's complement 24-bit encoding, in java.nio.ByteOrder.LITTLE_ENDIAN byte order.
Read the int value at the current readerOffset, and increases the reader offset by 3. The value is read using a two's complement 24-bit encoding, in java.nio.ByteOrder.LITTLE_ENDIAN byte order.
Attributes
- Returns
-
The int value at the current reader offset.
- Throws
-
IndexOutOfBoundsException
If readableBytes is less than 3.
- Inherited from:
- Buffer
Read the short value at the current readerOffset, and increases the reader offset by java.lang.Short.BYTES java.lang.Short.BYTES. The value is read using a two's complement 16-bit encoding, in java.nio.ByteOrder.BIG_ENDIAN byte order.
Read the short value at the current readerOffset, and increases the reader offset by java.lang.Short.BYTES java.lang.Short.BYTES. The value is read using a two's complement 16-bit encoding, in java.nio.ByteOrder.BIG_ENDIAN byte order.
Attributes
- Returns
-
The short value at the current reader offset.
- Throws
-
IndexOutOfBoundsException
If readableBytes is less than java.lang.Short.BYTES.
- Inherited from:
- Buffer
Read the short value at the current readerOffset, and increases the reader offset by java.lang.Short.BYTES java.lang.Short.BYTES. The value is read using a two's complement 16-bit encoding, in java.nio.ByteOrder.LITTLE_ENDIAN byte order.
Read the short value at the current readerOffset, and increases the reader offset by java.lang.Short.BYTES java.lang.Short.BYTES. The value is read using a two's complement 16-bit encoding, in java.nio.ByteOrder.LITTLE_ENDIAN byte order.
Attributes
- Returns
-
The short value at the current reader offset.
- Throws
-
IndexOutOfBoundsException
If readableBytes is less than java.lang.Short.BYTES.
- Inherited from:
- Buffer
Parses the string content stored in the buffer as a signed Double.
Parses the string content stored in the buffer as a signed Double.
An exception of type NumberFormatException is thrown if any of the following situations occurs:
this method fork form JDK JFloat.parseFloat and JDouble.parseDouble
Value parameters
- length
-
string number content length.
Attributes
- Returns
-
the float represented by the string content.
- Inherited from:
- Buffer
Parses the string content stored in the buffer as a signed integer in the radix specified by the second argument. The characters in the string must all be digits of the specified radix (as determined by whether Character.digit(char, int) returns a non-negative value), except that the first character may be an ASCII minus sign '-' ('\u002D') to indicate a negative value or an ASCII plus sign '+' ('\u002B') to indicate a positive value. The resulting integer value is returned.
Parses the string content stored in the buffer as a signed integer in the radix specified by the second argument. The characters in the string must all be digits of the specified radix (as determined by whether Character.digit(char, int) returns a non-negative value), except that the first character may be an ASCII minus sign '-' ('\u002D') to indicate a negative value or an ASCII plus sign '+' ('\u002B') to indicate a positive value. The resulting integer value is returned.
An exception of type NumberFormatException is thrown if any of the following situations occurs:
this method fork form JDK Integer.parseInt
Value parameters
- length
-
string number content length.
- radix
-
the radix to be used while parsing the string.
Attributes
- Returns
-
the integer represented by the string content in the specified radix.
- Throws
-
NumberFormatException
if the string content does not contain a parsable int.
- Inherited from:
- Buffer
Read the unsigned byte value at the current readerOffset, and increases the reader offset by java.lang.Byte.BYTES. The value is read using an unsigned two's complement 8-bit encoding, in java.nio.ByteOrder.BIG_ENDIAN byte order.
Read the unsigned byte value at the current readerOffset, and increases the reader offset by java.lang.Byte.BYTES. The value is read using an unsigned two's complement 8-bit encoding, in java.nio.ByteOrder.BIG_ENDIAN byte order.
Attributes
- Returns
-
The unsigned byte value at the current reader offset.
- Throws
-
IndexOutOfBoundsException
If readableBytes is less than java.lang.Byte.BYTES.
- Inherited from:
- Buffer
Read the unsigned int value at the current readerOffset, and increases the reader offset by java.lang.Integer.BYTES. The value is read using an unsigned two's complement 32-bit encoding, in java.nio.ByteOrder.BIG_ENDIAN byte order.
Read the unsigned int value at the current readerOffset, and increases the reader offset by java.lang.Integer.BYTES. The value is read using an unsigned two's complement 32-bit encoding, in java.nio.ByteOrder.BIG_ENDIAN byte order.
Attributes
- Returns
-
The unsigned int value at the current reader offset.
- Throws
-
IndexOutOfBoundsException
If readableBytes is less than java.lang.Integer.BYTES.
- Inherited from:
- Buffer
Read the unsigned int value at the current readerOffset, and increases the reader offset by java.lang.Integer.BYTES. The value is read using an unsigned two's complement 32-bit encoding, in java.nio.ByteOrder.LITTLE_ENDIAN byte order.
Read the unsigned int value at the current readerOffset, and increases the reader offset by java.lang.Integer.BYTES. The value is read using an unsigned two's complement 32-bit encoding, in java.nio.ByteOrder.LITTLE_ENDIAN byte order.
Attributes
- Returns
-
The unsigned int value at the current reader offset.
- Throws
-
IndexOutOfBoundsException
If readableBytes is less than java.lang.Integer.BYTES.
- Inherited from:
- Buffer
Read the unsigned int value at the current readerOffset, and increases the reader offset by 3. The value is read using an unsigned two's complement 24-bit encoding, in java.nio.ByteOrder.BIG_ENDIAN byte order.
Read the unsigned int value at the current readerOffset, and increases the reader offset by 3. The value is read using an unsigned two's complement 24-bit encoding, in java.nio.ByteOrder.BIG_ENDIAN byte order.
Attributes
- Returns
-
The unsigned int value at the current reader offset.
- Throws
-
IndexOutOfBoundsException
If readableBytes is less than 3.
- Inherited from:
- Buffer
Read the unsigned int value at the current readerOffset, and increases the reader offset by 3. The value is read using an unsigned two's complement 24-bit encoding, in java.nio.ByteOrder.LITTLE_ENDIAN byte order.
Read the unsigned int value at the current readerOffset, and increases the reader offset by 3. The value is read using an unsigned two's complement 24-bit encoding, in java.nio.ByteOrder.LITTLE_ENDIAN byte order.
Attributes
- Returns
-
The unsigned int value at the current reader offset.
- Throws
-
IndexOutOfBoundsException
If readableBytes is less than 3.
- Inherited from:
- Buffer
Read the unsigned short value at the current readerOffset, and increases the reader offset by java.lang.Short.BYTES. The value is read using an unsigned two's complement 16-bit encoding, in java.nio.ByteOrder.BIG_ENDIAN byte order.
Read the unsigned short value at the current readerOffset, and increases the reader offset by java.lang.Short.BYTES. The value is read using an unsigned two's complement 16-bit encoding, in java.nio.ByteOrder.BIG_ENDIAN byte order.
Attributes
- Returns
-
The unsigned short value at the current reader offset.
- Throws
-
IndexOutOfBoundsException
If readableBytes is less than java.lang.Short.BYTES.
- Inherited from:
- Buffer
Read the unsigned short value at the current readerOffset, and increases the reader offset by java.lang.Short.BYTES. The value is read using an unsigned two's complement 16-bit encoding, in java.nio.ByteOrder.LITTLE_ENDIAN byte order.
Read the unsigned short value at the current readerOffset, and increases the reader offset by java.lang.Short.BYTES. The value is read using an unsigned two's complement 16-bit encoding, in java.nio.ByteOrder.LITTLE_ENDIAN byte order.
Attributes
- Returns
-
The unsigned short value at the current reader offset.
- Throws
-
IndexOutOfBoundsException
If readableBytes is less than java.lang.Short.BYTES.
- Inherited from:
- Buffer
Returns the number of readable bytes which is equal to writerOffset - readerOffset.
Returns the number of readable bytes which is equal to writerOffset - readerOffset.
Attributes
- Inherited from:
- Buffer
Set the reader offset. Make the next read happen from the given offset into the buffer.
Set the reader offset. Make the next read happen from the given offset into the buffer.
Value parameters
- offset
-
The reader offset to set.
Attributes
- Returns
-
This Buffer.
- Throws
-
BufferClosedException
if this buffer is closed.
IndexOutOfBoundsExceptionif the specified offset is less than zero or greater than the current writerOffset.
- Inherited from:
- Buffer
Get the current reader offset. The next read will happen from this byte offset into the buffer.
Get the current reader offset. The next read will happen from this byte offset into the buffer.
Attributes
- Returns
-
The current reader offset.
- Inherited from:
- Buffer
Resets the readerOffset and the writerOffset on this buffer to zero, and return this buffer.
Resets the readerOffset and the writerOffset on this buffer to zero, and return this buffer.
Attributes
- Returns
-
This buffer instance.
- Inherited from:
- Buffer
Set the given boolean value at the given write offset. The writerOffset is not modified. A boolean gets written as a byte to this buffer. All byte values which are not equal to zero are considered as the boolean value true, zero represents false.
Set the given boolean value at the given write offset. The writerOffset is not modified. A boolean gets written as a byte to this buffer. All byte values which are not equal to zero are considered as the boolean value true, zero represents false.
Value parameters
- index
-
The write offset, an absolute offset into this buffer to write to.
- value
-
The boolean value to write.
Attributes
Set the given byte value at the given write offset. The writerOffset is not modified. The value is written using a two's complement 8-bit encoding, in java.nio.ByteOrder.BIG_ENDIAN byte order.
Set the given byte value at the given write offset. The writerOffset is not modified. The value is written using a two's complement 8-bit encoding, in java.nio.ByteOrder.BIG_ENDIAN byte order.
Value parameters
- index
-
The write offset, an absolute offset into this buffer to write to.
- value
-
The byte value to write.
Attributes
Set the given byte array at the given write offset. The writerOffset is not modified.
Set the given byte array at the given write offset. The writerOffset is not modified.
Value parameters
- index
-
The write offset, an absolute offset into this buffer to write to.
- source
-
The byte array to write.
Attributes
Set the given byte array at the given write offset. The writerOffset is not modified.
Set the given byte array at the given write offset. The writerOffset is not modified.
Value parameters
- index
-
The write offset, an absolute offset into this buffer to write to.
- length
-
length of byte to write.
- source
-
The byte array to write.
- srcPos
-
start offset of byte array.
Attributes
Set the given char value at the given write offset. The writerOffset is not modified. The value is written using a 2-byte UTF-16 encoding, in java.nio.ByteOrder.BIG_ENDIAN byte order.
Set the given char value at the given write offset. The writerOffset is not modified. The value is written using a 2-byte UTF-16 encoding, in java.nio.ByteOrder.BIG_ENDIAN byte order.
Value parameters
- index
-
The write offset, an absolute offset into this buffer to write to.
- value
-
The char value to write.
Attributes
Set the given char value at the given write offset. The writerOffset is not modified. The value is written using a 2-byte UTF-16 encoding, in java.nio.ByteOrder.LITTLE_ENDIAN byte order.
Set the given char value at the given write offset. The writerOffset is not modified. The value is written using a 2-byte UTF-16 encoding, in java.nio.ByteOrder.LITTLE_ENDIAN byte order.
Value parameters
- index
-
The write offset, an absolute offset into this buffer to write to.
- value
-
The char value to write.
Attributes
Sets into this buffer, all the bytes from the given source using the passed charset. This not updates the writerOffset of this buffer.
Sets into this buffer, all the bytes from the given source using the passed charset. This not updates the writerOffset of this buffer.
Value parameters
- charset
-
Charset to use for writing.
- source
-
CharSequence to read from.
Attributes
- Returns
-
This buffer.
- Inherited from:
- Buffer
Sets into this buffer, all the bytes from the given source using the passed charset. This not updates the writerOffset of this buffer.
Sets into this buffer, all the bytes from the given source using the passed charset. This not updates the writerOffset of this buffer.
Value parameters
- charset
-
Charset to use for writing.
- source
-
CharSequence to read from.
Attributes
- Returns
-
This buffer.
- Inherited from:
- Buffer
Set the given double value at the given write offset. The writerOffset is not modified. The value is written using a 64-bit IEEE floating point encoding, in java.nio.ByteOrder.BIG_ENDIAN byte order.
Set the given double value at the given write offset. The writerOffset is not modified. The value is written using a 64-bit IEEE floating point encoding, in java.nio.ByteOrder.BIG_ENDIAN byte order.
Value parameters
- index
-
The write offset, an absolute offset into this buffer to write to.
- value
-
The double value to write.
Attributes
Set the given double value at the given write offset. The writerOffset is not modified. The value is written using a 64-bit IEEE floating point encoding, in java.nio.ByteOrder.LITTLE_ENDIAN byte order.
Set the given double value at the given write offset. The writerOffset is not modified. The value is written using a 64-bit IEEE floating point encoding, in java.nio.ByteOrder.LITTLE_ENDIAN byte order.
Value parameters
- index
-
The write offset, an absolute offset into this buffer to write to.
- value
-
The double value to write.
Attributes
Set the given float value at the given write offset. The writerOffset is not modified. The value is written using a 32-bit IEEE floating point encoding, in java.nio.ByteOrder.BIG_ENDIAN byte order.
Set the given float value at the given write offset. The writerOffset is not modified. The value is written using a 32-bit IEEE floating point encoding, in java.nio.ByteOrder.BIG_ENDIAN byte order.
Value parameters
- index
-
The write offset, an absolute offset into this buffer to write to.
- value
-
The float value to write.
Attributes
Set the given float value at the given write offset. The writerOffset is not modified. The value is written using a 32-bit IEEE floating point encoding, in java.nio.ByteOrder.LITTLE_ENDIAN byte order.
Set the given float value at the given write offset. The writerOffset is not modified. The value is written using a 32-bit IEEE floating point encoding, in java.nio.ByteOrder.LITTLE_ENDIAN byte order.
Value parameters
- index
-
The write offset, an absolute offset into this buffer to write to.
- value
-
The float value to write.
Attributes
Set the given int value at the given write offset. The writerOffset is not modified. The value is written using a two's complement 32-bit encoding, in java.nio.ByteOrder.BIG_ENDIAN byte order.
Set the given int value at the given write offset. The writerOffset is not modified. The value is written using a two's complement 32-bit encoding, in java.nio.ByteOrder.BIG_ENDIAN byte order.
Value parameters
- index
-
The write offset, an absolute offset into this buffer to write to.
- value
-
The int value to write.
Attributes
Set the given int value at the given write offset. The writerOffset is not modified. The value is written using a two's complement 32-bit encoding, in java.nio.ByteOrder.LITTLE_ENDIAN byte order.
Set the given int value at the given write offset. The writerOffset is not modified. The value is written using a two's complement 32-bit encoding, in java.nio.ByteOrder.LITTLE_ENDIAN byte order.
Value parameters
- index
-
The write offset, an absolute offset into this buffer to write to.
- value
-
The int value to write.
Attributes
Set the given long value at the given write offset. The writerOffset is not modified. The value is written using a two's complement 64-bit encoding, in java.nio.ByteOrder.BIG_ENDIAN byte order.
Set the given long value at the given write offset. The writerOffset is not modified. The value is written using a two's complement 64-bit encoding, in java.nio.ByteOrder.BIG_ENDIAN byte order.
Value parameters
- index
-
The write offset, an absolute offset into this buffer to write to.
- value
-
The long value to write.
Attributes
Set the given long value at the given write offset. The writerOffset is not modified. The value is written using a two's complement 64-bit encoding, in java.nio.ByteOrder.LITTLE_ENDIAN byte order.
Set the given long value at the given write offset. The writerOffset is not modified. The value is written using a two's complement 64-bit encoding, in java.nio.ByteOrder.LITTLE_ENDIAN byte order.
Value parameters
- index
-
The write offset, an absolute offset into this buffer to write to.
- value
-
The long value to write.
Attributes
Set the given int value at the given write offset. The writerOffset is not modified. The value is written using a two's complement 24-bit encoding, in java.nio.ByteOrder.BIG_ENDIAN byte order.
Set the given int value at the given write offset. The writerOffset is not modified. The value is written using a two's complement 24-bit encoding, in java.nio.ByteOrder.BIG_ENDIAN byte order.
Value parameters
- index
-
The write offset, an absolute offset into this buffer to write to.
- value
-
The int value to write.
Attributes
Set the given int value at the given write offset. The writerOffset is not modified. The value is written using a two's complement 24-bit encoding, in java.nio.ByteOrder.LITTLE_ENDIAN byte order.
Set the given int value at the given write offset. The writerOffset is not modified. The value is written using a two's complement 24-bit encoding, in java.nio.ByteOrder.LITTLE_ENDIAN byte order.
Value parameters
- index
-
The write offset, an absolute offset into this buffer to write to.
- value
-
The int value to write.
Attributes
Set the given short value at the given write offset. The writerOffset is not modified. The value is written using a two's complement 16-bit encoding, in java.nio.ByteOrder.BIG_ENDIAN byte order.
Set the given short value at the given write offset. The writerOffset is not modified. The value is written using a two's complement 16-bit encoding, in java.nio.ByteOrder.BIG_ENDIAN byte order.
Value parameters
- index
-
The write offset, an absolute offset into this buffer to write to.
- value
-
The short value to write.
Attributes
Set the given short value at the given write offset. The writerOffset is not modified. The value is written using a two's complement 16-bit encoding, in java.nio.ByteOrder.LITTLE_ENDIAN byte order.
Set the given short value at the given write offset. The writerOffset is not modified. The value is written using a two's complement 16-bit encoding, in java.nio.ByteOrder.LITTLE_ENDIAN byte order.
Value parameters
- index
-
The write offset, an absolute offset into this buffer to write to.
- value
-
The short value to write.
Attributes
Set the given unsigned byte value at the given write offset. The writerOffset is not modified. The value is written using an unsigned two's complement 8-bit encoding, in java.nio.ByteOrder.BIG_ENDIAN byte order.
Set the given unsigned byte value at the given write offset. The writerOffset is not modified. The value is written using an unsigned two's complement 8-bit encoding, in java.nio.ByteOrder.BIG_ENDIAN byte order.
Value parameters
- index
-
The write offset, an absolute offset into this buffer to write to.
- value
-
The int value to write.
Attributes
Set the given unsigned int value at the given write offset. The writerOffset is not modified. The value is written using an unsigned two's complement 32-bit encoding, in java.nio.ByteOrder.BIG_ENDIAN byte order.
Set the given unsigned int value at the given write offset. The writerOffset is not modified. The value is written using an unsigned two's complement 32-bit encoding, in java.nio.ByteOrder.BIG_ENDIAN byte order.
Value parameters
- index
-
The write offset, an absolute offset into this buffer to write to.
- value
-
The long value to write.
Attributes
Set the given unsigned int value at the given write offset. The writerOffset is not modified. The value is written using an unsigned two's complement 32-bit encoding, in java.nio.ByteOrder.LITTLE_ENDIAN byte order.
Set the given unsigned int value at the given write offset. The writerOffset is not modified. The value is written using an unsigned two's complement 32-bit encoding, in java.nio.ByteOrder.LITTLE_ENDIAN byte order.
Value parameters
- index
-
The write offset, an absolute offset into this buffer to write to.
- value
-
The long value to write.
Attributes
Set the given unsigned int value at the given write offset. The writerOffset is not modified. The value is written using an unsigned two's complement 24-bit encoding, in java.nio.ByteOrder.BIG_ENDIAN byte order.
Set the given unsigned int value at the given write offset. The writerOffset is not modified. The value is written using an unsigned two's complement 24-bit encoding, in java.nio.ByteOrder.BIG_ENDIAN byte order.
Value parameters
- index
-
The write offset, an absolute offset into this buffer to write to.
- value
-
The int value to write.
Attributes
Set the given unsigned int value at the given write offset. The writerOffset is not modified. The value is written using an unsigned two's complement 24-bit encoding, in java.nio.ByteOrder.LITTLE_ENDIAN byte order.
Set the given unsigned int value at the given write offset. The writerOffset is not modified. The value is written using an unsigned two's complement 24-bit encoding, in java.nio.ByteOrder.LITTLE_ENDIAN byte order.
Value parameters
- index
-
The write offset, an absolute offset into this buffer to write to.
- value
-
The int value to write.
Attributes
Set the given unsigned short value at the given write offset. The writerOffset is not modified. The value is written using an unsigned two's complement 16-bit encoding, in java.nio.ByteOrder.BIG_ENDIAN byte order.
Set the given unsigned short value at the given write offset. The writerOffset is not modified. The value is written using an unsigned two's complement 16-bit encoding, in java.nio.ByteOrder.BIG_ENDIAN byte order.
Value parameters
- index
-
The write offset, an absolute offset into this buffer to write to.
- value
-
The int value to write.
Attributes
Set the given unsigned short value at the given write offset. The writerOffset is not modified. The value is written using an unsigned two's complement 16-bit encoding, in java.nio.ByteOrder.LITTLE_ENDIAN byte order.
Set the given unsigned short value at the given write offset. The writerOffset is not modified. The value is written using an unsigned two's complement 16-bit encoding, in java.nio.ByteOrder.LITTLE_ENDIAN byte order.
Value parameters
- index
-
The write offset, an absolute offset into this buffer to write to.
- value
-
The int value to write.
Attributes
increase the readerOffset by length of bytes if the next readable bytes is the gaven bytes
increase the readerOffset by length of bytes if the next readable bytes is the gaven bytes
Attributes
- Inherited from:
- Buffer
increase the readerOffset by length of bytes if the next readable bytes is the gaven bytes
increase the readerOffset by length of bytes if the next readable bytes is the gaven bytes
Value parameters
- bytes
-
the compared bytes.
- ignoreCase
-
whether ignore char case of bytes.
Attributes
- Inherited from:
- Buffer
increase the readerOffset by one if the next readable byte is in the gaven bytes.
increase the readerOffset by one if the next readable byte is in the gaven bytes.
Attributes
- Inherited from:
- Buffer
increase the readerOffset by one if the next readable byte is in the gaven byte range.
increase the readerOffset by one if the next readable byte is in the gaven byte range.
Attributes
- Inherited from:
- Buffer
increase the readerOffset by one if the next readable byte is the gaven byte
increase the readerOffset by one if the next readable byte is the gaven byte
Attributes
- Inherited from:
- Buffer
Move the reader offset forward by the given delta.
Move the reader offset forward by the given delta.
Value parameters
- delta
-
to accumulate.
Attributes
- Returns
-
This buffer instance.
- Throws
-
BufferClosedException
if this buffer is closed.
IllegalArgumentExceptionif the given delta is negative.
IndexOutOfBoundsExceptionif the new reader offset is greater than the current writerOffset.
- Inherited from:
- Buffer
Move the writer offset to ahead by the given delta.
Move the writer offset to ahead by the given delta.
Value parameters
- delta
-
to accumulate.
Attributes
- Returns
-
This buffer instance.
- Throws
-
BufferClosedException
if this buffer is closed.
IllegalArgumentExceptionif the given delta is negative.
IndexOutOfBoundsExceptionif the new writer offset is greater than capacity.
- Inherited from:
- Buffer
Read from the given channel and write to this buffer. The number of bytes actually read from the channel are returned, or -1 is returned if the channel has reached the end-of-stream. No more than the given length of bytes, or the number of writableBytes, will be read from the channel, whichever is smaller. If the channel has a position, then it will be advanced by the number of bytes read. The writerOffset of this buffer will likewise be advanced by the number of bytes read.
Read from the given channel and write to this buffer. The number of bytes actually read from the channel are returned, or -1 is returned if the channel has reached the end-of-stream. No more than the given length of bytes, or the number of writableBytes, will be read from the channel, whichever is smaller. If the channel has a position, then it will be advanced by the number of bytes read. The writerOffset of this buffer will likewise be advanced by the number of bytes read.
Value parameters
- channel
-
The channel to read from.
- length
-
The maximum number of bytes to read.
Attributes
- Returns
-
The actual number of bytes read, possibly zero, or -1 if the end-of-stream has been reached.
- Throws
-
IOException
If the read-operation on the channel failed for some reason.
- Inherited from:
- Buffer
Read from the given channel starting from the given position and write to this buffer. The number of bytes actually read from the channel are returned, or -1 is returned if the channel has reached the end-of-stream. No more than the given length of bytes, or the number of writableBytes, will be read from the channel, whichever is smaller. The channel's position is not modified. The writerOffset of this buffer will likewise be advanced by the number of bytes read.
Read from the given channel starting from the given position and write to this buffer. The number of bytes actually read from the channel are returned, or -1 is returned if the channel has reached the end-of-stream. No more than the given length of bytes, or the number of writableBytes, will be read from the channel, whichever is smaller. The channel's position is not modified. The writerOffset of this buffer will likewise be advanced by the number of bytes read.
Value parameters
- channel
-
The channel to read from.
- length
-
The maximum number of bytes to read.
- position
-
The file position.
Attributes
- Returns
-
The actual number of bytes read, possibly zero, or -1 if the end-of-stream has been reached.
- Throws
-
IOException
If the read-operation on the channel failed for some reason.
- Inherited from:
- Buffer
Read from this buffer and write to the given channel. The number of bytes actually written to the channel are returned. No more than the given length of bytes, or the number of readableBytes, will be written to the channel, whichever is smaller. If the channel has a position, then it will be advanced by the number of bytes written. The readerOffset of this buffer will likewise be advanced by the number of bytes written.
Read from this buffer and write to the given channel. The number of bytes actually written to the channel are returned. No more than the given length of bytes, or the number of readableBytes, will be written to the channel, whichever is smaller. If the channel has a position, then it will be advanced by the number of bytes written. The readerOffset of this buffer will likewise be advanced by the number of bytes written.
Value parameters
- channel
-
The channel to write to.
- length
-
The maximum number of bytes to write.
Attributes
- Returns
-
The actual number of bytes written, possibly zero.
- Throws
-
IOException
If the write-operation on the channel failed for some reason.
- Inherited from:
- Buffer
Returns the number of writable bytes which is equal to capacity - writerOffset .
Returns the number of writable bytes which is equal to capacity - writerOffset .
Attributes
- Inherited from:
- Buffer
Write the given boolean value at the current writerOffset, and increase the writer offset by java.lang.Byte.BYTES. A boolean gets written as a byte to this buffer. All byte values which are not equal to zero are considered as the boolean value true, zero represents false.
Write the given boolean value at the current writerOffset, and increase the writer offset by java.lang.Byte.BYTES. A boolean gets written as a byte to this buffer. All byte values which are not equal to zero are considered as the boolean value true, zero represents false.
Value parameters
- value
-
The boolean value to write.
Attributes
- Returns
-
This Buffer.
- Throws
-
IndexOutOfBoundsException
If writableBytes is less than java.lang.Byte.BYTES, and the capacity buffer capacity cannot be automatically increased.
- Inherited from:
- Buffer
Write the given byte value at the current writerOffset, and increase the writer offset by java.lang.Byte.BYTES. The value is written using a two's complement 8-bit encoding, in java.nio.ByteOrder.BIG_ENDIAN byte order.
Write the given byte value at the current writerOffset, and increase the writer offset by java.lang.Byte.BYTES. The value is written using a two's complement 8-bit encoding, in java.nio.ByteOrder.BIG_ENDIAN byte order.
Value parameters
- value
-
The byte value to write.
Attributes
- Returns
-
This Buffer.
- Throws
-
IndexOutOfBoundsException
If writableBytes is less than java.lang.Byte.BYTES, and the capacity buffer capacity cannot be automatically increased.
- Inherited from:
- Buffer
Writes into this buffer from the source ByteBuffer. This updates the writerOffset of this buffer and also the position of the source ByteBuffer.
Writes into this buffer from the source ByteBuffer. This updates the writerOffset of this buffer and also the position of the source ByteBuffer.
Note: the behaviour is undefined if the given ByteBuffer is an alias for the memory in this buffer.
Value parameters
- length
-
The number of bytes to copy.
- source
-
The ByteBuffer to read from.
Attributes
- Returns
-
This buffer.
- Inherited from:
- Buffer
Writes into this buffer from the source ByteBuffer. This updates the writerOffset of this buffer and also the position of the source ByteBuffer.
Writes into this buffer from the source ByteBuffer. This updates the writerOffset of this buffer and also the position of the source ByteBuffer.
Note: the behaviour is undefined if the given ByteBuffer is an alias for the memory in this buffer.
Value parameters
- source
-
The ByteBuffer to read from.
Attributes
- Returns
-
This buffer.
- Inherited from:
- Buffer
Fills this buffer with value starting at the current writerOffset and increases the writerOffset by the specified length. If writableBytes is less than length, ensureWritable will be called in an attempt to expand capacity to accommodate.
Fills this buffer with value starting at the current writerOffset and increases the writerOffset by the specified length. If writableBytes is less than length, ensureWritable will be called in an attempt to expand capacity to accommodate.
Value parameters
- length
-
the number of values to write to the buffer.
- value
-
the value byte to write.
Attributes
- Returns
-
This buffer.
- Inherited from:
- Buffer
Writes into this buffer, all the bytes from the given byte array. This updates the writerOffset of this buffer by the length of the array.
Writes into this buffer, all the bytes from the given byte array. This updates the writerOffset of this buffer by the length of the array.
Value parameters
- source
-
The byte array to read from.
Attributes
- Returns
-
This buffer.
- Inherited from:
- Buffer
Writes into this buffer, the given number of bytes from the byte array. This updates the writerOffset of this buffer by the length argument.
Writes into this buffer, the given number of bytes from the byte array. This updates the writerOffset of this buffer by the length argument.
Value parameters
- length
-
The number of bytes to copy.
- source
-
The byte array to read from.
- srcPos
-
Position in the source from where bytes should be written to this buffer.
Attributes
- Returns
-
This buffer.
- Inherited from:
- Buffer
Writes into this buffer, the given number of bytes from the source. This updates the writerOffset of this buffer, and the readerOffset of the given buffer.
Writes into this buffer, the given number of bytes from the source. This updates the writerOffset of this buffer, and the readerOffset of the given buffer.
Value parameters
- length
-
The number of bytes to copy.
- source
-
The buffer to read from.
Attributes
- Returns
-
This buffer.
- Inherited from:
- Buffer
Writes into this buffer, all the readable bytes from the given buffer. This updates the writerOffset of this buffer, and the readerOffset of the given buffer.
Writes into this buffer, all the readable bytes from the given buffer. This updates the writerOffset of this buffer, and the readerOffset of the given buffer.
Value parameters
- source
-
The buffer to read from.
Attributes
- Returns
-
This buffer.
- Inherited from:
- Buffer
Write the given char value at the current writerOffset, and increase the writer offset by 2. The value is written using a 2-byte UTF-16 encoding, in java.nio.ByteOrder.BIG_ENDIAN byte order.
Write the given char value at the current writerOffset, and increase the writer offset by 2. The value is written using a 2-byte UTF-16 encoding, in java.nio.ByteOrder.BIG_ENDIAN byte order.
Value parameters
- value
-
The char value to write.
Attributes
- Returns
-
This Buffer.
- Throws
-
IndexOutOfBoundsException
If writableBytes is less than 2, and the capacity buffer capacity cannot be automatically increased.
- Inherited from:
- Buffer
Write the given char value at the current writerOffset, and increase the writer offset by 2. The value is written using a 2-byte UTF-16 encoding, in java.nio.ByteOrder.LITTLE_ENDIAN byte order.
Write the given char value at the current writerOffset, and increase the writer offset by 2. The value is written using a 2-byte UTF-16 encoding, in java.nio.ByteOrder.LITTLE_ENDIAN byte order.
Value parameters
- value
-
The char value to write.
Attributes
- Returns
-
This Buffer.
- Throws
-
IndexOutOfBoundsException
If writableBytes is less than 2, and the capacity buffer capacity cannot be automatically increased.
- Inherited from:
- Buffer
Writes into this buffer, all the bytes from the given source using the passed charset. This updates the writerOffset of this buffer.
Writes into this buffer, all the bytes from the given source using the passed charset. This updates the writerOffset of this buffer.
Value parameters
- charset
-
Charset to use for writing.
- source
-
CharSequence to read from.
Attributes
- Returns
-
This buffer.
- Inherited from:
- Buffer
Writes into this buffer, all the bytes from the given source using the StandardCharsets.UTF_8 charset. This updates the writerOffset of this buffer.
Writes into this buffer, all the bytes from the given source using the StandardCharsets.UTF_8 charset. This updates the writerOffset of this buffer.
Value parameters
- source
-
CharSequence to read from.
Attributes
- Returns
-
This buffer.
- Inherited from:
- Buffer
Write the given double value at the current writerOffset, and increase the writer offset by java.lang.Double.BYTES. The value is written using a 64-bit IEEE floating point encoding, in java.nio.ByteOrder.BIG_ENDIAN byte order.
Write the given double value at the current writerOffset, and increase the writer offset by java.lang.Double.BYTES. The value is written using a 64-bit IEEE floating point encoding, in java.nio.ByteOrder.BIG_ENDIAN byte order.
Value parameters
- value
-
The double value to write.
Attributes
- Returns
-
This Buffer.
- Throws
-
IndexOutOfBoundsException
If writableBytes is less than java.lang.Double.BYTES, and the capacity buffer capacity cannot be automatically increased.
- Inherited from:
- Buffer
Write the given double value at the current writerOffset, and increase the writer offset by java.lang.Double.BYTES. The value is written using a 64-bit IEEE floating point encoding, in java.nio.ByteOrder.LITTLE_ENDIAN byte order.
Write the given double value at the current writerOffset, and increase the writer offset by java.lang.Double.BYTES. The value is written using a 64-bit IEEE floating point encoding, in java.nio.ByteOrder.LITTLE_ENDIAN byte order.
Value parameters
- value
-
The double value to write.
Attributes
- Returns
-
This Buffer.
- Throws
-
IndexOutOfBoundsException
If writableBytes is less than java.lang.Double.BYTES, and the capacity buffer capacity cannot be automatically increased.
- Inherited from:
- Buffer
Write the given float value at the current writerOffset, and increase the writer offset by java.lang.Float.BYTES. The value is written using a 32-bit IEEE floating point encoding, in java.nio.ByteOrder.BIG_ENDIAN byte order.
Write the given float value at the current writerOffset, and increase the writer offset by java.lang.Float.BYTES. The value is written using a 32-bit IEEE floating point encoding, in java.nio.ByteOrder.BIG_ENDIAN byte order.
Value parameters
- value
-
The float value to write.
Attributes
- Returns
-
This Buffer.
- Throws
-
IndexOutOfBoundsException
If writableBytes is less than java.lang.Float.BYTES, and the capacity buffer capacity cannot be automatically increased.
- Inherited from:
- Buffer
Write the given float value at the current writerOffset, and increase the writer offset by java.lang.Float.BYTES. The value is written using a 32-bit IEEE floating point encoding, in java.nio.ByteOrder.LITTLE_ENDIAN byte order.
Write the given float value at the current writerOffset, and increase the writer offset by java.lang.Float.BYTES. The value is written using a 32-bit IEEE floating point encoding, in java.nio.ByteOrder.LITTLE_ENDIAN byte order.
Value parameters
- value
-
The float value to write.
Attributes
- Returns
-
This Buffer.
- Throws
-
IndexOutOfBoundsException
If writableBytes is less than java.lang.Float.BYTES, and the capacity buffer capacity cannot be automatically increased.
- Inherited from:
- Buffer
Write the given int value at the current writerOffset, and increase the writer offset by java.lang.Integer.BYTES. The value is written using a two's complement 32-bit encoding, in java.nio.ByteOrder.BIG_ENDIAN byte order.
Write the given int value at the current writerOffset, and increase the writer offset by java.lang.Integer.BYTES. The value is written using a two's complement 32-bit encoding, in java.nio.ByteOrder.BIG_ENDIAN byte order.
Value parameters
- value
-
The int value to write.
Attributes
- Returns
-
This Buffer.
- Throws
-
IndexOutOfBoundsException
If writableBytes is less than java.lang.Integer.BYTES, and the capacity buffer capacity cannot be automatically increased.
- Inherited from:
- Buffer
Write the given int value at the current writerOffset, and increase the writer offset by java.lang.Integer.BYTES. The value is written using a two's complement 32-bit encoding, in java.nio.ByteOrder.LITTLE_ENDIAN byte order.
Write the given int value at the current writerOffset, and increase the writer offset by java.lang.Integer.BYTES. The value is written using a two's complement 32-bit encoding, in java.nio.ByteOrder.LITTLE_ENDIAN byte order.
Value parameters
- value
-
The int value to write.
Attributes
- Returns
-
This Buffer.
- Throws
-
IndexOutOfBoundsException
If writableBytes is less than java.lang.Integer.BYTES, and the capacity buffer capacity cannot be automatically increased.
- Inherited from:
- Buffer
Write the given long value at the current writerOffset, and increase the writer offset by java.lang.Long.BYTES. The value is written using a two's complement 64-bit encoding, in java.nio.ByteOrder.BIG_ENDIAN byte order.
Write the given long value at the current writerOffset, and increase the writer offset by java.lang.Long.BYTES. The value is written using a two's complement 64-bit encoding, in java.nio.ByteOrder.BIG_ENDIAN byte order.
Value parameters
- value
-
The long value to write.
Attributes
- Returns
-
This Buffer.
- Throws
-
IndexOutOfBoundsException
If writableBytes is less than java.lang.Long.BYTES, and the capacity buffer capacity cannot be automatically increased.
- Inherited from:
- Buffer
Write the given long value at the current writerOffset, and increase the writer offset by java.lang.Long.BYTES. The value is written using a two's complement 64-bit encoding, in java.nio.ByteOrder.LITTLE_ENDIAN byte order.
Write the given long value at the current writerOffset, and increase the writer offset by java.lang.Long.BYTES. The value is written using a two's complement 64-bit encoding, in java.nio.ByteOrder.LITTLE_ENDIAN byte order.
Value parameters
- value
-
The long value to write.
Attributes
- Returns
-
This Buffer.
- Throws
-
IndexOutOfBoundsException
If writableBytes is less than java.lang.Long.BYTES, and the capacity buffer capacity cannot be automatically increased.
- Inherited from:
- Buffer
Write the given int value at the current writerOffset, and increase the writer offset by 3. The value is written using a two's complement 24-bit encoding, in java.nio.ByteOrder.BIG_ENDIAN byte order.
Write the given int value at the current writerOffset, and increase the writer offset by 3. The value is written using a two's complement 24-bit encoding, in java.nio.ByteOrder.BIG_ENDIAN byte order.
Value parameters
- value
-
The int value to write.
Attributes
- Returns
-
This Buffer.
- Throws
-
IndexOutOfBoundsException
If writableBytes is less than 3, and the capacity buffer capacity cannot be automatically increased.
- Inherited from:
- Buffer
Write the given int value at the current writerOffset, and increase the writer offset by 3. The value is written using a two's complement 24-bit encoding, in java.nio.ByteOrder.LITTLE_ENDIAN byte order.
Write the given int value at the current writerOffset, and increase the writer offset by 3. The value is written using a two's complement 24-bit encoding, in java.nio.ByteOrder.LITTLE_ENDIAN byte order.
Value parameters
- value
-
The int value to write.
Attributes
- Returns
-
This Buffer.
- Throws
-
IndexOutOfBoundsException
If writableBytes is less than 3, and the capacity buffer capacity cannot be automatically increased.
- Inherited from:
- Buffer
Write the given short value at the current writerOffset, and increase the writer offset by java.lang.Short.BYTES. The value is written using a two's complement 16-bit encoding, in java.nio.ByteOrder.BIG_ENDIAN byte order.
Write the given short value at the current writerOffset, and increase the writer offset by java.lang.Short.BYTES. The value is written using a two's complement 16-bit encoding, in java.nio.ByteOrder.BIG_ENDIAN byte order.
Value parameters
- value
-
The short value to write.
Attributes
- Returns
-
This Buffer.
- Throws
-
IndexOutOfBoundsException
If writableBytes is less than java.lang.Short.BYTES, and the capacity buffer capacity cannot be automatically increased.
- Inherited from:
- Buffer
Write the given short value at the current writerOffset, and increase the writer offset by java.lang.Short.BYTES. The value is written using a two's complement 16-bit encoding, in java.nio.ByteOrder.LITTLE_ENDIAN byte order.
Write the given short value at the current writerOffset, and increase the writer offset by java.lang.Short.BYTES. The value is written using a two's complement 16-bit encoding, in java.nio.ByteOrder.LITTLE_ENDIAN byte order.
Value parameters
- value
-
The short value to write.
Attributes
- Returns
-
This Buffer.
- Throws
-
IndexOutOfBoundsException
If writableBytes is less than java.lang.Short.BYTES, and the capacity buffer capacity cannot be automatically increased.
- Inherited from:
- Buffer
Write the given unsigned byte value at the current writerOffset, and increase the writer offset by java.lang.Byte.BYTES. The value is written using an unsigned two's complement 8-bit encoding, in java.nio.ByteOrder.BIG_ENDIAN byte order.
Write the given unsigned byte value at the current writerOffset, and increase the writer offset by java.lang.Byte.BYTES. The value is written using an unsigned two's complement 8-bit encoding, in java.nio.ByteOrder.BIG_ENDIAN byte order.
Value parameters
- value
-
The int value to write.
Attributes
- Returns
-
This Buffer.
- Throws
-
IndexOutOfBoundsException
If writableBytes is less than java.lang.Byte.BYTES, and the capacity buffer capacity cannot be automatically increased.
- Inherited from:
- Buffer
Write the given unsigned int value at the current writerOffset, and increase the writer offset by java.lang.Integer.BYTES. The value is written using an unsigned two's complement 32-bit encoding, in java.nio.ByteOrder.BIG_ENDIAN byte order.
Write the given unsigned int value at the current writerOffset, and increase the writer offset by java.lang.Integer.BYTES. The value is written using an unsigned two's complement 32-bit encoding, in java.nio.ByteOrder.BIG_ENDIAN byte order.
Value parameters
- value
-
The long value to write.
Attributes
- Returns
-
This Buffer.
- Throws
-
IndexOutOfBoundsException
If writableBytes is less than java.lang.Integer.BYTES, and the capacity buffer capacity cannot be automatically increased.
- Inherited from:
- Buffer
Write the given unsigned int value at the current writerOffset, and increase the writer offset by java.lang.Integer.BYTES. The value is written using an unsigned two's complement 32-bit encoding, in java.nio.ByteOrder.LITTLE_ENDIAN byte order.
Write the given unsigned int value at the current writerOffset, and increase the writer offset by java.lang.Integer.BYTES. The value is written using an unsigned two's complement 32-bit encoding, in java.nio.ByteOrder.LITTLE_ENDIAN byte order.
Value parameters
- value
-
The long value to write.
Attributes
- Returns
-
This Buffer.
- Throws
-
IndexOutOfBoundsException
If writableBytes is less than java.lang.Integer.BYTES, and the capacity buffer capacity cannot be automatically increased.
- Inherited from:
- Buffer
Write the given unsigned int value at the current writerOffset, and increase the writer offset by 3. The value is written using an unsigned two's complement 24-bit encoding, in java.nio.ByteOrder.BIG_ENDIAN byte order.
Write the given unsigned int value at the current writerOffset, and increase the writer offset by 3. The value is written using an unsigned two's complement 24-bit encoding, in java.nio.ByteOrder.BIG_ENDIAN byte order.
Value parameters
- value
-
The int value to write.
Attributes
- Returns
-
This Buffer.
- Throws
-
IndexOutOfBoundsException
If writableBytes is less than 3, and the capacity buffer capacity cannot be automatically increased.
- Inherited from:
- Buffer
Write the given unsigned int value at the current writerOffset, and increase the writer offset by 3. The value is written using an unsigned two's complement 24-bit encoding, in java.nio.ByteOrder.LITTLE_ENDIAN byte order.
Write the given unsigned int value at the current writerOffset, and increase the writer offset by 3. The value is written using an unsigned two's complement 24-bit encoding, in java.nio.ByteOrder.LITTLE_ENDIAN byte order.
Value parameters
- value
-
The int value to write.
Attributes
- Returns
-
This Buffer.
- Throws
-
IndexOutOfBoundsException
If writableBytes is less than 3, and the capacity buffer capacity cannot be automatically increased.
- Inherited from:
- Buffer
Write the given unsigned short value at the current writerOffset, and increase the writer offset by java.lang.Short.BYTES. The value is written using an unsigned two's complement 16-bit encoding, in java.nio.ByteOrder.BIG_ENDIAN byte order.
Write the given unsigned short value at the current writerOffset, and increase the writer offset by java.lang.Short.BYTES. The value is written using an unsigned two's complement 16-bit encoding, in java.nio.ByteOrder.BIG_ENDIAN byte order.
Value parameters
- value
-
The int value to write.
Attributes
- Returns
-
This Buffer.
- Throws
-
IndexOutOfBoundsException
If writableBytes is less than java.lang.Short.BYTES, and the capacity buffer capacity cannot be automatically increased.
- Inherited from:
- Buffer
Write the given unsigned short value at the current writerOffset, and increase the writer offset by java.lang.Short.BYTES. The value is written using an unsigned two's complement 16-bit encoding, in java.nio.ByteOrder.LITTLE_ENDIAN byte order.
Write the given unsigned short value at the current writerOffset, and increase the writer offset by java.lang.Short.BYTES. The value is written using an unsigned two's complement 16-bit encoding, in java.nio.ByteOrder.LITTLE_ENDIAN byte order.
Value parameters
- value
-
The int value to write.
Attributes
- Returns
-
This Buffer.
- Throws
-
IndexOutOfBoundsException
If writableBytes is less than java.lang.Short.BYTES, and the capacity buffer capacity cannot be automatically increased.
- Inherited from:
- Buffer
Set the writer offset. Make the next write happen at the given offset.
Set the writer offset. Make the next write happen at the given offset.
Value parameters
- offset
-
The writer offset to set.
Attributes
- Returns
-
This Buffer.
- Throws
-
BufferClosedException
if this buffer is closed.
IndexOutOfBoundsExceptionif the specified offset is less than the current readerOffset or greater than capacity.
- Inherited from:
- Buffer
Get the current writer offset. The next write will happen at this byte offset into the buffer.
Get the current writer offset. The next write will happen at this byte offset into the buffer.
Attributes
- Returns
-
The current writer offset.
- Inherited from:
- Buffer