-
- All Known Subinterfaces:
Buffer
,CompositeBuffer
- All Known Implementing Classes:
AdaptableBuffer
,BufferStub
public interface BufferAccessor
This interface is just the primitive data accessor methods thatBuffer
exposes. It can be useful if you only need the data access methods, and perhaps wish to decorate or modify their behaviour. Usually, you'd use theBuffer
interface directly, since this lets you properly control the buffer life cycle.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default boolean
getBoolean(int roff)
Get the boolean value at the given reader offset.byte
getByte(int roff)
Get the byte value at the given reader offset.char
getChar(int roff)
Get the char value at the given reader offset.double
getDouble(int roff)
Get the double value at the given reader offset.float
getFloat(int roff)
Get the float value at the given reader offset.int
getInt(int roff)
Get the int value at the given reader offset.long
getLong(int roff)
Get the long value at the given reader offset.int
getMedium(int roff)
Get the int value at the given reader offset.short
getShort(int roff)
Get the short value at the given reader offset.int
getUnsignedByte(int roff)
Get the unsigned byte value at the given reader offset.long
getUnsignedInt(int roff)
Get the unsigned int value at the given reader offset.int
getUnsignedMedium(int roff)
Get the unsigned int value at the given reader offset.int
getUnsignedShort(int roff)
Get the unsigned short value at the given reader offset.default boolean
readBoolean()
Read the boolean value at the currentBuffer.readerOffset()
, and increases the reader offset byByte.BYTES
.byte
readByte()
Read the byte value at the currentBuffer.readerOffset()
, and increases the reader offset byByte.BYTES
.char
readChar()
Read the char value at the currentBuffer.readerOffset()
, and increases the reader offset by 2.double
readDouble()
Read the double value at the currentBuffer.readerOffset()
, and increases the reader offset byDouble.BYTES
.float
readFloat()
Read the float value at the currentBuffer.readerOffset()
, and increases the reader offset byFloat.BYTES
.int
readInt()
Read the int value at the currentBuffer.readerOffset()
, and increases the reader offset byInteger.BYTES
.long
readLong()
Read the long value at the currentBuffer.readerOffset()
, and increases the reader offset byLong.BYTES
.int
readMedium()
Read the int value at the currentBuffer.readerOffset()
, and increases the reader offset by 3.short
readShort()
Read the short value at the currentBuffer.readerOffset()
, and increases the reader offset byShort.BYTES
.int
readUnsignedByte()
Read the unsigned byte value at the currentBuffer.readerOffset()
, and increases the reader offset byByte.BYTES
.long
readUnsignedInt()
Read the unsigned int value at the currentBuffer.readerOffset()
, and increases the reader offset byInteger.BYTES
.int
readUnsignedMedium()
Read the unsigned int value at the currentBuffer.readerOffset()
, and increases the reader offset by 3.int
readUnsignedShort()
Read the unsigned short value at the currentBuffer.readerOffset()
, and increases the reader offset byShort.BYTES
.default Buffer
setBoolean(int woff, boolean value)
Set the given boolean value at the given write offset.Buffer
setByte(int woff, byte value)
Set the given byte value at the given write offset.Buffer
setChar(int woff, char value)
Set the given char value at the given write offset.Buffer
setDouble(int woff, double value)
Set the given double value at the given write offset.Buffer
setFloat(int woff, float value)
Set the given float value at the given write offset.Buffer
setInt(int woff, int value)
Set the given int value at the given write offset.Buffer
setLong(int woff, long value)
Set the given long value at the given write offset.Buffer
setMedium(int woff, int value)
Set the given int value at the given write offset.Buffer
setShort(int woff, short value)
Set the given short value at the given write offset.Buffer
setUnsignedByte(int woff, int value)
Set the given unsigned byte value at the given write offset.Buffer
setUnsignedInt(int woff, long value)
Set the given unsigned int value at the given write offset.Buffer
setUnsignedMedium(int woff, int value)
Set the given unsigned int value at the given write offset.Buffer
setUnsignedShort(int woff, int value)
Set the given unsigned short value at the given write offset.default Buffer
writeBoolean(boolean value)
Write the given boolean value at the currentBuffer.writerOffset()
, and increase the writer offset byByte.BYTES
.Buffer
writeByte(byte value)
Write the given byte value at the currentBuffer.writerOffset()
, and increase the writer offset byByte.BYTES
.Buffer
writeChar(char value)
Write the given char value at the currentBuffer.writerOffset()
, and increase the writer offset by 2.Buffer
writeDouble(double value)
Write the given double value at the currentBuffer.writerOffset()
, and increase the writer offset byDouble.BYTES
.Buffer
writeFloat(float value)
Write the given float value at the currentBuffer.writerOffset()
, and increase the writer offset byFloat.BYTES
.Buffer
writeInt(int value)
Write the given int value at the currentBuffer.writerOffset()
, and increase the writer offset byInteger.BYTES
.Buffer
writeLong(long value)
Write the given long value at the currentBuffer.writerOffset()
, and increase the writer offset byLong.BYTES
.Buffer
writeMedium(int value)
Write the given int value at the currentBuffer.writerOffset()
, and increase the writer offset by 3.Buffer
writeShort(short value)
Write the given short value at the currentBuffer.writerOffset()
, and increase the writer offset byShort.BYTES
.Buffer
writeUnsignedByte(int value)
Write the given unsigned byte value at the currentBuffer.writerOffset()
, and increase the writer offset byByte.BYTES
.Buffer
writeUnsignedInt(long value)
Write the given unsigned int value at the currentBuffer.writerOffset()
, and increase the writer offset byInteger.BYTES
.Buffer
writeUnsignedMedium(int value)
Write the given unsigned int value at the currentBuffer.writerOffset()
, and increase the writer offset by 3.Buffer
writeUnsignedShort(int value)
Write the given unsigned short value at the currentBuffer.writerOffset()
, and increase the writer offset byShort.BYTES
.
-
-
-
Method Detail
-
readBoolean
default boolean readBoolean()
Read the boolean value at the currentBuffer.readerOffset()
, and increases the reader offset byByte.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 valuetrue
, zero representsfalse
.- Returns:
- The boolean value at the current reader offset.
- Throws:
IndexOutOfBoundsException
- IfBuffer.readableBytes()
is less thanByte.BYTES
.
-
getBoolean
default boolean getBoolean(int roff)
Get the boolean value at the given reader offset. TheBuffer.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 valuetrue
, zero representsfalse
.- Parameters:
roff
- The read offset, an absolute offset into this buffer, to read from.- 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 thanBuffer.capacity()
minusByte.BYTES
.
-
writeBoolean
default Buffer writeBoolean(boolean value)
Write the given boolean value at the currentBuffer.writerOffset()
, and increase the writer offset byByte.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 valuetrue
, zero representsfalse
.- Parameters:
value
- The boolean value to write.- Returns:
- This Buffer.
- Throws:
IndexOutOfBoundsException
- IfBuffer.writableBytes()
is less thanByte.BYTES
, and the buffer capacity cannot be automatically increased.
-
setBoolean
default Buffer setBoolean(int woff, boolean value)
Set the given boolean value at the given write offset. TheBuffer.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 valuetrue
, zero representsfalse
.- Parameters:
woff
- The write offset, an absolute offset into this buffer to write to.value
- The boolean value to write.- Returns:
- This Buffer.
- Throws:
IndexOutOfBoundsException
- if the given offset is out of bounds of the buffer, that is, less than 0 or greater thanBuffer.capacity()
minusByte.BYTES
.
-
readByte
byte readByte()
Read the byte value at the currentBuffer.readerOffset()
, and increases the reader offset byByte.BYTES
. The value is read using a two's complement 8-bit encoding, inByteOrder.BIG_ENDIAN
byte order.- Returns:
- The byte value at the current reader offset.
- Throws:
IndexOutOfBoundsException
- IfBuffer.readableBytes()
is less thanByte.BYTES
.
-
getByte
byte getByte(int roff)
Get the byte value at the given reader offset. TheBuffer.readerOffset()
is not modified. The value is read using a two's complement 8-bit encoding, inByteOrder.BIG_ENDIAN
byte order.- Parameters:
roff
- The read offset, an absolute offset into this buffer, to read from.- 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 thanBuffer.capacity()
minusByte.BYTES
.
-
readUnsignedByte
int readUnsignedByte()
Read the unsigned byte value at the currentBuffer.readerOffset()
, and increases the reader offset byByte.BYTES
. The value is read using an unsigned two's complement 8-bit encoding, inByteOrder.BIG_ENDIAN
byte order.- Returns:
- The unsigned byte value at the current reader offset.
- Throws:
IndexOutOfBoundsException
- IfBuffer.readableBytes()
is less thanByte.BYTES
.
-
getUnsignedByte
int getUnsignedByte(int roff)
Get the unsigned byte value at the given reader offset. TheBuffer.readerOffset()
is not modified. The value is read using an unsigned two's complement 8-bit encoding, inByteOrder.BIG_ENDIAN
byte order.- Parameters:
roff
- The read offset, an absolute offset into this buffer, to read from.- 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 thanBuffer.capacity()
minusByte.BYTES
.
-
writeByte
Buffer writeByte(byte value)
Write the given byte value at the currentBuffer.writerOffset()
, and increase the writer offset byByte.BYTES
. The value is written using a two's complement 8-bit encoding, inByteOrder.BIG_ENDIAN
byte order.- Parameters:
value
- The byte value to write.- Returns:
- This Buffer.
- Throws:
IndexOutOfBoundsException
- IfBuffer.writableBytes()
is less thanByte.BYTES
, and the buffer capacity cannot be automatically increased.
-
setByte
Buffer setByte(int woff, byte value)
Set the given byte value at the given write offset. TheBuffer.writerOffset()
is not modified. The value is written using a two's complement 8-bit encoding, inByteOrder.BIG_ENDIAN
byte order.- Parameters:
woff
- The write offset, an absolute offset into this buffer to write to.value
- The byte value to write.- Returns:
- This Buffer.
- Throws:
IndexOutOfBoundsException
- if the given offset is out of bounds of the buffer, that is, less than 0 or greater thanBuffer.capacity()
minusByte.BYTES
.
-
writeUnsignedByte
Buffer writeUnsignedByte(int value)
Write the given unsigned byte value at the currentBuffer.writerOffset()
, and increase the writer offset byByte.BYTES
. The value is written using an unsigned two's complement 8-bit encoding, inByteOrder.BIG_ENDIAN
byte order.- Parameters:
value
- The int value to write.- Returns:
- This Buffer.
- Throws:
IndexOutOfBoundsException
- IfBuffer.writableBytes()
is less thanByte.BYTES
, and the buffer capacity cannot be automatically increased.
-
setUnsignedByte
Buffer setUnsignedByte(int woff, int value)
Set the given unsigned byte value at the given write offset. TheBuffer.writerOffset()
is not modified. The value is written using an unsigned two's complement 8-bit encoding, inByteOrder.BIG_ENDIAN
byte order.- Parameters:
woff
- The write offset, an absolute offset into this buffer to write to.value
- The int value to write.- Returns:
- This Buffer.
- Throws:
IndexOutOfBoundsException
- if the given offset is out of bounds of the buffer, that is, less than 0 or greater thanBuffer.capacity()
minusByte.BYTES
.
-
readChar
char readChar()
Read the char value at the currentBuffer.readerOffset()
, and increases the reader offset by 2. The value is read using a 2-byte UTF-16 encoding, inByteOrder.BIG_ENDIAN
byte order.- Returns:
- The char value at the current reader offset.
- Throws:
IndexOutOfBoundsException
- IfBuffer.readableBytes()
is less than 2.
-
getChar
char getChar(int roff)
Get the char value at the given reader offset. TheBuffer.readerOffset()
is not modified. The value is read using a 2-byte UTF-16 encoding, inByteOrder.BIG_ENDIAN
byte order.- Parameters:
roff
- The read offset, an absolute offset into this buffer, to read from.- 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 thanBuffer.capacity()
minus 2.
-
writeChar
Buffer writeChar(char value)
Write the given char value at the currentBuffer.writerOffset()
, and increase the writer offset by 2. The value is written using a 2-byte UTF-16 encoding, inByteOrder.BIG_ENDIAN
byte order.- Parameters:
value
- The char value to write.- Returns:
- This Buffer.
- Throws:
IndexOutOfBoundsException
- IfBuffer.writableBytes()
is less than 2, and the buffer capacity cannot be automatically increased.
-
setChar
Buffer setChar(int woff, char value)
Set the given char value at the given write offset. TheBuffer.writerOffset()
is not modified. The value is written using a 2-byte UTF-16 encoding, inByteOrder.BIG_ENDIAN
byte order.- Parameters:
woff
- The write offset, an absolute offset into this buffer to write to.value
- The char value to write.- Returns:
- This Buffer.
- Throws:
IndexOutOfBoundsException
- if the given offset is out of bounds of the buffer, that is, less than 0 or greater thanBuffer.capacity()
minus 2.
-
readShort
short readShort()
Read the short value at the currentBuffer.readerOffset()
, and increases the reader offset byShort.BYTES
. The value is read using a two's complement 16-bit encoding, inByteOrder.BIG_ENDIAN
byte order.- Returns:
- The short value at the current reader offset.
- Throws:
IndexOutOfBoundsException
- IfBuffer.readableBytes()
is less thanShort.BYTES
.
-
getShort
short getShort(int roff)
Get the short value at the given reader offset. TheBuffer.readerOffset()
is not modified. The value is read using a two's complement 16-bit encoding, inByteOrder.BIG_ENDIAN
byte order.- Parameters:
roff
- The read offset, an absolute offset into this buffer, to read from.- 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 thanBuffer.capacity()
minusShort.BYTES
.
-
readUnsignedShort
int readUnsignedShort()
Read the unsigned short value at the currentBuffer.readerOffset()
, and increases the reader offset byShort.BYTES
. The value is read using an unsigned two's complement 16-bit encoding, inByteOrder.BIG_ENDIAN
byte order.- Returns:
- The unsigned short value at the current reader offset.
- Throws:
IndexOutOfBoundsException
- IfBuffer.readableBytes()
is less thanShort.BYTES
.
-
getUnsignedShort
int getUnsignedShort(int roff)
Get the unsigned short value at the given reader offset. TheBuffer.readerOffset()
is not modified. The value is read using an unsigned two's complement 16-bit encoding, inByteOrder.BIG_ENDIAN
byte order.- Parameters:
roff
- The read offset, an absolute offset into this buffer, to read from.- 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 thanBuffer.capacity()
minusShort.BYTES
.
-
writeShort
Buffer writeShort(short value)
Write the given short value at the currentBuffer.writerOffset()
, and increase the writer offset byShort.BYTES
. The value is written using a two's complement 16-bit encoding, inByteOrder.BIG_ENDIAN
byte order.- Parameters:
value
- The short value to write.- Returns:
- This Buffer.
- Throws:
IndexOutOfBoundsException
- IfBuffer.writableBytes()
is less thanShort.BYTES
, and the buffer capacity cannot be automatically increased.
-
setShort
Buffer setShort(int woff, short value)
Set the given short value at the given write offset. TheBuffer.writerOffset()
is not modified. The value is written using a two's complement 16-bit encoding, inByteOrder.BIG_ENDIAN
byte order.- Parameters:
woff
- The write offset, an absolute offset into this buffer to write to.value
- The short value to write.- Returns:
- This Buffer.
- Throws:
IndexOutOfBoundsException
- if the given offset is out of bounds of the buffer, that is, less than 0 or greater thanBuffer.capacity()
minusShort.BYTES
.
-
writeUnsignedShort
Buffer writeUnsignedShort(int value)
Write the given unsigned short value at the currentBuffer.writerOffset()
, and increase the writer offset byShort.BYTES
. The value is written using an unsigned two's complement 16-bit encoding, inByteOrder.BIG_ENDIAN
byte order.- Parameters:
value
- The int value to write.- Returns:
- This Buffer.
- Throws:
IndexOutOfBoundsException
- IfBuffer.writableBytes()
is less thanShort.BYTES
, and the buffer capacity cannot be automatically increased.
-
setUnsignedShort
Buffer setUnsignedShort(int woff, int value)
Set the given unsigned short value at the given write offset. TheBuffer.writerOffset()
is not modified. The value is written using an unsigned two's complement 16-bit encoding, inByteOrder.BIG_ENDIAN
byte order.- Parameters:
woff
- The write offset, an absolute offset into this buffer to write to.value
- The int value to write.- Returns:
- This Buffer.
- Throws:
IndexOutOfBoundsException
- if the given offset is out of bounds of the buffer, that is, less than 0 or greater thanBuffer.capacity()
minusShort.BYTES
.
-
readMedium
int readMedium()
Read the int value at the currentBuffer.readerOffset()
, and increases the reader offset by 3. The value is read using a two's complement 24-bit encoding, inByteOrder.BIG_ENDIAN
byte order.- Returns:
- The int value at the current reader offset.
- Throws:
IndexOutOfBoundsException
- IfBuffer.readableBytes()
is less than 3.
-
getMedium
int getMedium(int roff)
Get the int value at the given reader offset. TheBuffer.readerOffset()
is not modified. The value is read using a two's complement 24-bit encoding, inByteOrder.BIG_ENDIAN
byte order.- Parameters:
roff
- The read offset, an absolute offset into this buffer, to read from.- 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 thanBuffer.capacity()
minus 3.
-
readUnsignedMedium
int readUnsignedMedium()
Read the unsigned int value at the currentBuffer.readerOffset()
, and increases the reader offset by 3. The value is read using an unsigned two's complement 24-bit encoding, inByteOrder.BIG_ENDIAN
byte order.- Returns:
- The unsigned int value at the current reader offset.
- Throws:
IndexOutOfBoundsException
- IfBuffer.readableBytes()
is less than 3.
-
getUnsignedMedium
int getUnsignedMedium(int roff)
Get the unsigned int value at the given reader offset. TheBuffer.readerOffset()
is not modified. The value is read using an unsigned two's complement 24-bit encoding, inByteOrder.BIG_ENDIAN
byte order.- Parameters:
roff
- The read offset, an absolute offset into this buffer, to read from.- 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 thanBuffer.capacity()
minus 3.
-
writeMedium
Buffer writeMedium(int value)
Write the given int value at the currentBuffer.writerOffset()
, and increase the writer offset by 3. The value is written using a two's complement 24-bit encoding, inByteOrder.BIG_ENDIAN
byte order.- Parameters:
value
- The int value to write.- Returns:
- This Buffer.
- Throws:
IndexOutOfBoundsException
- IfBuffer.writableBytes()
is less than 3, and the buffer capacity cannot be automatically increased.
-
setMedium
Buffer setMedium(int woff, int value)
Set the given int value at the given write offset. TheBuffer.writerOffset()
is not modified. The value is written using a two's complement 24-bit encoding, inByteOrder.BIG_ENDIAN
byte order.- Parameters:
woff
- The write offset, an absolute offset into this buffer to write to.value
- The int value to write.- Returns:
- This Buffer.
- Throws:
IndexOutOfBoundsException
- if the given offset is out of bounds of the buffer, that is, less than 0 or greater thanBuffer.capacity()
minus 3.
-
writeUnsignedMedium
Buffer writeUnsignedMedium(int value)
Write the given unsigned int value at the currentBuffer.writerOffset()
, and increase the writer offset by 3. The value is written using an unsigned two's complement 24-bit encoding, inByteOrder.BIG_ENDIAN
byte order.- Parameters:
value
- The int value to write.- Returns:
- This Buffer.
- Throws:
IndexOutOfBoundsException
- IfBuffer.writableBytes()
is less than 3, and the buffer capacity cannot be automatically increased.
-
setUnsignedMedium
Buffer setUnsignedMedium(int woff, int value)
Set the given unsigned int value at the given write offset. TheBuffer.writerOffset()
is not modified. The value is written using an unsigned two's complement 24-bit encoding, inByteOrder.BIG_ENDIAN
byte order.- Parameters:
woff
- The write offset, an absolute offset into this buffer to write to.value
- The int value to write.- Returns:
- This Buffer.
- Throws:
IndexOutOfBoundsException
- if the given offset is out of bounds of the buffer, that is, less than 0 or greater thanBuffer.capacity()
minus 3.
-
readInt
int readInt()
Read the int value at the currentBuffer.readerOffset()
, and increases the reader offset byInteger.BYTES
. The value is read using a two's complement 32-bit encoding, inByteOrder.BIG_ENDIAN
byte order.- Returns:
- The int value at the current reader offset.
- Throws:
IndexOutOfBoundsException
- IfBuffer.readableBytes()
is less thanInteger.BYTES
.
-
getInt
int getInt(int roff)
Get the int value at the given reader offset. TheBuffer.readerOffset()
is not modified. The value is read using a two's complement 32-bit encoding, inByteOrder.BIG_ENDIAN
byte order.- Parameters:
roff
- The read offset, an absolute offset into this buffer, to read from.- 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 thanBuffer.capacity()
minusInteger.BYTES
.
-
readUnsignedInt
long readUnsignedInt()
Read the unsigned int value at the currentBuffer.readerOffset()
, and increases the reader offset byInteger.BYTES
. The value is read using an unsigned two's complement 32-bit encoding, inByteOrder.BIG_ENDIAN
byte order.- Returns:
- The unsigned int value at the current reader offset.
- Throws:
IndexOutOfBoundsException
- IfBuffer.readableBytes()
is less thanInteger.BYTES
.
-
getUnsignedInt
long getUnsignedInt(int roff)
Get the unsigned int value at the given reader offset. TheBuffer.readerOffset()
is not modified. The value is read using an unsigned two's complement 32-bit encoding, inByteOrder.BIG_ENDIAN
byte order.- Parameters:
roff
- The read offset, an absolute offset into this buffer, to read from.- 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 thanBuffer.capacity()
minusInteger.BYTES
.
-
writeInt
Buffer writeInt(int value)
Write the given int value at the currentBuffer.writerOffset()
, and increase the writer offset byInteger.BYTES
. The value is written using a two's complement 32-bit encoding, inByteOrder.BIG_ENDIAN
byte order.- Parameters:
value
- The int value to write.- Returns:
- This Buffer.
- Throws:
IndexOutOfBoundsException
- IfBuffer.writableBytes()
is less thanInteger.BYTES
, and the buffer capacity cannot be automatically increased.
-
setInt
Buffer setInt(int woff, int value)
Set the given int value at the given write offset. TheBuffer.writerOffset()
is not modified. The value is written using a two's complement 32-bit encoding, inByteOrder.BIG_ENDIAN
byte order.- Parameters:
woff
- The write offset, an absolute offset into this buffer to write to.value
- The int value to write.- Returns:
- This Buffer.
- Throws:
IndexOutOfBoundsException
- if the given offset is out of bounds of the buffer, that is, less than 0 or greater thanBuffer.capacity()
minusInteger.BYTES
.
-
writeUnsignedInt
Buffer writeUnsignedInt(long value)
Write the given unsigned int value at the currentBuffer.writerOffset()
, and increase the writer offset byInteger.BYTES
. The value is written using an unsigned two's complement 32-bit encoding, inByteOrder.BIG_ENDIAN
byte order.- Parameters:
value
- The long value to write.- Returns:
- This Buffer.
- Throws:
IndexOutOfBoundsException
- IfBuffer.writableBytes()
is less thanInteger.BYTES
, and the buffer capacity cannot be automatically increased.
-
setUnsignedInt
Buffer setUnsignedInt(int woff, long value)
Set the given unsigned int value at the given write offset. TheBuffer.writerOffset()
is not modified. The value is written using an unsigned two's complement 32-bit encoding, inByteOrder.BIG_ENDIAN
byte order.- Parameters:
woff
- The write offset, an absolute offset into this buffer to write to.value
- The long value to write.- Returns:
- This Buffer.
- Throws:
IndexOutOfBoundsException
- if the given offset is out of bounds of the buffer, that is, less than 0 or greater thanBuffer.capacity()
minusInteger.BYTES
.
-
readFloat
float readFloat()
Read the float value at the currentBuffer.readerOffset()
, and increases the reader offset byFloat.BYTES
. The value is read using a 32-bit IEEE floating point encoding, inByteOrder.BIG_ENDIAN
byte order.- Returns:
- The float value at the current reader offset.
- Throws:
IndexOutOfBoundsException
- IfBuffer.readableBytes()
is less thanFloat.BYTES
.
-
getFloat
float getFloat(int roff)
Get the float value at the given reader offset. TheBuffer.readerOffset()
is not modified. The value is read using a 32-bit IEEE floating point encoding, inByteOrder.BIG_ENDIAN
byte order.- Parameters:
roff
- The read offset, an absolute offset into this buffer, to read from.- 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 thanBuffer.capacity()
minusFloat.BYTES
.
-
writeFloat
Buffer writeFloat(float value)
Write the given float value at the currentBuffer.writerOffset()
, and increase the writer offset byFloat.BYTES
. The value is written using a 32-bit IEEE floating point encoding, inByteOrder.BIG_ENDIAN
byte order.- Parameters:
value
- The float value to write.- Returns:
- This Buffer.
- Throws:
IndexOutOfBoundsException
- IfBuffer.writableBytes()
is less thanFloat.BYTES
, and the buffer capacity cannot be automatically increased.
-
setFloat
Buffer setFloat(int woff, float value)
Set the given float value at the given write offset. TheBuffer.writerOffset()
is not modified. The value is written using a 32-bit IEEE floating point encoding, inByteOrder.BIG_ENDIAN
byte order.- Parameters:
woff
- The write offset, an absolute offset into this buffer to write to.value
- The float value to write.- Returns:
- This Buffer.
- Throws:
IndexOutOfBoundsException
- if the given offset is out of bounds of the buffer, that is, less than 0 or greater thanBuffer.capacity()
minusFloat.BYTES
.
-
readLong
long readLong()
Read the long value at the currentBuffer.readerOffset()
, and increases the reader offset byLong.BYTES
. The value is read using a two's complement 64-bit encoding, inByteOrder.BIG_ENDIAN
byte order.- Returns:
- The long value at the current reader offset.
- Throws:
IndexOutOfBoundsException
- IfBuffer.readableBytes()
is less thanLong.BYTES
.
-
getLong
long getLong(int roff)
Get the long value at the given reader offset. TheBuffer.readerOffset()
is not modified. The value is read using a two's complement 64-bit encoding, inByteOrder.BIG_ENDIAN
byte order.- Parameters:
roff
- The read offset, an absolute offset into this buffer, to read from.- 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 thanBuffer.capacity()
minusLong.BYTES
.
-
writeLong
Buffer writeLong(long value)
Write the given long value at the currentBuffer.writerOffset()
, and increase the writer offset byLong.BYTES
. The value is written using a two's complement 64-bit encoding, inByteOrder.BIG_ENDIAN
byte order.- Parameters:
value
- The long value to write.- Returns:
- This Buffer.
- Throws:
IndexOutOfBoundsException
- IfBuffer.writableBytes()
is less thanLong.BYTES
, and the buffer capacity cannot be automatically increased.
-
setLong
Buffer setLong(int woff, long value)
Set the given long value at the given write offset. TheBuffer.writerOffset()
is not modified. The value is written using a two's complement 64-bit encoding, inByteOrder.BIG_ENDIAN
byte order.- Parameters:
woff
- The write offset, an absolute offset into this buffer to write to.value
- The long value to write.- Returns:
- This Buffer.
- Throws:
IndexOutOfBoundsException
- if the given offset is out of bounds of the buffer, that is, less than 0 or greater thanBuffer.capacity()
minusLong.BYTES
.
-
readDouble
double readDouble()
Read the double value at the currentBuffer.readerOffset()
, and increases the reader offset byDouble.BYTES
. The value is read using a 64-bit IEEE floating point encoding, inByteOrder.BIG_ENDIAN
byte order.- Returns:
- The double value at the current reader offset.
- Throws:
IndexOutOfBoundsException
- IfBuffer.readableBytes()
is less thanDouble.BYTES
.
-
getDouble
double getDouble(int roff)
Get the double value at the given reader offset. TheBuffer.readerOffset()
is not modified. The value is read using a 64-bit IEEE floating point encoding, inByteOrder.BIG_ENDIAN
byte order.- Parameters:
roff
- The read offset, an absolute offset into this buffer, to read from.- 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 thanBuffer.capacity()
minusDouble.BYTES
.
-
writeDouble
Buffer writeDouble(double value)
Write the given double value at the currentBuffer.writerOffset()
, and increase the writer offset byDouble.BYTES
. The value is written using a 64-bit IEEE floating point encoding, inByteOrder.BIG_ENDIAN
byte order.- Parameters:
value
- The double value to write.- Returns:
- This Buffer.
- Throws:
IndexOutOfBoundsException
- IfBuffer.writableBytes()
is less thanDouble.BYTES
, and the buffer capacity cannot be automatically increased.
-
setDouble
Buffer setDouble(int woff, double value)
Set the given double value at the given write offset. TheBuffer.writerOffset()
is not modified. The value is written using a 64-bit IEEE floating point encoding, inByteOrder.BIG_ENDIAN
byte order.- Parameters:
woff
- The write offset, an absolute offset into this buffer to write to.value
- The double value to write.- Returns:
- This Buffer.
- Throws:
IndexOutOfBoundsException
- if the given offset is out of bounds of the buffer, that is, less than 0 or greater thanBuffer.capacity()
minusDouble.BYTES
.
-
-