Top Description Methods
io.netty5.buffer

public Interface BufferAccessor

Known Direct Subinterfaces
io.netty5.buffer.Buffer
Known Direct Implementers
io.netty5.buffer.DefaultCompositeBuffer.TornBufferAccessor

This interface is just the primitive data accessor methods that Buffer 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 the Buffer interface directly, since this lets you properly control the buffer life cycle.

Method Summary

Modifier and TypeMethod and Description
public default boolean

Returns:

The boolean value at the given offset.
getBoolean
(int
The read offset, an absolute offset into this buffer, to read from.
roff
)

Get the boolean value at the given reader offset.

public byte

Returns:

The byte value at the given offset.
getByte
(int
The read offset, an absolute offset into this buffer, to read from.
roff
)

Get the byte value at the given reader offset.

public char

Returns:

The char value at the given offset.
getChar
(int
The read offset, an absolute offset into this buffer, to read from.
roff
)

Get the char value at the given reader offset.

public double

Returns:

The double value at the given offset.
getDouble
(int
The read offset, an absolute offset into this buffer, to read from.
roff
)

Get the double value at the given reader offset.

public float

Returns:

The float value at the given offset.
getFloat
(int
The read offset, an absolute offset into this buffer, to read from.
roff
)

Get the float value at the given reader offset.

public int

Returns:

The int value at the given offset.
getInt
(int
The read offset, an absolute offset into this buffer, to read from.
roff
)

Get the int value at the given reader offset.

public long

Returns:

The long value at the given offset.
getLong
(int
The read offset, an absolute offset into this buffer, to read from.
roff
)

Get the long value at the given reader offset.

public int

Returns:

The int value at the given offset.
getMedium
(int
The read offset, an absolute offset into this buffer, to read from.
roff
)

Get the int value at the given reader offset.

public short

Returns:

The short value at the given offset.
getShort
(int
The read offset, an absolute offset into this buffer, to read from.
roff
)

Get the short value at the given reader offset.

public int

Returns:

The unsigned byte value at the given offset.
getUnsignedByte
(int
The read offset, an absolute offset into this buffer, to read from.
roff
)

Get the unsigned byte value at the given reader offset.

public long

Returns:

The unsigned int value at the given offset.
getUnsignedInt
(int
The read offset, an absolute offset into this buffer, to read from.
roff
)

Get the unsigned int value at the given reader offset.

public int

Returns:

The unsigned int value at the given offset.
getUnsignedMedium
(int
The read offset, an absolute offset into this buffer, to read from.
roff
)

Get the unsigned int value at the given reader offset.

public int

Returns:

The unsigned short value at the given offset.
getUnsignedShort
(int
The read offset, an absolute offset into this buffer, to read from.
roff
)

Get the unsigned short value at the given reader offset.

public default boolean

Returns:

The boolean value at the current reader offset.
readBoolean
()

Read the boolean value at the current Buffer#readerOffset(), and increases the reader offset by Byte#BYTES.

public byte

Returns:

The byte value at the current reader offset.
readByte
()

Read the byte value at the current Buffer#readerOffset(), and increases the reader offset by Byte#BYTES.

public char

Returns:

The char value at the current reader offset.
readChar
()

Read the char value at the current Buffer#readerOffset(), and increases the reader offset by 2.

public double

Returns:

The double value at the current reader offset.
readDouble
()

Read the double value at the current Buffer#readerOffset(), and increases the reader offset by Double#BYTES.

public float

Returns:

The float value at the current reader offset.
readFloat
()

Read the float value at the current Buffer#readerOffset(), and increases the reader offset by Float#BYTES.

public int

Returns:

The int value at the current reader offset.
readInt
()

Read the int value at the current Buffer#readerOffset(), and increases the reader offset by Integer#BYTES.

public long

Returns:

The long value at the current reader offset.
readLong
()

Read the long value at the current Buffer#readerOffset(), and increases the reader offset by Long#BYTES.

public int

Returns:

The int value at the current reader offset.
readMedium
()

Read the int value at the current Buffer#readerOffset(), and increases the reader offset by 3.

public short

Returns:

The short value at the current reader offset.
readShort
()

Read the short value at the current Buffer#readerOffset(), and increases the reader offset by Short#BYTES.

public int

Returns:

The unsigned byte value at the current reader offset.
readUnsignedByte
()

