DirectRecyclablePageBuffer

cc.otavia.buffer.pool.DirectRecyclablePageBuffer
See theDirectRecyclablePageBuffer companion object
class DirectRecyclablePageBuffer(underlying: ByteBuffer) extends RecyclablePageBuffer

Attributes

Companion
object
Graph
Supertypes
trait Buffer
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

override def isDirect: Boolean

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.

Definition Classes

Inherited methods

Attributes

Inherited from:
RecyclablePageBuffer
override def bytesBefore(needle: Array[Byte], from: Int, to: Int, ignoreCase: Boolean): Int

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

Definition Classes
Inherited from:
AbstractBuffer
override def bytesBefore(needle: Array[Byte]): Int

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.

Definition Classes
Inherited from:
AbstractBuffer
override def bytesBefore(needle1: Byte, needle2: Byte, needle3: Byte, needle4: Byte): Int

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.

Definition Classes
Inherited from:
AbstractBuffer
override def bytesBefore(needle1: Byte, needle2: Byte, needle3: Byte): Int

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.

Definition Classes
Inherited from:
AbstractBuffer
override def bytesBefore(needle1: Byte, needle2: Byte): Int

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.

Definition Classes
Inherited from:
AbstractBuffer
override def bytesBefore(needle: Byte): Int

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.

Definition Classes
Inherited from:
AbstractBuffer
override def bytesBeforeIn(set: Array[Byte]): Int

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

Definition Classes
Inherited from:
AbstractBuffer
override def bytesBeforeInRange(lower: Byte, upper: Byte): Int

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

Definition Classes
Inherited from:
AbstractBuffer
override def capacity: Int

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.

Definition Classes
Inherited from:
AbstractBuffer
override def clean(): AbstractBuffer.this.type

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

Definition Classes
Inherited from:
AbstractBuffer
override def close(): Unit

Close this Buffer

Close this Buffer

Attributes

Definition Classes
Inherited from:
RecyclablePageBuffer
override def closed: Boolean

Check the Buffer is closed.

Check the Buffer is closed.

Attributes

Definition Classes
Inherited from:
RecyclablePageBuffer
override def compact(): 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.

Definition Classes
Inherited from:
AbstractBuffer
override def copyInto(srcPos: Int, dest: Buffer, destPos: Int, length: Int): Unit

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.

BufferReadOnlyException

if the destination buffer is read-only.

IndexOutOfBoundsException

if 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.

NullPointerException

if the destination buffer is null.

Definition Classes
Inherited from:
AbstractBuffer
override def copyInto(srcPos: Int, dest: ByteBuffer, destPos: Int, length: Int): Unit

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.

IndexOutOfBoundsException

if 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.

NullPointerException

if the destination buffer is null.

java.nio.ReadOnlyBufferException

if the destination byte buffer is read-only.

Definition Classes
Inherited from:
AbstractBuffer
override def copyInto(srcPos: Int, dest: Array[Byte], destPos: Int, length: Int): Unit

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.

IndexOutOfBoundsException

if 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.

Definition Classes
Inherited from:
AbstractBuffer
override def ensureWritable(size: Int, minimumGrowth: Int, allowCompaction: Boolean): 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.

IllegalStateException

if this buffer is in a bad state.

Definition Classes
Inherited from:
AbstractBuffer
def ensureWritable(size: Int): 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.

IllegalStateException

if this buffer is in a bad state.

Inherited from:
Buffer
override def fill(value: Byte): 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.

Definition Classes
Inherited from:
AbstractBuffer
final def getBoolean(index: Int): Boolean

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

Returns

The boolean value at the given offset.

Throws
IndexOutOfBoundsException

if the given offset is out of bounds of the buffer, that is, less than 0 or greater than capacity minus java.lang.Byte.BYTES.

Inherited from:
Buffer
override def getByte(index: Int): Byte

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

Returns

The byte value at the given offset.

Throws
IndexOutOfBoundsException

if the given offset is out of bounds of the buffer, that is, less than 0 or greater than capacity minus 1.

Definition Classes
Inherited from:
AbstractBuffer
final def getBytes(index: Int, len: Int): Array[Byte]

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

Returns

The bytes array

Throws
IndexOutOfBoundsException

If the given offset is out of bounds of the buffer, that is, less than 0 or greater than capacity minus java.lang.Float.BYTES.

Inherited from:
Buffer
override def getChar(index: Int): Char

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

Returns

The char value at the given offset.

Throws
IndexOutOfBoundsException

if the given offset is out of bounds of the buffer, that is, less than 0 or greater than capacity minus 2.

Definition Classes
Inherited from:
AbstractBuffer
final def getCharLE(index: Int): Char

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

Returns

The char value at the given offset.

Throws
IndexOutOfBoundsException

if the given offset is out of bounds of the buffer, that is, less than 0 or greater than capacity minus 2.

Inherited from:
Buffer
def getCharSequence(index: Int, len: Int, charset: Charset): CharSequence

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

Returns

CharSequence get from this buffer.

Throws
IndexOutOfBoundsException

If the given offset is out of bounds of the buffer, that is, less than 0 or greater than capacity minus java.lang.Float.BYTES.

Inherited from:
Buffer
override def getDouble(index: Int): Double

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

Returns

The double value at the given offset.

Throws
IndexOutOfBoundsException

if the given offset is out of bounds of the buffer, that is, less than 0 or greater than capacity minus java.lang.Double.BYTES.

Definition Classes
Inherited from:
AbstractBuffer
final def getDoubleLE(index: Int): Double

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

Returns

The double value at the given offset.

Throws
IndexOutOfBoundsException

if the given offset is out of bounds of the buffer, that is, less than 0 or greater than capacity minus java.lang.Double.BYTES.

Inherited from:
Buffer
override def getFloat(index: Int): Float

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

Returns

The float value at the given offset.

Throws
IndexOutOfBoundsException

if the given offset is out of bounds of the buffer, that is, less than 0 or greater than capacity minus java.lang.Float.BYTES.

Definition Classes
Inherited from:
AbstractBuffer
final def getFloatLE(index: Int): Float

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

Returns

The float value at the given offset.

Throws
IndexOutOfBoundsException

if the given offset is out of bounds of the buffer, that is, less than 0 or greater than capacity minus java.lang.Float.BYTES.

Inherited from:
Buffer
override def getInt(index: Int): Int

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

Returns

The int value at the given offset.

Throws
IndexOutOfBoundsException

if the given offset is out of bounds of the buffer, that is, less than 0 or greater than capacity minus java.lang.Integer.BYTES.

Definition Classes
Inherited from:
AbstractBuffer
final def getIntLE(index: Int): Int

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

Returns

The int value at the given offset.

Throws
IndexOutOfBoundsException

if the given offset is out of bounds of the buffer, that is, less than 0 or greater than capacity minus java.lang.Integer.BYTES.

Inherited from:
Buffer
override def getLong(index: Int): Long

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

Returns

The long value at the given offset.

Throws
IndexOutOfBoundsException

if the given offset is out of bounds of the buffer, that is, less than 0 or greater than capacity minus java.lang.Long.BYTES.

Definition Classes
Inherited from:
AbstractBuffer
final def getLongLE(index: Int): Long

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

Returns

The long value at the given offset.

Throws
IndexOutOfBoundsException

if the given offset is out of bounds of the buffer, that is, less than 0 or greater than capacity minus java.lang.Long.BYTES.

Inherited from:
Buffer
override def getMedium(index: Int): Int

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

Returns

The int value at the given offset.

Throws
IndexOutOfBoundsException

if the given offset is out of bounds of the buffer, that is, less than 0 or greater than capacity minus 3.

Definition Classes
Inherited from:
AbstractBuffer
override def getMediumLE(index: Int): Int

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

Returns

The int value at the given offset.

Throws
IndexOutOfBoundsException

if the given offset is out of bounds of the buffer, that is, less than 0 or greater than capacity minus 3.

Definition Classes
Inherited from:
AbstractBuffer
override def getShort(index: Int): Short

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

Returns

The short value at the given offset.

Throws
IndexOutOfBoundsException

if the given offset is out of bounds of the buffer, that is, less than 0 or greater than capacity minus java.lang.Short.BYTES.