Read the unsigned byte value at the current Buffer#readerOffset(), and increases the reader offset by Byte#BYTES.

public long

Returns:

The unsigned int value at the current reader offset.
readUnsignedInt
()

Read the unsigned int value at the current Buffer#readerOffset(), and increases the reader offset by Integer#BYTES.

public int

Returns:

The unsigned int value at the current reader offset.
readUnsignedMedium
()

Read the unsigned int value at the current Buffer#readerOffset(), and increases the reader offset by 3.

public int

Returns:

The unsigned short value at the current reader offset.
readUnsignedShort
()

Read the unsigned short value at the current Buffer#readerOffset(), and increases the reader offset by Short#BYTES.

public default Buffer

Returns:

This Buffer.
setBoolean
(int
The write offset, an absolute offset into this buffer to write to.
woff
,
boolean
The boolean value to write.
value
)

Set the given boolean value at the given write offset.

public Buffer

Returns:

This Buffer.
setByte
(int
The write offset, an absolute offset into this buffer to write to.
woff
,
byte
The byte value to write.
value
)

Set the given byte value at the given write offset.

public Buffer

Returns:

This Buffer.
setChar
(int
The write offset, an absolute offset into this buffer to write to.
woff
,
char
The char value to write.
value
)

Set the given char value at the given write offset.

public Buffer

Returns:

This Buffer.
setDouble
(int
The write offset, an absolute offset into this buffer to write to.
woff
,
double
The double value to write.
value
)

Set the given double value at the given write offset.

public Buffer

Returns:

This Buffer.
setFloat
(int
The write offset, an absolute offset into this buffer to write to.
woff
,
float
The float value to write.
value
)

Set the given float value at the given write offset.

public Buffer

Returns:

This Buffer.
setInt
(int
The write offset, an absolute offset into this buffer to write to.
woff
,
int
The int value to write.
value
)

Set the given int value at the given write offset.

public Buffer

Returns:

This Buffer.
setLong
(int
The write offset, an absolute offset into this buffer to write to.
woff
,
long
The long value to write.
value
)

Set the given long value at the given write offset.

public Buffer

Returns:

This Buffer.
setMedium
(int
The write offset, an absolute offset into this buffer to write to.
woff
,
int
The int value to write.
value
)

Set the given int value at the given write offset.

public Buffer

Returns:

This Buffer.
setShort
(int
The write offset, an absolute offset into this buffer to write to.
woff
,
short
The short value to write.
value
)

Set the given short value at the given write offset.

public Buffer

Returns:

This Buffer.
setUnsignedByte
(int
The write offset, an absolute offset into this buffer to write to.
woff
,
int
The int value to write.
value
)

Set the given unsigned byte value at the given write offset.

public Buffer

Returns:

This Buffer.
setUnsignedInt
(int
The write offset, an absolute offset into this buffer to write to.
woff
,
long
The long value to write.
value
)

Set the given unsigned int value at the given write offset.

public Buffer

Returns:

This Buffer.
setUnsignedMedium
(int
The write offset, an absolute offset into this buffer to write to.
woff
,
int
The int value to write.
value
)

Set the given unsigned int value at the given write offset.

public Buffer

Returns:

This Buffer.
setUnsignedShort
(int
The write offset, an absolute offset into this buffer to write to.
woff
,
int
The int value to write.
value
)

Set the given unsigned short value at the given write offset.

public default Buffer

Returns:

This Buffer.
writeBoolean
(boolean
The boolean value to write.
value
)

Write the given boolean value at the current Buffer#writerOffset(), and increase the writer offset by Byte#BYTES.

public Buffer

Returns:

This Buffer.
writeByte
(byte
The byte value to write.
value
)

Write the given byte value at the current Buffer#writerOffset(), and increase the writer offset by Byte#BYTES.

public Buffer

Returns:

This Buffer.
writeChar
(char
The char value to write.
value
)

Write the given char value at the current Buffer#writerOffset(), and increase the writer offset by 2.

public Buffer

Returns:

This Buffer.
writeDouble
(double
The double value to write.
value
)

Write the given double value at the current Buffer#writerOffset(), and increase the writer offset by Double#BYTES.

public Buffer

Returns:

This Buffer.
writeFloat
(float
The float value to write.
value
)

Write the given float value at the current Buffer#writerOffset(), and increase the writer offset by Float#BYTES.

public Buffer

Returns:

This Buffer.
writeInt
(int
The int value to write.
value
)

Write the given int value at the current Buffer#writerOffset(), and increase the writer offset by Integer#BYTES.

public Buffer

Returns:

This Buffer.
writeLong
(long
The long value to write.
value
)

Write the given long value at the current Buffer#writerOffset(), and increase the writer offset by Long#BYTES.

public Buffer

Returns:

This Buffer.
writeMedium
(int
The int value to write.
value
)

Write the given int value at the current Buffer#writerOffset(), and increase the writer offset by 3.

public Buffer

Returns:

This Buffer.
writeShort
(short
The short value to write.
value
)

Write the given short value at the current Buffer#writerOffset(), and increase the writer offset by Short#BYTES.

public Buffer

Returns:

This Buffer.
writeUnsignedByte
(int
The int value to write.
value
)

Write the given unsigned byte value at the current Buffer#writerOffset(), and increase the writer offset by Byte#BYTES.

public Buffer

Returns:

This Buffer.
writeUnsignedInt
(long
The long value to write.
value
)

Write the given unsigned int value at the current Buffer#writerOffset(), and increase the writer offset by Integer#BYTES.

public Buffer

Returns:

This Buffer.
writeUnsignedMedium
(int
The int value to write.
value
)

Write the given unsigned int value at the current Buffer#writerOffset(), and increase the writer offset by 3.

public Buffer

Returns:

This Buffer.
writeUnsignedShort
(int
The int value to write.
value
)

Write the given unsigned short value at the current Buffer#writerOffset(), and increase the writer offset by Short#BYTES.

Method Detail

getBooleanback to summary
public default boolean getBoolean(int roff)

Get the boolean value at the given reader offset. The Buffer#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.

Parameters
roff:int

The read offset, an absolute offset into this buffer, to read from.

Returns:boolean

The boolean value at the given offset.

Exceptions
IndexOutOfBoundsException:
if the given offset is out of bounds of the buffer, that is, less than 0 or greater than Buffer#capacity() minus Byte#BYTES.
getByteback to summary
public byte getByte(int roff)

Get the byte value at the given reader offset. The Buffer#readerOffset() is not modified. The value is read using a two's complement 8-bit encoding, in java.nio.ByteOrder#BIG_ENDIAN byte order.

Parameters
roff:int

The read offset, an absolute offset into this buffer, to read from.

Returns:byte

The byte value at the given offset.

Exceptions
IndexOutOfBoundsException:
if the given offset is out of bounds of the buffer, that is, less than 0 or greater than Buffer#capacity() minus Byte#BYTES.
getCharback to summary
public char getChar(int roff)

Get the char value at the given reader offset. The Buffer#readerOffset() is not modified. The value is read using a 2-byte UTF-16 encoding, in java.nio.ByteOrder#BIG_ENDIAN byte order.

Parameters
roff:int

The read offset, an absolute offset into this buffer, to read from.

Returns:char

The char value at the given offset.

Exceptions
IndexOutOfBoundsException:
if the given offset is out of bounds of the buffer, that is, less than 0 or greater than Buffer#capacity() minus 2.
getDoubleback to summary
public double getDouble(int roff)

Get the double value at the given reader offset. The Buffer#readerOffset() is not modified. The value is read using a 64-bit IEEE floating point encoding, in java.nio.ByteOrder#BIG_ENDIAN byte order.

Parameters
roff:int

The read offset, an absolute offset into this buffer, to read from.

Returns:double

The double value at the given offset.

Exceptions
IndexOutOfBoundsException:
if the given offset is out of bounds of the buffer, that is, less than 0 or greater than Buffer#capacity() minus Double#BYTES.
getFloatback to summary
public float getFloat(int roff)

Get the float value at the given reader offset. The Buffer#readerOffset() is not modified. The value is read using a 32-bit IEEE floating point encoding, in java.nio.ByteOrder#BIG_ENDIAN byte order.

Parameters
roff:int

The read offset, an absolute offset into this buffer, to read from.

Returns:float

The float value at the given offset.

Exceptions
IndexOutOfBoundsException:
if the given offset is out of bounds of the buffer, that is, less than 0 or greater than Buffer#capacity() minus Float#BYTES.
getIntback to summary
public int getInt(int roff)

Get the int value at the given reader offset. The Buffer#readerOffset() is not modified. The value is read using a two's complement 32-bit encoding, in java.nio.ByteOrder#BIG_ENDIAN byte order.