Definition Classes
Inherited from:
AbstractBuffer
final def getShortLE(index: Int): Short

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

Returns

The short value at the given offset.

Throws
IndexOutOfBoundsException

if the given offset is out of bounds of the buffer, that is, less than 0 or greater than capacity minus java.lang.Short.BYTES.

Inherited from:
Buffer
override def getStringAsDouble(index: Int, length: Int): Double

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.

Definition Classes
Inherited from:
AbstractBuffer
override def getStringAsLong(index: Int, length: Int, radix: Int): Long

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.

Definition Classes
Inherited from:
AbstractBuffer
override def getUnsignedByte(index: Int): Int

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

Returns

The unsigned byte value at the given offset.

Throws
IndexOutOfBoundsException

if the given offset is out of bounds of the buffer, that is, less than 0 or greater than capacity minus java.lang.Byte.BYTES.

Definition Classes
Inherited from:
AbstractBuffer
override def getUnsignedInt(index: Int): Long

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

Returns

The unsigned int value at the given offset.

Throws
IndexOutOfBoundsException

if the given offset is out of bounds of the buffer, that is, less than 0 or greater than capacity minus java.lang.Integer.BYTES.

Definition Classes
Inherited from:
AbstractBuffer
final def getUnsignedIntLE(index: Int): Long

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

Returns

The unsigned int value at the given offset.

Throws
IndexOutOfBoundsException

if the given offset is out of bounds of the buffer, that is, less than 0 or greater than capacity minus java.lang.Integer.BYTES.

Inherited from:
Buffer
override def getUnsignedMedium(index: Int): Int

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

Returns

The unsigned int value at the given offset.

Throws
IndexOutOfBoundsException

if the given offset is out of bounds of the buffer, that is, less than 0 or greater than capacity minus 3.

Definition Classes
Inherited from:
AbstractBuffer
override def getUnsignedMediumLE(index: Int): Int

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

Returns

The unsigned int value at the given offset.

Throws
IndexOutOfBoundsException

if the given offset is out of bounds of the buffer, that is, less than 0 or greater than capacity minus 3.

Definition Classes
Inherited from:
AbstractBuffer
override def getUnsignedShort(index: Int): Int

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

Returns

The unsigned short value at the given offset.

Throws
IndexOutOfBoundsException

if the given offset is out of bounds of the buffer, that is, less than 0 or greater than capacity minus java.lang.Short.BYTES.

Definition Classes
Inherited from:
AbstractBuffer
final def getUnsignedShortLE(index: Int): Int

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

Returns

The unsigned short value at the given offset.

Throws
IndexOutOfBoundsException

if the given offset is out of bounds of the buffer, that is, less than 0 or greater than capacity minus java.lang.Short.BYTES.

Inherited from:
Buffer
override def indexAre(bytes: Array[Byte], index: Int): Boolean

Check the bytes at index is the gaven bytes.

Check the bytes at index is the gaven bytes.

Attributes

Definition Classes
Inherited from:
AbstractBuffer
override def indexIn(bytes: Array[Byte], index: Int): Boolean

Check the byte at index is in the gaven bytes

Check the byte at index is in the gaven bytes

Attributes

Definition Classes
Inherited from:
AbstractBuffer
override def indexInRange(lower: Byte, upper: Byte, index: Int): Boolean

Check the byte at index is in the gaven byte range

Check the byte at index is in the gaven byte range

Attributes

Definition Classes
Inherited from:
AbstractBuffer
override def indexIs(byte: Byte, index: Int): Boolean

Check the byte at index is the gaven byte

Check the byte at index is the gaven byte

Attributes

Definition Classes
Inherited from:
AbstractBuffer

Attributes

Inherited from:
RecyclablePageBuffer
override def nextAre(bytes: Array[Byte]): Boolean

Check the next readable bytes is the gaven bytes

Check the next readable bytes is the gaven bytes

Attributes

Definition Classes
Inherited from:
AbstractBuffer
override def nextIn(bytes: Array[Byte]): Boolean

Check the next readable byte is in the gaven bytes

Check the next readable byte is in the gaven bytes

Attributes

Definition Classes
Inherited from:
AbstractBuffer
override def nextInRange(lower: Byte, upper: Byte): Boolean

Check the next readable byte is in the gaven byte range

Check the next readable byte is in the gaven byte range

Attributes

Definition Classes
Inherited from:
AbstractBuffer
override def nextIs(byte: Byte): Boolean

Check the next readable byte is the gaven byte

Check the next readable byte is the gaven byte

Attributes

Definition Classes
Inherited from:
AbstractBuffer
def next_=(pageBuffer: RecyclablePageBuffer): Unit

Attributes

Inherited from:
RecyclablePageBuffer
override def openCursor(fromOffset: Int, length: Int): ByteCursor

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.

IllegalArgumentException

if the length is negative, or if the region given by the fromOffset and the length reaches outside the bounds of this buffer.

Definition Classes
Inherited from:
AbstractBuffer
final def openCursor(): ByteCursor

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.

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
override def openReverseCursor(fromOffset: Int, length: Int): ByteCursor

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.

Definition Classes
Inherited from:
AbstractBuffer

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.

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
final def readBoolean: Boolean

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
override def readByte: Byte

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.

Definition Classes
Inherited from:
AbstractBuffer
override def readBytes(destination: Buffer, length: Int): 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.

Definition Classes
Inherited from:
AbstractBuffer
override def readBytes(destination: Array[Byte], destPos: Int, length: Int): 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.

Definition Classes
Inherited from:
AbstractBuffer
override def readBytes(destination: ByteBuffer, length: Int): 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.

Definition Classes
Inherited from:
AbstractBuffer
final def readBytes(destination: Buffer): 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
final def readBytes(destination: Array[Byte]): 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
final def readBytes(destination: ByteBuffer): 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
override def readChar: Char

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.

Definition Classes
Inherited from:
AbstractBuffer
final def readCharLE: Char

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
override def readCharSequence(length: Int, charset: Charset): CharSequence

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.

Definition Classes
Inherited from:
AbstractBuffer
def readCharSequence(length: Int): CharSequence

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
override def readDouble: Double

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.

Definition Classes
Inherited from:
AbstractBuffer
final def readDoubleLE: Double

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
override def readFloat: Float

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.

Definition Classes
Inherited from:
AbstractBuffer
final def readFloatLE: Float

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
override def readInt: Int

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.

Definition Classes
Inherited from:
AbstractBuffer
final def readIntLE: Int

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
override def readLong: Long

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.

Definition Classes
Inherited from:
AbstractBuffer
final def readLongLE: Long

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
override def readMedium: Int

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.

Definition Classes
Inherited from:
AbstractBuffer
override def readMediumLE: Int

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.

Definition Classes
Inherited from:
AbstractBuffer
override def readShort: Short

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.

Definition Classes
Inherited from:
AbstractBuffer
final def readShortLE: Short

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
override def readStringAsDouble(length: Int): Double

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.

Definition Classes
Inherited from:
AbstractBuffer
override def readStringAsLong(length: Int, radix: Int): Long

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.

Definition Classes
Inherited from:
AbstractBuffer
override def readUnsignedByte: Int

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.

Definition Classes
Inherited from:
AbstractBuffer
override def readUnsignedInt: Long

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.

Definition Classes
Inherited from:
AbstractBuffer
final def readUnsignedIntLE: Long

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
override def readUnsignedMedium: Int

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.

Definition Classes
Inherited from:
AbstractBuffer
override def readUnsignedMediumLE: Int

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.

Definition Classes
Inherited from:
AbstractBuffer
override def readUnsignedShort: Int

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.

Definition Classes
Inherited from:
AbstractBuffer
final def readUnsignedShortLE: Int

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
final override def readableBytes: Int

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

Definition Classes
Inherited from:
AbstractBuffer
override def readerOffset(offset: Int): 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.

IndexOutOfBoundsException

if the specified offset is less than zero or greater than the current writerOffset.

Definition Classes
Inherited from:
AbstractBuffer
override def readerOffset: Int

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.

Definition Classes
Inherited from:
AbstractBuffer

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
def setAllocator(allocator: PooledPageAllocator): Unit

Attributes