Parameters
roff:int

The read offset, an absolute offset into this buffer, to read from.

Returns:int

The int value at the given offset.

Exceptions
IndexOutOfBoundsException:
if the given offset is out of bounds of the buffer, that is, less than 0 or greater than Buffer#capacity() minus Integer#BYTES.
getLongback to summary
public long getLong(int roff)

Get the long value at the given reader offset. The Buffer#readerOffset() is not modified. The value is read using a two's complement 64-bit encoding, in java.nio.ByteOrder#BIG_ENDIAN byte order.

Parameters
roff:int

The read offset, an absolute offset into this buffer, to read from.

Returns:long

The long value at the given offset.

Exceptions
IndexOutOfBoundsException:
if the given offset is out of bounds of the buffer, that is, less than 0 or greater than Buffer#capacity() minus Long#BYTES.
getMediumback to summary
public int getMedium(int roff)

Get the int value at the given reader offset. The Buffer#readerOffset() is not modified. The value is read using a two's complement 24-bit encoding, in java.nio.ByteOrder#BIG_ENDIAN byte order.

Parameters
roff:int

The read offset, an absolute offset into this buffer, to read from.

Returns:int

The int value at the given offset.

Exceptions
IndexOutOfBoundsException:
if the given offset is out of bounds of the buffer, that is, less than 0 or greater than Buffer#capacity() minus 3.
getShortback to summary
public short getShort(int roff)

Get the short value at the given reader offset. The Buffer#readerOffset() is not modified. The value is read using a two's complement 16-bit encoding, in java.nio.ByteOrder#BIG_ENDIAN byte order.

Parameters
roff:int

The read offset, an absolute offset into this buffer, to read from.

Returns:short

The short value at the given offset.

Exceptions
IndexOutOfBoundsException:
if the given offset is out of bounds of the buffer, that is, less than 0 or greater than Buffer#capacity() minus Short#BYTES.
getUnsignedByteback to summary
public int getUnsignedByte(int roff)

Get the unsigned byte value at the given reader offset. The Buffer#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.

Parameters
roff:int

The read offset, an absolute offset into this buffer, to read from.

Returns:int

The unsigned byte value at the given offset.

Exceptions
IndexOutOfBoundsException:
if the given offset is out of bounds of the buffer, that is, less than 0 or greater than Buffer#capacity() minus Byte#BYTES.
getUnsignedIntback to summary
public long getUnsignedInt(int roff)

Get the unsigned int value at the given reader offset. The Buffer#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.

Parameters
roff:int

The read offset, an absolute offset into this buffer, to read from.

Returns:long

The unsigned int value at the given offset.

Exceptions
IndexOutOfBoundsException:
if the given offset is out of bounds of the buffer, that is, less than 0 or greater than Buffer#capacity() minus Integer#BYTES.
getUnsignedMediumback to summary
public int getUnsignedMedium(int roff)

Get the unsigned int value at the given reader offset. The Buffer#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.

Parameters
roff:int

The read offset, an absolute offset into this buffer, to read from.

Returns:int

The unsigned int value at the given offset.

Exceptions
IndexOutOfBoundsException:
if the given offset is out of bounds of the buffer, that is, less than 0 or greater than Buffer#capacity() minus 3.
getUnsignedShortback to summary
public int getUnsignedShort(int roff)

Get the unsigned short value at the given reader offset. The Buffer#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.

Parameters
roff:int

The read offset, an absolute offset into this buffer, to read from.

Returns:int

The unsigned short value at the given offset.

Exceptions
IndexOutOfBoundsException:
if the given offset is out of bounds of the buffer, that is, less than 0 or greater than Buffer#capacity() minus Short#BYTES.
readBooleanback to summary
public default boolean readBoolean()

Read the boolean value at the current Buffer#readerOffset(), and increases the reader offset by 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.

Returns:boolean

The boolean value at the current reader offset.

Exceptions
IndexOutOfBoundsException:
If Buffer#readableBytes is less than Byte#BYTES.
readByteback to summary
public byte readByte()

Read the byte value at the current Buffer#readerOffset(), and increases the reader offset by Byte#BYTES. The value is read using a two's complement 8-bit encoding, in java.nio.ByteOrder#BIG_ENDIAN byte order.

Returns:byte

The byte value at the current reader offset.