Inherited from:
RecyclablePageBuffer
final def setBoolean(index: Int, value: Boolean): 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

Returns

This Buffer.

Throws
IndexOutOfBoundsException

if the given offset is out of bounds of the buffer, that is, less than 0 or greater than capacity minus java.lang.Byte.BYTES.

Inherited from:
Buffer
override def setByte(index: Int, value: Byte): Buffer

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

Returns

This Buffer.

Throws
IndexOutOfBoundsException

if the given offset is out of bounds of the buffer, that is, less than 0 or greater than capacity minus java.lang.Byte.BYTES.

Definition Classes
Inherited from:
AbstractBuffer
override def setBytes(index: Int, source: Array[Byte], srcPos: Int, length: Int): Buffer

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

Returns

This Buffer.

Throws
IndexOutOfBoundsException

if the given offset is out of bounds of the buffer, that is, less than 0 or greater than capacity minus java.lang.Double.BYTES.

Definition Classes
Inherited from:
AbstractBuffer
final def setBytes(index: Int, source: Array[Byte]): Buffer

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

Returns

This Buffer.

Throws
IndexOutOfBoundsException

if the given offset is out of bounds of the buffer, that is, less than 0 or greater than capacity minus java.lang.Double.BYTES.

Inherited from:
Buffer
override def setChar(index: Int, value: Char): Buffer

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

Returns

This Buffer.

Throws
IndexOutOfBoundsException

if the given offset is out of bounds of the buffer, that is, less than 0 or greater than capacity minus 2.

Definition Classes
Inherited from:
AbstractBuffer
final def setCharLE(index: Int, value: Char): Buffer

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

Returns

This Buffer.

Throws
IndexOutOfBoundsException

if the given offset is out of bounds of the buffer, that is, less than 0 or greater than capacity minus 2.

Inherited from:
Buffer
final def setCharSequence(index: Int, source: CharSequence, charset: Charset): 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
final def setCharSequence(index: Int, source: CharSequence): 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
override def setDouble(index: Int, value: Double): 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

Returns

This Buffer.

Throws
IndexOutOfBoundsException

if the given offset is out of bounds of the buffer, that is, less than 0 or greater than capacity minus java.lang.Double.BYTES.

Definition Classes
Inherited from:
AbstractBuffer
final def setDoubleLE(index: Int, value: Double): 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.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

Returns

This Buffer.

Throws
IndexOutOfBoundsException

if the given offset is out of bounds of the buffer, that is, less than 0 or greater than capacity minus java.lang.Double.BYTES.

Inherited from:
Buffer
override def setFloat(index: Int, value: Float): Buffer

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

Returns

This Buffer.

Throws
IndexOutOfBoundsException

if the given offset is out of bounds of the buffer, that is, less than 0 or greater than capacity minus java.lang.Float.BYTES.

Definition Classes
Inherited from:
AbstractBuffer
def setFloatLE(index: Int, value: Float): Buffer

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

Returns

This Buffer.

Throws
IndexOutOfBoundsException

if the given offset is out of bounds of the buffer, that is, less than 0 or greater than capacity minus java.lang.Float.BYTES.

Inherited from:
Buffer
override def setInt(index: Int, value: Int): Buffer

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

Returns

This Buffer.

Throws
IndexOutOfBoundsException

if the given offset is out of bounds of the buffer, that is, less than 0 or greater than capacity minus java.lang.Integer.BYTES.

Definition Classes
Inherited from:
AbstractBuffer
final def setIntLE(index: Int, value: Int): Buffer

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

Returns

This Buffer.

Throws
IndexOutOfBoundsException

if the given offset is out of bounds of the buffer, that is, less than 0 or greater than capacity minus java.lang.Integer.BYTES.

Inherited from:
Buffer
override def setLong(index: Int, value: Long): Buffer

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

Returns

This Buffer.

Throws
IndexOutOfBoundsException

if the given offset is out of bounds of the buffer, that is, less than 0 or greater than capacity minus java.lang.Long.BYTES.

Definition Classes
Inherited from:
AbstractBuffer
def setLongLE(index: Int, value: Long): Buffer

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

Returns

This Buffer.