Exceptions
IndexOutOfBoundsException:
If Buffer#readableBytes is less than Byte#BYTES.
readCharback to summary
public char readChar()

Read the char value at the current Buffer#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.

Returns:char

The char value at the current reader offset.

Exceptions
IndexOutOfBoundsException:
If Buffer#readableBytes is less than 2.
readDoubleback to summary
public double readDouble()

Read the double value at the current Buffer#readerOffset(), and increases the reader offset by Double#BYTES. The value is read using a 64-bit IEEE floating point encoding, in java.nio.ByteOrder#BIG_ENDIAN byte order.

Returns:double

The double value at the current reader offset.

Exceptions
IndexOutOfBoundsException:
If Buffer#readableBytes is less than Double#BYTES.
readFloatback to summary
public float readFloat()

Read the float value at the current Buffer#readerOffset(), and increases the reader offset by Float#BYTES. The value is read using a 32-bit IEEE floating point encoding, in java.nio.ByteOrder#BIG_ENDIAN byte order.

Returns:float

The float value at the current reader offset.

Exceptions
IndexOutOfBoundsException:
If Buffer#readableBytes is less than Float#BYTES.
readIntback to summary
public int readInt()

Read the int value at the current Buffer#readerOffset(), and increases the reader offset by Integer#BYTES. The value is read using a two's complement 32-bit encoding, in java.nio.ByteOrder#BIG_ENDIAN byte order.

Returns:int

The int value at the current reader offset.

Exceptions
IndexOutOfBoundsException:
If Buffer#readableBytes is less than Integer#BYTES.
readLongback to summary
public long readLong()

Read the long value at the current Buffer#readerOffset(), and increases the reader offset by Long#BYTES. The value is read using a two's complement 64-bit encoding, in java.nio.ByteOrder#BIG_ENDIAN byte order.

Returns:long

The long value at the current reader offset.

Exceptions
IndexOutOfBoundsException:
If Buffer#readableBytes is less than Long#BYTES.
readMediumback to summary
public int readMedium()

Read the int value at the current Buffer#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.

Returns:int

The int value at the current reader offset.

Exceptions
IndexOutOfBoundsException:
If Buffer#readableBytes is less than 3.
readShortback to summary
public short readShort()

Read the short value at the current Buffer#readerOffset(), and increases the reader offset by Short#BYTES. The value is read using a two's complement 16-bit encoding, in java.nio.ByteOrder#BIG_ENDIAN byte order.

Returns:short

The short value at the current reader offset.

Exceptions
IndexOutOfBoundsException:
If Buffer#readableBytes is less than Short#BYTES.
readUnsignedByteback to summary
public int readUnsignedByte()

Read the unsigned byte value at the current Buffer#readerOffset(), and increases the reader offset by Byte#BYTES. The value is read using an unsigned two's complement 8-bit encoding, in java.nio.ByteOrder#BIG_ENDIAN byte order.

Returns:int

The unsigned byte value at the current reader offset.

Exceptions
IndexOutOfBoundsException:
If Buffer#readableBytes is less than Byte#BYTES.
readUnsignedIntback to summary
public long readUnsignedInt()

Read the unsigned int value at the current Buffer#readerOffset(), and increases the reader offset by Integer#BYTES. The value is read using an unsigned two's complement 32-bit encoding, in java.nio.ByteOrder#BIG_ENDIAN byte order.

Returns:long

The unsigned int value at the current reader offset.

Exceptions
IndexOutOfBoundsException:
If Buffer#readableBytes is less than Integer#BYTES.
readUnsignedMediumback to summary
public int readUnsignedMedium()

Read the unsigned int value at the current Buffer#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.

Returns:int

The unsigned int value at the current reader offset.

Exceptions
IndexOutOfBoundsException:
If Buffer#readableBytes is less than 3.
readUnsignedShortback to summary
public int readUnsignedShort()

Read the unsigned short value at the current Buffer#readerOffset(), and increases the reader offset by Short#BYTES. The value is read using an unsigned two's complement 16-bit encoding, in java.nio.ByteOrder#BIG_ENDIAN byte order.

Returns:int

The unsigned short value at the current reader offset.

Exceptions
IndexOutOfBoundsException:
If Buffer#readableBytes is less than Short#BYTES.
setBooleanback to summary
public default Buffer setBoolean(int woff, boolean value)