Throws
IndexOutOfBoundsException

if the given offset is out of bounds of the buffer, that is, less than 0 or greater than capacity minus java.lang.Long.BYTES.

Inherited from:
Buffer
override def setMedium(index: Int, value: Int): Buffer

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

Returns

This Buffer.

Throws
IndexOutOfBoundsException

if the given offset is out of bounds of the buffer, that is, less than 0 or greater than capacity minus 3.

Definition Classes
Inherited from:
AbstractBuffer
override def setMediumLE(index: Int, value: Int): Buffer

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

Returns

This Buffer.

Throws
IndexOutOfBoundsException

if the given offset is out of bounds of the buffer, that is, less than 0 or greater than capacity minus 3.

Definition Classes
Inherited from:
AbstractBuffer
override def setShort(index: Int, value: Short): Buffer

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

Returns

This Buffer.

Throws
IndexOutOfBoundsException

if the given offset is out of bounds of the buffer, that is, less than 0 or greater than capacity minus java.lang.Short.BYTES.

Definition Classes
Inherited from:
AbstractBuffer
final def setShortLE(index: Int, value: Short): Buffer

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

Returns

This Buffer.

Throws
IndexOutOfBoundsException

if the given offset is out of bounds of the buffer, that is, less than 0 or greater than capacity minus java.lang.Short.BYTES.

Inherited from:
Buffer
override def setUnsignedByte(index: Int, value: Int): Buffer

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

Returns

This Buffer.

Throws
IndexOutOfBoundsException

if the given offset is out of bounds of the buffer, that is, less than 0 or greater than capacity minus java.lang.Byte.BYTES.

Definition Classes
Inherited from:
AbstractBuffer
override def setUnsignedInt(index: Int, value: Long): Buffer

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

Returns

This Buffer.

Throws
IndexOutOfBoundsException

if the given offset is out of bounds of the buffer, that is, less than 0 or greater than capacity minus java.lang.Integer.BYTES.

Definition Classes
Inherited from:
AbstractBuffer
def setUnsignedIntLE(index: Int, value: Long): Buffer

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

Returns

This Buffer.

Throws
IndexOutOfBoundsException

if the given offset is out of bounds of the buffer, that is, less than 0 or greater than capacity minus java.lang.Integer.BYTES.

Inherited from:
Buffer
override def setUnsignedMedium(index: Int, value: Int): Buffer

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

Returns

This Buffer.

Throws
IndexOutOfBoundsException

if the given offset is out of bounds of the buffer, that is, less than 0 or greater than capacity minus 3.

Definition Classes
Inherited from:
AbstractBuffer
override def setUnsignedMediumLE(index: Int, value: Int): Buffer

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

Returns

This Buffer.

Throws
IndexOutOfBoundsException

if the given offset is out of bounds of the buffer, that is, less than 0 or greater than capacity minus 3.

Definition Classes
Inherited from:
AbstractBuffer
override def setUnsignedShort(index: Int, value: Int): Buffer

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

Returns

This Buffer.

Throws
IndexOutOfBoundsException

if the given offset is out of bounds of the buffer, that is, less than 0 or greater than capacity minus java.lang.Short.BYTES.

Definition Classes
Inherited from:
AbstractBuffer
final def setUnsignedShortLE(index: Int, value: Int): Buffer

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

Returns

This Buffer.

Throws
IndexOutOfBoundsException

if the given offset is out of bounds of the buffer, that is, less than 0 or greater than capacity minus java.lang.Short.BYTES.

Inherited from:
Buffer
override def skipIfNextAre(bytes: Array[Byte]): Boolean

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

Definition Classes
Inherited from:
AbstractBuffer
override def skipIfNextIgnoreCaseAre(bytes: Array[Byte]): Boolean

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

Definition Classes
Inherited from:
AbstractBuffer
override def skipIfNextIn(set: Array[Byte]): Boolean

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

Definition Classes
Inherited from:
AbstractBuffer
override def skipIfNextInRange(lower: Byte, upper: Byte): Boolean

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

Definition Classes
Inherited from:
AbstractBuffer
override def skipIfNextIs(byte: Byte): Boolean

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