Set the given boolean value at the given write offset. The Buffer#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.

Parameters
woff:int

The write offset, an absolute offset into this buffer to write to.

value:boolean

The boolean value to write.

Returns:Buffer

This Buffer.

Exceptions
IndexOutOfBoundsException:
if the given offset is out of bounds of the buffer, that is, less than 0 or greater than Buffer#capacity() minus Byte#BYTES.
setByteback to summary
public Buffer setByte(int woff, byte value)

Set the given byte value at the given write offset. The Buffer#writerOffset() is not modified. The value is written using a two's complement 8-bit encoding, in java.nio.ByteOrder#BIG_ENDIAN byte order.

Parameters
woff:int

The write offset, an absolute offset into this buffer to write to.

value:byte

The byte value to write.

Returns:Buffer

This Buffer.

Exceptions
IndexOutOfBoundsException:
if the given offset is out of bounds of the buffer, that is, less than 0 or greater than Buffer#capacity() minus Byte#BYTES.
setCharback to summary
public Buffer setChar(int woff, char value)

Set the given char value at the given write offset. The Buffer#writerOffset() is not modified. The value is written using a 2-byte UTF-16 encoding, in java.nio.ByteOrder#BIG_ENDIAN byte order.

Parameters
woff:int

The write offset, an absolute offset into this buffer to write to.

value:char

The char value to write.

Returns:Buffer

This Buffer.

Exceptions
IndexOutOfBoundsException:
if the given offset is out of bounds of the buffer, that is, less than 0 or greater than Buffer#capacity() minus 2.
setDoubleback to summary
public Buffer setDouble(int woff, double value)

Set the given double value at the given write offset. The Buffer#writerOffset() is not modified. The value is written using a 64-bit IEEE floating point encoding, in java.nio.ByteOrder#BIG_ENDIAN byte order.

Parameters
woff:int

The write offset, an absolute offset into this buffer to write to.

value:double

The double value to write.

Returns:Buffer

This Buffer.

Exceptions
IndexOutOfBoundsException:
if the given offset is out of bounds of the buffer, that is, less than 0 or greater than Buffer#capacity() minus Double#BYTES.
setFloatback to summary
public Buffer setFloat(int woff, float value)

Set the given float value at the given write offset. The Buffer#writerOffset() is not modified. The value is written using a 32-bit IEEE floating point encoding, in java.nio.ByteOrder#BIG_ENDIAN byte order.

Parameters
woff:int

The write offset, an absolute offset into this buffer to write to.

value:float

The float value to write.

Returns:Buffer

This Buffer.

Exceptions
IndexOutOfBoundsException:
if the given offset is out of bounds of the buffer, that is, less than 0 or greater than Buffer#capacity() minus Float#BYTES.
setIntback to summary
public Buffer setInt(int woff, int value)

Set the given int value at the given write offset. The Buffer#writerOffset() is not modified. The value is written using a two's complement 32-bit encoding, in java.nio.ByteOrder#BIG_ENDIAN byte order.

Parameters
woff:int

The write offset, an absolute offset into this buffer to write to.

value:int

The int value to write.

Returns:Buffer

This Buffer.

Exceptions
IndexOutOfBoundsException:
if the given offset is out of bounds of the buffer, that is, less than 0 or greater than Buffer#capacity() minus Integer#BYTES.
setLongback to summary
public Buffer setLong(int woff, long value)

Set the given long value at the given write offset. The Buffer#writerOffset() is not modified. The value is written using a two's complement 64-bit encoding, in java.nio.ByteOrder#BIG_ENDIAN byte order.

Parameters
woff:int

The write offset, an absolute offset into this buffer to write to.

value:long

The long value to write.

Returns:Buffer

This Buffer.

Exceptions
IndexOutOfBoundsException:
if the given offset is out of bounds of the buffer, that is, less than 0 or greater than Buffer#capacity() minus Long#BYTES.
setMediumback to summary
public Buffer setMedium(int woff, int value)

Set the given int value at the given write offset. The Buffer#writerOffset() is not modified. The value is written using a two's complement 24-bit encoding, in java.nio.ByteOrder#BIG_ENDIAN byte order.

Parameters
woff:int

The write offset, an absolute offset into this buffer to write to.

value:int

The int value to write.

Returns:Buffer

This Buffer.

Exceptions
IndexOutOfBoundsException:
if the given offset is out of bounds of the buffer, that is, less than 0 or greater than Buffer#capacity() minus 3.
setShortback to summary
public Buffer setShort(int woff, short value)

Set the given short value at the given write offset. The Buffer#writerOffset() is not modified. The value is written using a two's complement 16-bit encoding, in java.nio.ByteOrder#BIG_ENDIAN byte order.

Parameters
woff:int

The write offset, an absolute offset into this buffer to write to.

value:short

The short value to write.

Returns:Buffer

This Buffer.

Exceptions
IndexOutOfBoundsException:
if the given offset is out of bounds of the buffer, that is, less than 0 or greater than Buffer#capacity() minus Short#BYTES.
setUnsignedByteback to summary
public Buffer setUnsignedByte(int woff, int value)

Set the given unsigned byte value at the given write offset. The Buffer#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.

Parameters
woff:int

The write offset, an absolute offset into this buffer to write to.

value:int

The int value to write.

Returns:Buffer

This Buffer.

Exceptions
IndexOutOfBoundsException:
if the given offset is out of bounds of the buffer, that is, less than 0 or greater than Buffer#capacity() minus Byte#BYTES.
setUnsignedIntback to summary
public Buffer setUnsignedInt(int woff, long value)

Set the given unsigned int value at the given write offset. The Buffer#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.

Parameters
woff:int

The write offset, an absolute offset into this buffer to write to.

value:long

The long value to write.

Returns:Buffer

This Buffer.

Exceptions
IndexOutOfBoundsException:
if the given offset is out of bounds of the buffer, that is, less than 0 or greater than Buffer#capacity() minus Integer#BYTES.
setUnsignedMediumback to summary
public Buffer setUnsignedMedium(int woff, int value)

Set the given unsigned int value at the given write offset. The Buffer#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.

Parameters
woff:int

The write offset, an absolute offset into this buffer to write to.

value:int

The int value to write.

Returns:Buffer

This Buffer.

Exceptions
IndexOutOfBoundsException:
if the given offset is out of bounds of the buffer, that is, less than 0 or greater than Buffer#capacity() minus 3.
setUnsignedShortback to summary
public Buffer setUnsignedShort(int woff, int value)

Set the given unsigned short value at the given write offset. The Buffer#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.

Parameters
woff:int

The write offset, an absolute offset into this buffer to write to.

value:int

The int value to write.

Returns:Buffer

This Buffer.

Exceptions
IndexOutOfBoundsException:
if the given offset is out of bounds of the buffer, that is, less than 0 or greater than Buffer#capacity() minus Short#BYTES.
writeBooleanback to summary
public default Buffer writeBoolean(boolean value)

Write the given boolean value at the current Buffer#writerOffset(), and increase the writer offset by 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.

Parameters
value:boolean

The boolean value to write.

Returns:Buffer

This Buffer.

Exceptions
IndexOutOfBoundsException:
If Buffer#writableBytes is less than Byte#BYTES, and the buffer capacity cannot be automatically increased.
writeByteback to summary
public Buffer writeByte(byte value)

Write the given byte value at the current Buffer#writerOffset(), and increase the writer offset by Byte#BYTES. The value is written using a two's complement 8-bit encoding, in java.nio.ByteOrder#BIG_ENDIAN byte order.

Parameters
value:byte

The byte value to write.

Returns:Buffer

This Buffer.

Exceptions
IndexOutOfBoundsException:
If Buffer#writableBytes is less than Byte#BYTES, and the buffer capacity cannot be automatically increased.
writeCharback to summary
public Buffer writeChar(char value)

Write the given char value at the current Buffer#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.

Parameters
value:char

The char value to write.

Returns:Buffer

This Buffer.

Exceptions
IndexOutOfBoundsException:
If Buffer#writableBytes is less than 2, and the buffer capacity cannot be automatically increased.
writeDoubleback to summary
public Buffer writeDouble(double value)

Write the given double value at the current Buffer#writerOffset(), and increase the writer offset by Double#BYTES. The value is written using a 64-bit IEEE floating point encoding, in java.nio.ByteOrder#BIG_ENDIAN byte order.

Parameters
value:double

The double value to write.

Returns:Buffer

This Buffer.

Exceptions
IndexOutOfBoundsException:
If Buffer#writableBytes is less than Double#BYTES, and the buffer capacity cannot be automatically increased.
writeFloatback to summary
public Buffer writeFloat(float value)