Definition Classes
Inherited from:
AbstractBuffer
def skipReadableBytes(delta: Int): 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.

IllegalArgumentException

if the given delta is negative.

IndexOutOfBoundsException

if the new reader offset is greater than the current writerOffset.

Inherited from:
Buffer
def skipWritableBytes(delta: Int): 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.

IllegalArgumentException

if the given delta is negative.

IndexOutOfBoundsException

if the new writer offset is greater than capacity.

Inherited from:
Buffer
override def toString: String

Returns a string representation of the object.

Returns a string representation of the object.

The default representation is platform dependent.

Attributes

Returns

a string representation of the object.

Definition Classes
Inherited from:
AbstractBuffer
override def transferFrom(channel: ReadableByteChannel, length: Int): Int

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.

Definition Classes
Inherited from:
RecyclablePageBuffer
override def transferFrom(channel: FileChannel, position: Long, length: Int): Int

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.

Definition Classes
Inherited from:
AbstractBuffer
override def transferTo(channel: WritableByteChannel, length: Int): Int

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.

Definition Classes
Inherited from:
AbstractBuffer
def writableBytes: Int

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
final def writeBoolean(value: Boolean): 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
override def writeByte(value: Byte): 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.

Definition Classes
Inherited from:
AbstractBuffer
override def writeBytes(source: ByteBuffer, length: Int): 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.

Definition Classes
Inherited from:
AbstractBuffer
override def writeBytes(length: Int, value: Byte): 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.

Definition Classes
Inherited from:
AbstractBuffer
override def writeBytes(source: Array[Byte], srcPos: Int, length: Int): 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.

Definition Classes
Inherited from:
AbstractBuffer
override def writeBytes(source: Buffer, length: Int): 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.

Definition Classes
Inherited from:
AbstractBuffer
final def writeBytes(source: ByteBuffer): 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
final def writeBytes(source: Array[Byte]): 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
final def writeBytes(source: Buffer): 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
override def writeChar(value: Char): 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.

Definition Classes
Inherited from:
AbstractBuffer
final def writeCharLE(value: Char): 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
override def writeCharSequence(source: CharSequence, charset: Charset): 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.

Definition Classes
Inherited from:
AbstractBuffer
final def writeCharSequence(source: CharSequence): 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
override def writeDouble(value: Double): 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.

Definition Classes
Inherited from:
AbstractBuffer
final def writeDoubleLE(value: Double): 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
override def writeFloat(value: Float): 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.

Definition Classes
Inherited from:
AbstractBuffer
final def writeFloatLE(value: Float): 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
override def writeInt(value: Int): 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.

Definition Classes
Inherited from:
AbstractBuffer
final def writeIntLE(value: Int): 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
override def writeLong(value: Long): 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.

Definition Classes
Inherited from:
AbstractBuffer
final def writeLongLE(value: Long): 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
override def writeMedium(value: Int): 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.

Definition Classes
Inherited from:
AbstractBuffer
override def writeMediumLE(value: Int): 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.

Definition Classes
Inherited from:
AbstractBuffer
override def writeShort(value: Short): 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.

Definition Classes
Inherited from:
AbstractBuffer
final def writeShortLE(value: Short): 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
override def writeUnsignedByte(value: Int): 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.

Definition Classes
Inherited from:
AbstractBuffer
override def writeUnsignedInt(value: Long): 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.

Definition Classes
Inherited from:
AbstractBuffer
final def writeUnsignedIntLE(value: Long): 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
override def writeUnsignedMedium(value: Int): 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.

Definition Classes
Inherited from:
AbstractBuffer
override def writeUnsignedMediumLE(value: Int): 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.

Definition Classes
Inherited from:
AbstractBuffer
override def writeUnsignedShort(value: Int): 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.

Definition Classes
Inherited from:
AbstractBuffer
final def writeUnsignedShortLE(value: Int): 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
override def writerOffset(offset: Int): 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.

IndexOutOfBoundsException

if the specified offset is less than the current readerOffset or greater than capacity.

Definition Classes
Inherited from:
AbstractBuffer
override def writerOffset: Int

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.

Definition Classes
Inherited from:
AbstractBuffer