Write the given float value at the current Buffer#writerOffset(), and increase the writer offset by Float#BYTES. The value is written using a 32-bit IEEE floating point encoding, in java.nio.ByteOrder#BIG_ENDIAN byte order.

Parameters
value:float

The float value to write.

Returns:Buffer

This Buffer.

Exceptions
IndexOutOfBoundsException:
If Buffer#writableBytes is less than Float#BYTES, and the buffer capacity cannot be automatically increased.
writeIntback to summary
public Buffer writeInt(int value)

Write the given int value at the current Buffer#writerOffset(), and increase the writer offset by Integer#BYTES. The value is written using a two's complement 32-bit encoding, in java.nio.ByteOrder#BIG_ENDIAN byte order.

Parameters
value:int

The int value to write.

Returns:Buffer

This Buffer.

Exceptions
IndexOutOfBoundsException:
If Buffer#writableBytes is less than Integer#BYTES, and the buffer capacity cannot be automatically increased.
writeLongback to summary
public Buffer writeLong(long value)

Write the given long value at the current Buffer#writerOffset(), and increase the writer offset by Long#BYTES. The value is written using a two's complement 64-bit encoding, in java.nio.ByteOrder#BIG_ENDIAN byte order.

Parameters
value:long

The long value to write.

Returns:Buffer

This Buffer.

Exceptions
IndexOutOfBoundsException:
If Buffer#writableBytes is less than Long#BYTES, and the buffer capacity cannot be automatically increased.
writeMediumback to summary
public Buffer writeMedium(int value)

Write the given int value at the current Buffer#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.

Parameters
value:int

The int value to write.

Returns:Buffer

This Buffer.

Exceptions
IndexOutOfBoundsException:
If Buffer#writableBytes is less than 3, and the buffer capacity cannot be automatically increased.
writeShortback to summary
public Buffer writeShort(short value)

Write the given short value at the current Buffer#writerOffset(), and increase the writer offset by Short#BYTES. The value is written using a two's complement 16-bit encoding, in java.nio.ByteOrder#BIG_ENDIAN byte order.

Parameters
value:short

The short value to write.

Returns:Buffer

This Buffer.

Exceptions
IndexOutOfBoundsException:
If Buffer#writableBytes is less than Short#BYTES, and the buffer capacity cannot be automatically increased.
writeUnsignedByteback to summary
public Buffer writeUnsignedByte(int value)

Write the given unsigned byte value at the current Buffer#writerOffset(), and increase the writer offset by Byte#BYTES. The value is written using an unsigned two's complement 8-bit encoding, in java.nio.ByteOrder#BIG_ENDIAN byte order.

Parameters
value:int

The int value to write.

Returns:Buffer

This Buffer.

Exceptions
IndexOutOfBoundsException:
If Buffer#writableBytes is less than Byte#BYTES, and the buffer capacity cannot be automatically increased.
writeUnsignedIntback to summary
public Buffer writeUnsignedInt(long value)

Write the given unsigned int value at the current Buffer#writerOffset(), and increase the writer offset by Integer#BYTES. The value is written using an unsigned two's complement 32-bit encoding, in java.nio.ByteOrder#BIG_ENDIAN byte order.

Parameters
value:long

The long value to write.

Returns:Buffer

This Buffer.

Exceptions
IndexOutOfBoundsException:
If Buffer#writableBytes is less than Integer#BYTES, and the buffer capacity cannot be automatically increased.
writeUnsignedMediumback to summary
public Buffer writeUnsignedMedium(int value)

Write the given unsigned int value at the current Buffer#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.

Parameters
value:int

The int value to write.

Returns:Buffer

This Buffer.

Exceptions
IndexOutOfBoundsException:
If Buffer#writableBytes is less than 3, and the buffer capacity cannot be automatically increased.
writeUnsignedShortback to summary
public Buffer writeUnsignedShort(int value)

Write the given unsigned short value at the current Buffer#writerOffset(), and increase the writer offset by Short#BYTES. The value is written using an unsigned two's complement 16-bit encoding, in java.nio.ByteOrder#BIG_ENDIAN byte order.

Parameters
value:int

The int value to write.

Returns:Buffer

This Buffer.

Exceptions
IndexOutOfBoundsException:
If Buffer#writableBytes is less than Short#BYTES, and the buffer capacity cannot be automatically increased.