Top Description Fields Constructors Methods
io.netty.handler.codec

pack-priv final Class ReplayingDecoderByteBuf

extends ByteBuf
Class Inheritance
Imports
java.io.InputStream, .OutputStream, java.nio.ByteBuffer, .ByteOrder, java.nio.channels.FileChannel, .GatheringByteChannel, .ScatteringByteChannel, java.nio.charset.Charset, io.netty.buffer.ByteBuf, .ByteBufAllocator, .SwappedByteBuf, .Unpooled, io.netty.util.ByteProcessor, .Signal, io.netty.util.internal.ObjectUtil, .StringUtil

Special ByteBuf implementation which is used by the ReplayingDecoder

Field Summary

Modifier and TypeField and Description
private ByteBuf
pack-priv static final ReplayingDecoderByteBuf
private static final Signal
private SwappedByteBuf
swapped

Deprecated as a consequence of SwappedByteBuf being deprecated.
private boolean

Constructor Summary

AccessConstructor and Description
pack-priv
pack-priv

Method Summary

Modifier and TypeMethod and Description
public ByteBufAllocator
alloc()

Implements abstract io.netty.buffer.ByteBuf.alloc.

Returns the ByteBufAllocator which created this buffer.
public byte[]
array()

Implements abstract io.netty.buffer.ByteBuf.array.

Returns the backing byte array of this buffer.
public int
arrayOffset()

Implements abstract io.netty.buffer.ByteBuf.arrayOffset.

Returns the offset of the first byte within the backing byte array of this buffer.
public ByteBuf
asReadOnly()

Implements abstract io.netty.buffer.ByteBuf.asReadOnly.

Returns a read-only version of this buffer.
public int
bytesBefore(byte value)

Implements abstract io.netty.buffer.ByteBuf.bytesBefore.

Locates the first occurrence of the specified value in this buffer.
public int
bytesBefore(int length, byte value)

Implements abstract io.netty.buffer.ByteBuf.bytesBefore.

Locates the first occurrence of the specified value in this buffer.
public int
bytesBefore(int index, int length, byte value)

Implements abstract io.netty.buffer.ByteBuf.bytesBefore.

Locates the first occurrence of the specified value in this buffer.
public int
capacity()

Implements abstract io.netty.buffer.ByteBuf.capacity.

Returns the number of bytes (octets) this buffer can contain.
public ByteBuf
capacity(int newCapacity)

Implements abstract io.netty.buffer.ByteBuf.capacity.

Adjusts the capacity of this buffer.
private void
checkIndex(int index, int length)

private void
checkReadableBytes(int readableBytes)

public ByteBuf
clear()

Implements abstract io.netty.buffer.ByteBuf.clear.

Sets the readerIndex and writerIndex of this buffer to 0.
public int
compareTo(ByteBuf
the object to be compared.
buffer
)

Implements abstract io.netty.buffer.ByteBuf.compareTo.

Implements java.lang.Comparable.compareTo.

Compares the content of the specified buffer to the content of this buffer.
public ByteBuf
copy()

Implements abstract io.netty.buffer.ByteBuf.copy.

Returns a copy of this buffer's readable bytes.
public ByteBuf
copy(int index, int length)

Implements abstract io.netty.buffer.ByteBuf.copy.

Returns a copy of this buffer's sub-region.
public ByteBuf
discardReadBytes()

Implements abstract io.netty.buffer.ByteBuf.discardReadBytes.

Discards the bytes between the 0th index and readerIndex.
public ByteBuf
discardSomeReadBytes()

Implements abstract io.netty.buffer.ByteBuf.discardSomeReadBytes.

Similar to ByteBuf#discardReadBytes() except that this method might discard some, all, or none of read bytes depending on its internal implementation to reduce overall memory bandwidth consumption at the cost of potentially additional memory consumption.
public ByteBuf
duplicate()

Implements abstract io.netty.buffer.ByteBuf.duplicate.

Returns a buffer which shares the whole region of this buffer.
public ByteBuf
ensureWritable(int
the expected minimum number of writable bytes
writableBytes
)

Implements abstract io.netty.buffer.ByteBuf.ensureWritable.

Expands the buffer capacity() to make sure the number of writable bytes is equal to or greater than the specified value.
public int
ensureWritable(int
the expected minimum number of writable bytes
minWritableBytes
,
boolean
When writerIndex() + minWritableBytes > maxCapacity():
  • true - the capacity of the buffer is expanded to maxCapacity()
  • false - the capacity of the buffer is unchanged
force
)

Implements abstract io.netty.buffer.ByteBuf.ensureWritable.

Expands the buffer capacity() to make sure the number of writable bytes is equal to or greater than the specified value.
public boolean
equals(Object
the reference object with which to compare.
obj
)

Implements abstract io.netty.buffer.ByteBuf.equals.

Determines if the content of the specified buffer is identical to the content of this array.
public int
forEachByte(ByteProcessor processor)

Implements abstract io.netty.buffer.ByteBuf.forEachByte.

Iterates over the readable bytes of this buffer with the specified processor in ascending order.
public int
forEachByte(int index, int length, ByteProcessor processor)

Implements abstract io.netty.buffer.ByteBuf.forEachByte.

Iterates over the specified area of this buffer with the specified processor in ascending order.
public int
forEachByteDesc(ByteProcessor processor)

Implements abstract io.netty.buffer.ByteBuf.forEachByteDesc.

Iterates over the readable bytes of this buffer with the specified processor in descending order.
public int
forEachByteDesc(int index, int length, ByteProcessor processor)

Implements abstract io.netty.buffer.ByteBuf.forEachByteDesc.

Iterates over the specified area of this buffer with the specified processor in descending order.
public boolean
getBoolean(int index)

Implements abstract io.netty.buffer.ByteBuf.getBoolean.

Gets a boolean at the specified absolute (@code index) in this buffer.
public byte
getByte(int index)

Implements abstract io.netty.buffer.ByteBuf.getByte.

Gets a byte at the specified absolute index in this buffer.
public ByteBuf
getBytes(int index, byte[] dst, int
the first index of the destination
dstIndex
,
int
the number of bytes to transfer
length
)

Implements abstract io.netty.buffer.ByteBuf.getBytes.

Transfers this buffer's data to the specified destination starting at the specified absolute index.
public ByteBuf
getBytes(int index, byte[] dst)

Implements abstract io.netty.buffer.ByteBuf.getBytes.

Transfers this buffer's data to the specified destination starting at the specified absolute index.
public ByteBuf
getBytes(int index, ByteBuffer dst)

Implements abstract io.netty.buffer.ByteBuf.getBytes.

Transfers this buffer's data to the specified destination starting at the specified absolute index until the destination's position reaches its limit.
public ByteBuf
getBytes(int index, ByteBuf dst, int
the first index of the destination
dstIndex
,
int
the number of bytes to transfer
length
)

Implements abstract io.netty.buffer.ByteBuf.getBytes.

Transfers this buffer's data to the specified destination starting at the specified absolute index.
public ByteBuf
getBytes(int index, ByteBuf dst, int
the number of bytes to transfer
length
)

Implements abstract io.netty.buffer.ByteBuf.getBytes.

Transfers this buffer's data to the specified destination starting at the specified absolute index.
public ByteBuf
getBytes(int index, ByteBuf dst)

Implements abstract io.netty.buffer.ByteBuf.getBytes.

Transfers this buffer's data to the specified destination starting at the specified absolute index until the destination becomes non-writable.
public int
getBytes(int index, GatheringByteChannel out, int
the maximum number of bytes to transfer
length
)

Implements abstract io.netty.buffer.ByteBuf.getBytes.

Transfers this buffer's data to the specified channel starting at the specified absolute index.
public int
getBytes(int index, FileChannel out, long
the file position at which the transfer is to begin
position
,
int
the maximum number of bytes to transfer
length
)

Implements abstract io.netty.buffer.ByteBuf.getBytes.

Transfers this buffer's data starting at the specified absolute index to the specified channel starting at the given file position.
public ByteBuf
getBytes(int index, OutputStream out, int
the number of bytes to transfer
length
)

Implements abstract io.netty.buffer.ByteBuf.getBytes.

Transfers this buffer's data to the specified stream starting at the specified absolute index.
public char
getChar(int index)

Implements abstract io.netty.buffer.ByteBuf.getChar.

Gets a 2-byte UTF-16 character at the specified absolute index in this buffer.
public CharSequence
getCharSequence(int index, int
the length to read
length
,
Charset
that should be used
charset
)

Implements abstract io.netty.buffer.ByteBuf.getCharSequence.

Gets a CharSequence with the given length at the given index.
public double
getDouble(int index)

Implements abstract io.netty.buffer.ByteBuf.getDouble.

Gets a 64-bit floating point number at the specified absolute index in this buffer.
public float
getFloat(int index)

Implements abstract io.netty.buffer.ByteBuf.getFloat.

Gets a 32-bit floating point number at the specified absolute index in this buffer.
public int
getInt(int index)

Implements abstract io.netty.buffer.ByteBuf.getInt.

Gets a 32-bit integer at the specified absolute index in this buffer.
public int
getIntLE(int index)

Implements abstract io.netty.buffer.ByteBuf.getIntLE.

Gets a 32-bit integer at the specified absolute index in this buffer with Little Endian Byte Order.
public long
getLong(int index)

Implements abstract io.netty.buffer.ByteBuf.getLong.

Gets a 64-bit long integer at the specified absolute index in this buffer.
public long
getLongLE(int index)

Implements abstract io.netty.buffer.ByteBuf.getLongLE.

Gets a 64-bit long integer at the specified absolute index in this buffer in Little Endian Byte Order.
public int
getMedium(int index)

Implements abstract io.netty.buffer.ByteBuf.getMedium.

Gets a 24-bit medium integer at the specified absolute index in this buffer.
public int
getMediumLE(int index)

Implements abstract io.netty.buffer.ByteBuf.getMediumLE.

Gets a 24-bit medium integer at the specified absolute index in this buffer in the Little Endian Byte Order.
public short
getShort(int index)

Implements abstract io.netty.buffer.ByteBuf.getShort.

Gets a 16-bit short integer at the specified absolute index in this buffer.
public short
getShortLE(int index)

Implements abstract io.netty.buffer.ByteBuf.getShortLE.

Gets a 16-bit short integer at the specified absolute index in this buffer in Little Endian Byte Order.
public short
getUnsignedByte(int index)

Implements abstract io.netty.buffer.ByteBuf.getUnsignedByte.

Gets an unsigned byte at the specified absolute index in this buffer.
public long
getUnsignedInt(int index)

Implements abstract io.netty.buffer.ByteBuf.getUnsignedInt.

Gets an unsigned 32-bit integer at the specified absolute index in this buffer.
public long
getUnsignedIntLE(int index)

Implements abstract io.netty.buffer.ByteBuf.getUnsignedIntLE.

Gets an unsigned 32-bit integer at the specified absolute index in this buffer in Little Endian Byte Order.
public int
getUnsignedMedium(int index)

Implements abstract io.netty.buffer.ByteBuf.getUnsignedMedium.

Gets an unsigned 24-bit medium integer at the specified absolute index in this buffer.
public int
getUnsignedMediumLE(int index)

Implements abstract io.netty.buffer.ByteBuf.getUnsignedMediumLE.

Gets an unsigned 24-bit medium integer at the specified absolute index in this buffer in Little Endian Byte Order.
public int
getUnsignedShort(int index)

Implements abstract io.netty.buffer.ByteBuf.getUnsignedShort.

Gets an unsigned 16-bit short integer at the specified absolute index in this buffer.
public int
getUnsignedShortLE(int index)

Implements abstract io.netty.buffer.ByteBuf.getUnsignedShortLE.

Gets an unsigned 16-bit short integer at the specified absolute index in this buffer in Little Endian Byte Order.
public boolean
hasArray()

Implements abstract io.netty.buffer.ByteBuf.hasArray.

Returns true if and only if this buffer has a backing byte array.
public int
hashCode()

Implements abstract io.netty.buffer.ByteBuf.hashCode.

Returns a hash code which was calculated from the content of this buffer.
public boolean
hasMemoryAddress()

Implements abstract io.netty.buffer.ByteBuf.hasMemoryAddress.

Returns true if and only if this buffer has a reference to the low-level memory address that points to the backing data.
public int
indexOf(int fromIndex, int toIndex, byte value)

Implements abstract io.netty.buffer.ByteBuf.indexOf.

Locates the first occurrence of the specified value in this buffer.
public ByteBuffer
internalNioBuffer(int index, int length)

Implements abstract io.netty.buffer.ByteBuf.internalNioBuffer.

Internal use only: Exposes the internal NIO buffer.
public boolean
isDirect()

Implements abstract io.netty.buffer.ByteBuf.isDirect.

Returns true if and only if this buffer is backed by an NIO direct buffer.
public boolean
isReadable()

Implements abstract io.netty.buffer.ByteBuf.isReadable.

Returns true if and only if (this.writerIndex - this.readerIndex) is greater than 0.
public boolean
isReadable(int size)

Implements abstract io.netty.buffer.ByteBuf.isReadable.

Returns true if and only if this buffer contains equal to or more than the specified number of elements.
public boolean
isReadOnly()

Implements abstract io.netty.buffer.ByteBuf.isReadOnly.

Returns true if and only if this buffer is read-only.
public boolean
isWritable()

Implements abstract io.netty.buffer.ByteBuf.isWritable.

Returns true if and only if (this.capacity - this.writerIndex) is greater than 0.
public boolean
isWritable(int size)

Implements abstract io.netty.buffer.ByteBuf.isWritable.

Returns true if and only if this buffer has enough room to allow writing the specified number of elements.
public ByteBuf
markReaderIndex()

Implements abstract io.netty.buffer.ByteBuf.markReaderIndex.

Marks the current readerIndex in this buffer.
public ByteBuf
markWriterIndex()

Implements abstract io.netty.buffer.ByteBuf.markWriterIndex.

Marks the current writerIndex in this buffer.
public int
maxCapacity()

Implements abstract io.netty.buffer.ByteBuf.maxCapacity.

Returns the maximum allowed capacity of this buffer.
public int
maxWritableBytes()

Implements abstract io.netty.buffer.ByteBuf.maxWritableBytes.

Returns the maximum possible number of writable bytes, which is equal to (this.maxCapacity - this.writerIndex).
public long
memoryAddress()

Implements abstract io.netty.buffer.ByteBuf.memoryAddress.

Returns the low-level memory address that point to the first byte of ths backing data.
public ByteBuffer
nioBuffer()

Implements abstract io.netty.buffer.ByteBuf.nioBuffer.

Exposes this buffer's readable bytes as an NIO ByteBuffer.
public ByteBuffer
nioBuffer(int index, int length)

Implements abstract io.netty.buffer.ByteBuf.nioBuffer.

Exposes this buffer's sub-region as an NIO ByteBuffer.
public int
nioBufferCount()

Implements abstract io.netty.buffer.ByteBuf.nioBufferCount.

Returns the maximum number of NIO ByteBuffers that consist this buffer.
public ByteBuffer[]
nioBuffers()

Implements abstract io.netty.buffer.ByteBuf.nioBuffers.

Exposes this buffer's readable bytes as an NIO ByteBuffer's.
public ByteBuffer[]
nioBuffers(int index, int length)

Implements abstract io.netty.buffer.ByteBuf.nioBuffers.

Exposes this buffer's bytes as an NIO ByteBuffer's for the specified index and length The returned buffer either share or contains the copied content of this buffer, while changing the position and limit of the returned NIO buffer does not affect the indexes and marks of this buffer.
public ByteOrder
order()

Implements abstract io.netty.buffer.ByteBuf.order.

Returns the endianness of this buffer.
public ByteBuf
order(ByteOrder endianness)

Implements abstract io.netty.buffer.ByteBuf.order.

Returns a buffer with the specified endianness which shares the whole region, indexes, and marks of this buffer.
public int
readableBytes()

Implements abstract io.netty.buffer.ByteBuf.readableBytes.

Returns the number of readable bytes which is equal to (this.writerIndex - this.readerIndex).
public boolean
readBoolean()

Implements abstract io.netty.buffer.ByteBuf.readBoolean.

Gets a boolean at the current readerIndex and increases the readerIndex by 1 in this buffer.
public byte
readByte()

Implements abstract io.netty.buffer.ByteBuf.readByte.

Gets a byte at the current readerIndex and increases the readerIndex by 1 in this buffer.
public ByteBuf
readBytes(byte[] dst, int
the first index of the destination
dstIndex
,
int
the number of bytes to transfer
length
)

Implements abstract io.netty.buffer.ByteBuf.readBytes.

Transfers this buffer's data to the specified destination starting at the current readerIndex and increases the readerIndex by the number of the transferred bytes (= length).
public ByteBuf
readBytes(byte[] dst)

Implements abstract io.netty.buffer.ByteBuf.readBytes.

Transfers this buffer's data to the specified destination starting at the current readerIndex and increases the readerIndex by the number of the transferred bytes (= dst.length).
public ByteBuf
readBytes(ByteBuffer dst)

Implements abstract io.netty.buffer.ByteBuf.readBytes.

Transfers this buffer's data to the specified destination starting at the current readerIndex until the destination's position reaches its limit, and increases the readerIndex by the number of the transferred bytes.
public ByteBuf
readBytes(ByteBuf dst, int
the first index of the destination
dstIndex
,
int
the number of bytes to transfer
length
)

Implements abstract io.netty.buffer.ByteBuf.readBytes.

Transfers this buffer's data to the specified destination starting at the current readerIndex and increases the readerIndex by the number of the transferred bytes (= length).
public ByteBuf
readBytes(ByteBuf dst, int length)

Implements abstract io.netty.buffer.ByteBuf.readBytes.

Transfers this buffer's data to the specified destination starting at the current readerIndex and increases the readerIndex by the number of the transferred bytes (= length).
public ByteBuf
readBytes(ByteBuf dst)

Implements abstract io.netty.buffer.ByteBuf.readBytes.

Transfers this buffer's data to the specified destination starting at the current readerIndex until the destination becomes non-writable, and increases the readerIndex by the number of the transferred bytes.
public int
readBytes(GatheringByteChannel out, int
the maximum number of bytes to transfer
length
)

Implements abstract io.netty.buffer.ByteBuf.readBytes.

Transfers this buffer's data to the specified stream starting at the current readerIndex.
public int
readBytes(FileChannel out, long
the file position at which the transfer is to begin
position
,
int
the maximum number of bytes to transfer
length
)

Implements abstract io.netty.buffer.ByteBuf.readBytes.

Transfers this buffer's data starting at the current readerIndex to the specified channel starting at the given file position.
public ByteBuf
readBytes(int
the number of bytes to transfer
length
)

Implements abstract io.netty.buffer.ByteBuf.readBytes.

Transfers this buffer's data to a newly created buffer starting at the current readerIndex and increases the readerIndex by the number of the transferred bytes (= length).
public ByteBuf
readBytes(OutputStream out, int
the number of bytes to transfer
length
)

Implements abstract io.netty.buffer.ByteBuf.readBytes.

Transfers this buffer's data to the specified stream starting at the current readerIndex.
public char
readChar()

Implements abstract io.netty.buffer.ByteBuf.readChar.

Gets a 2-byte UTF-16 character at the current readerIndex and increases the readerIndex by 2 in this buffer.
public CharSequence
readCharSequence(int
the length to read
length
,
Charset
that should be used
charset
)

Implements abstract io.netty.buffer.ByteBuf.readCharSequence.

Gets a CharSequence with the given length at the current readerIndex and increases the readerIndex by the given length.
public double
readDouble()

Implements abstract io.netty.buffer.ByteBuf.readDouble.

Gets a 64-bit floating point number at the current readerIndex and increases the readerIndex by 8 in this buffer.
public int
readerIndex()

Implements abstract io.netty.buffer.ByteBuf.readerIndex.

Returns the readerIndex of this buffer.
public ByteBuf
readerIndex(int readerIndex)

Implements abstract io.netty.buffer.ByteBuf.readerIndex.

Sets the readerIndex of this buffer.
public float
readFloat()

Implements abstract io.netty.buffer.ByteBuf.readFloat.

Gets a 32-bit floating point number at the current readerIndex and increases the readerIndex by 4 in this buffer.
public int
readInt()

Implements abstract io.netty.buffer.ByteBuf.readInt.

Gets a 32-bit integer at the current readerIndex and increases the readerIndex by 4 in this buffer.
public int
readIntLE()

Implements abstract io.netty.buffer.ByteBuf.readIntLE.

Gets a 32-bit integer at the current readerIndex in the Little Endian Byte Order and increases the readerIndex by 4 in this buffer.
public long
readLong()

Implements abstract io.netty.buffer.ByteBuf.readLong.

Gets a 64-bit integer at the current readerIndex and increases the readerIndex by 8 in this buffer.
public long
readLongLE()

Implements abstract io.netty.buffer.ByteBuf.readLongLE.

Gets a 64-bit integer at the current readerIndex in the Little Endian Byte Order and increases the readerIndex by 8 in this buffer.
public int
readMedium()

Implements abstract io.netty.buffer.ByteBuf.readMedium.

Gets a 24-bit medium integer at the current readerIndex and increases the readerIndex by 3 in this buffer.
public int
readMediumLE()

Implements abstract io.netty.buffer.ByteBuf.readMediumLE.

Gets a 24-bit medium integer at the current readerIndex in the Little Endian Byte Order and increases the readerIndex by 3 in this buffer.
public ByteBuf
readRetainedSlice(int
the size of the new slice
length
)

Implements abstract io.netty.buffer.ByteBuf.readRetainedSlice.

Returns a new retained slice of this buffer's sub-region starting at the current readerIndex and increases the readerIndex by the size of the new slice (= length).
public short
readShort()

Implements abstract io.netty.buffer.ByteBuf.readShort.

Gets a 16-bit short integer at the current readerIndex and increases the readerIndex by 2 in this buffer.
public short
readShortLE()

Implements abstract io.netty.buffer.ByteBuf.readShortLE.

Gets a 16-bit short integer at the current readerIndex in the Little Endian Byte Order and increases the readerIndex by 2 in this buffer.
public ByteBuf
readSlice(int
the size of the new slice
length
)

Implements abstract io.netty.buffer.ByteBuf.readSlice.

Returns a new slice of this buffer's sub-region starting at the current readerIndex and increases the readerIndex by the size of the new slice (= length).
public short
readUnsignedByte()

Implements abstract io.netty.buffer.ByteBuf.readUnsignedByte.

Gets an unsigned byte at the current readerIndex and increases the readerIndex by 1 in this buffer.
public long
readUnsignedInt()

Implements abstract io.netty.buffer.ByteBuf.readUnsignedInt.

Gets an unsigned 32-bit integer at the current readerIndex and increases the readerIndex by 4 in this buffer.
public long
readUnsignedIntLE()

Implements abstract io.netty.buffer.ByteBuf.readUnsignedIntLE.

Gets an unsigned 32-bit integer at the current readerIndex in the Little Endian Byte Order and increases the readerIndex by 4 in this buffer.
public int
readUnsignedMedium()

Implements abstract io.netty.buffer.ByteBuf.readUnsignedMedium.

Gets an unsigned 24-bit medium integer at the current readerIndex and increases the readerIndex by 3 in this buffer.
public int
readUnsignedMediumLE()

Implements abstract io.netty.buffer.ByteBuf.readUnsignedMediumLE.

Gets an unsigned 24-bit medium integer at the current readerIndex in the Little Endian Byte Order and increases the readerIndex by 3 in this buffer.
public int
readUnsignedShort()

Implements abstract io.netty.buffer.ByteBuf.readUnsignedShort.

Gets an unsigned 16-bit short integer at the current readerIndex and increases the readerIndex by 2 in this buffer.
public int
readUnsignedShortLE()

Implements abstract io.netty.buffer.ByteBuf.readUnsignedShortLE.

Gets an unsigned 16-bit short integer at the current readerIndex in the Little Endian Byte Order and increases the readerIndex by 2 in this buffer.
public int
refCnt()

Implements io.netty.util.ReferenceCounted.refCnt.

Returns the reference count of this object.
private static UnsupportedOperationException
public boolean
release()

Implements io.netty.util.ReferenceCounted.release.

Decreases the reference count by 1 and deallocates this object if the reference count reaches at 0.
public boolean
release(int decrement)

Implements io.netty.util.ReferenceCounted.release.

Decreases the reference count by the specified decrement and deallocates this object if the reference count reaches at 0.
public ByteBuf
resetReaderIndex()

Implements abstract io.netty.buffer.ByteBuf.resetReaderIndex.

Repositions the current readerIndex to the marked readerIndex in this buffer.
public ByteBuf
resetWriterIndex()

Implements abstract io.netty.buffer.ByteBuf.resetWriterIndex.

Repositions the current writerIndex to the marked writerIndex in this buffer.
public ByteBuf
retain()

Implements abstract io.netty.buffer.ByteBuf.retain.

Implements io.netty.util.ReferenceCounted.retain.

Increases the reference count by 1.
public ByteBuf
retain(int increment)

Implements abstract io.netty.buffer.ByteBuf.retain.

Implements io.netty.util.ReferenceCounted.retain.

Increases the reference count by the specified increment.
public ByteBuf
retainedDuplicate()

Implements abstract io.netty.buffer.ByteBuf.retainedDuplicate.

Returns a retained buffer which shares the whole region of this buffer.
public ByteBuf
retainedSlice()

Implements abstract io.netty.buffer.ByteBuf.retainedSlice.

Returns a retained slice of this buffer's readable bytes.
public ByteBuf
retainedSlice(int index, int length)

Implements abstract io.netty.buffer.ByteBuf.retainedSlice.

Returns a retained slice of this buffer's sub-region.
public ByteBuf
setBoolean(int index, boolean value)

Implements abstract io.netty.buffer.ByteBuf.setBoolean.

Sets the specified boolean at the specified absolute index in this buffer.
public ByteBuf
setByte(int index, int value)

Implements abstract io.netty.buffer.ByteBuf.setByte.

Sets the specified byte at the specified absolute index in this buffer.
public ByteBuf
setBytes(int index, byte[] src, int srcIndex, int length)

Implements abstract io.netty.buffer.ByteBuf.setBytes.

Transfers the specified source array's data to this buffer starting at the specified absolute index.
public ByteBuf
setBytes(int index, byte[] src)

Implements abstract io.netty.buffer.ByteBuf.setBytes.

Transfers the specified source array's data to this buffer starting at the specified absolute index.
public ByteBuf
setBytes(int index, ByteBuffer src)

Implements abstract io.netty.buffer.ByteBuf.setBytes.

Transfers the specified source buffer's data to this buffer starting at the specified absolute index until the source buffer's position reaches its limit.
public ByteBuf
setBytes(int index, ByteBuf src, int
the first index of the source
srcIndex
,
int
the number of bytes to transfer
length
)

Implements abstract io.netty.buffer.ByteBuf.setBytes.

Transfers the specified source buffer's data to this buffer starting at the specified absolute index.
public ByteBuf
setBytes(int index, ByteBuf src, int
the number of bytes to transfer
length
)

Implements abstract io.netty.buffer.ByteBuf.setBytes.

Transfers the specified source buffer's data to this buffer starting at the specified absolute index.
public ByteBuf
setBytes(int index, ByteBuf src)

Implements abstract io.netty.buffer.ByteBuf.setBytes.

Transfers the specified source buffer's data to this buffer starting at the specified absolute index until the source buffer becomes unreadable.
public int
setBytes(int index, InputStream in, int
the number of bytes to transfer
length
)

Implements abstract io.netty.buffer.ByteBuf.setBytes.

Transfers the content of the specified source stream to this buffer starting at the specified absolute index.
public int
setBytes(int index, ScatteringByteChannel in, int
the maximum number of bytes to transfer
length
)

Implements abstract io.netty.buffer.ByteBuf.setBytes.

Transfers the content of the specified source channel to this buffer starting at the specified absolute index.
public int
setBytes(int index, FileChannel in, long
the file position at which the transfer is to begin
position
,
int
the maximum number of bytes to transfer
length
)

Implements abstract io.netty.buffer.ByteBuf.setBytes.

Transfers the content of the specified source channel starting at the given file position to this buffer starting at the specified absolute index.
public ByteBuf
setChar(int index, int value)

Implements abstract io.netty.buffer.ByteBuf.setChar.

Sets the specified 2-byte UTF-16 character at the specified absolute index in this buffer.
public int
setCharSequence(int
on which the sequence should be written
index
,
CharSequence
to write
sequence
,
Charset
that should be used.
charset
)

Implements abstract io.netty.buffer.ByteBuf.setCharSequence.

Writes the specified CharSequence at the given index.
pack-priv void
public ByteBuf
setDouble(int index, double value)

Implements abstract io.netty.buffer.ByteBuf.setDouble.

Sets the specified 64-bit floating-point number at the specified absolute index in this buffer.
public ByteBuf
setFloat(int index, float value)

Implements abstract io.netty.buffer.ByteBuf.setFloat.

Sets the specified 32-bit floating-point number at the specified absolute index in this buffer.
public ByteBuf
setIndex(int readerIndex, int writerIndex)

Implements abstract io.netty.buffer.ByteBuf.setIndex.

Sets the readerIndex and writerIndex of this buffer in one shot.
public ByteBuf
setInt(int index, int value)

Implements abstract io.netty.buffer.ByteBuf.setInt.

Sets the specified 32-bit integer at the specified absolute index in this buffer.
public ByteBuf
setIntLE(int index, int value)

Implements abstract io.netty.buffer.ByteBuf.setIntLE.

Sets the specified 32-bit integer at the specified absolute index in this buffer with Little Endian byte order .
public ByteBuf
setLong(int index, long value)

Implements abstract io.netty.buffer.ByteBuf.setLong.

Sets the specified 64-bit long integer at the specified absolute index in this buffer.
public ByteBuf
setLongLE(int index, long value)

Implements abstract io.netty.buffer.ByteBuf.setLongLE.

Sets the specified 64-bit long integer at the specified absolute index in this buffer in Little Endian Byte Order.
public ByteBuf
setMedium(int index, int value)

Implements abstract io.netty.buffer.ByteBuf.setMedium.

Sets the specified 24-bit medium integer at the specified absolute index in this buffer.
public ByteBuf
setMediumLE(int index, int value)

Implements abstract io.netty.buffer.ByteBuf.setMediumLE.

Sets the specified 24-bit medium integer at the specified absolute index in this buffer in the Little Endian Byte Order.
public ByteBuf
setShort(int index, int value)

Implements abstract io.netty.buffer.ByteBuf.setShort.

Sets the specified 16-bit short integer at the specified absolute index in this buffer.
public ByteBuf
setShortLE(int index, int value)

Implements abstract io.netty.buffer.ByteBuf.setShortLE.

Sets the specified 16-bit short integer at the specified absolute index in this buffer with the Little Endian Byte Order.
public ByteBuf
setZero(int index, int
the number of NULs to write to the buffer
length
)

Implements abstract io.netty.buffer.ByteBuf.setZero.

Fills this buffer with NUL (0x00) starting at the specified absolute index.
public ByteBuf
skipBytes(int length)

Implements abstract io.netty.buffer.ByteBuf.skipBytes.

Increases the current readerIndex by the specified length in this buffer.
public ByteBuf
slice()

Implements abstract io.netty.buffer.ByteBuf.slice.

Returns a slice of this buffer's readable bytes.
public ByteBuf
slice(int index, int length)

Implements abstract io.netty.buffer.ByteBuf.slice.

Returns a slice of this buffer's sub-region.
pack-priv void
public String
toString(int index, int length, Charset charset)

Implements abstract io.netty.buffer.ByteBuf.toString.

Decodes this buffer's sub-region into a string with the specified character set.
public String
toString(Charset charsetName)

Implements abstract io.netty.buffer.ByteBuf.toString.

Decodes this buffer's readable bytes into a string with the specified character set name.
public String
toString()

Implements abstract io.netty.buffer.ByteBuf.toString.

Returns the string representation of this buffer.
public ByteBuf
touch()

Implements abstract io.netty.buffer.ByteBuf.touch.

Implements io.netty.util.ReferenceCounted.touch.

Records the current access location of this object for debugging purposes.
public ByteBuf
touch(Object hint)

Implements abstract io.netty.buffer.ByteBuf.touch.

Implements io.netty.util.ReferenceCounted.touch.

Records the current access location of this object with an additional arbitrary information for debugging purposes.
public ByteBuf
unwrap()

Implements abstract io.netty.buffer.ByteBuf.unwrap.

Return the underlying buffer instance if this buffer is a wrapper of another buffer.
public int
writableBytes()

Implements abstract io.netty.buffer.ByteBuf.writableBytes.

Returns the number of writable bytes which is equal to (this.capacity - this.writerIndex).
public ByteBuf
writeBoolean(boolean value)

Implements abstract io.netty.buffer.ByteBuf.writeBoolean.

Sets the specified boolean at the current writerIndex and increases the writerIndex by 1 in this buffer.
public ByteBuf
writeByte(int value)

Implements abstract io.netty.buffer.ByteBuf.writeByte.

Sets the specified byte at the current writerIndex and increases the writerIndex by 1 in this buffer.
public ByteBuf
writeBytes(byte[] src, int
the first index of the source
srcIndex
,
int
the number of bytes to transfer
length
)

Implements abstract io.netty.buffer.ByteBuf.writeBytes.

Transfers the specified source array's data to this buffer starting at the current writerIndex and increases the writerIndex by the number of the transferred bytes (= length).
public ByteBuf
writeBytes(byte[] src)

Implements abstract io.netty.buffer.ByteBuf.writeBytes.

Transfers the specified source array's data to this buffer starting at the current writerIndex and increases the writerIndex by the number of the transferred bytes (= src.length).
public ByteBuf
writeBytes(ByteBuffer src)

Implements abstract io.netty.buffer.ByteBuf.writeBytes.

Transfers the specified source buffer's data to this buffer starting at the current writerIndex until the source buffer's position reaches its limit, and increases the writerIndex by the number of the transferred bytes.
public ByteBuf
writeBytes(ByteBuf src, int
the first index of the source
srcIndex
,
int
the number of bytes to transfer
length
)

Implements abstract io.netty.buffer.ByteBuf.writeBytes.

Transfers the specified source buffer's data to this buffer starting at the current writerIndex and increases the writerIndex by the number of the transferred bytes (= length).
public ByteBuf
writeBytes(ByteBuf src, int
the number of bytes to transfer
length
)

Implements abstract io.netty.buffer.ByteBuf.writeBytes.

Transfers the specified source buffer's data to this buffer starting at the current writerIndex and increases the writerIndex by the number of the transferred bytes (= length).
public ByteBuf
writeBytes(ByteBuf src)

Implements abstract io.netty.buffer.ByteBuf.writeBytes.

Transfers the specified source buffer's data to this buffer starting at the current writerIndex until the source buffer becomes unreadable, and increases the writerIndex by the number of the transferred bytes.
public int
writeBytes(InputStream in, int
the number of bytes to transfer
length
)

Implements abstract io.netty.buffer.ByteBuf.writeBytes.

Transfers the content of the specified stream to this buffer starting at the current writerIndex and increases the writerIndex by the number of the transferred bytes.
public int
writeBytes(ScatteringByteChannel in, int
the maximum number of bytes to transfer
length
)

Implements abstract io.netty.buffer.ByteBuf.writeBytes.

Transfers the content of the specified channel to this buffer starting at the current writerIndex and increases the writerIndex by the number of the transferred bytes.
public int
writeBytes(FileChannel in, long
the file position at which the transfer is to begin
position
,
int
the maximum number of bytes to transfer
length
)

Implements abstract io.netty.buffer.ByteBuf.writeBytes.

Transfers the content of the specified channel starting at the given file position to this buffer starting at the current writerIndex and increases the writerIndex by the number of the transferred bytes.
public ByteBuf
writeChar(int value)

Implements abstract io.netty.buffer.ByteBuf.writeChar.

Sets the specified 2-byte UTF-16 character at the current writerIndex and increases the writerIndex by 2 in this buffer.
public int
writeCharSequence(CharSequence
to write
sequence
,
Charset
that should be used
charset
)

Implements abstract io.netty.buffer.ByteBuf.writeCharSequence.

Writes the specified CharSequence at the current writerIndex and increases the writerIndex by the written bytes.
public ByteBuf
writeDouble(double value)

Implements abstract io.netty.buffer.ByteBuf.writeDouble.

Sets the specified 64-bit floating point number at the current writerIndex and increases the writerIndex by 8 in this buffer.
public ByteBuf
writeFloat(float value)

Implements abstract io.netty.buffer.ByteBuf.writeFloat.

Sets the specified 32-bit floating point number at the current writerIndex and increases the writerIndex by 4 in this buffer.
public ByteBuf
writeInt(int value)

Implements abstract io.netty.buffer.ByteBuf.writeInt.

Sets the specified 32-bit integer at the current writerIndex and increases the writerIndex by 4 in this buffer.
public ByteBuf
writeIntLE(int value)

Implements abstract io.netty.buffer.ByteBuf.writeIntLE.

Sets the specified 32-bit integer at the current writerIndex in the Little Endian Byte Order and increases the writerIndex by 4 in this buffer.
public ByteBuf
writeLong(long value)

Implements abstract io.netty.buffer.ByteBuf.writeLong.

Sets the specified 64-bit long integer at the current writerIndex and increases the writerIndex by 8 in this buffer.
public ByteBuf
writeLongLE(long value)

Implements abstract io.netty.buffer.ByteBuf.writeLongLE.

Sets the specified 64-bit long integer at the current writerIndex in the Little Endian Byte Order and increases the writerIndex by 8 in this buffer.
public ByteBuf
writeMedium(int value)

Implements abstract io.netty.buffer.ByteBuf.writeMedium.

Sets the specified 24-bit medium integer at the current writerIndex and increases the writerIndex by 3 in this buffer.
public ByteBuf
writeMediumLE(int value)

Implements abstract io.netty.buffer.ByteBuf.writeMediumLE.

Sets the specified 24-bit medium integer at the current writerIndex in the Little Endian Byte Order and increases the writerIndex by 3 in this buffer.
public int
writerIndex()

Implements abstract io.netty.buffer.ByteBuf.writerIndex.

Returns the writerIndex of this buffer.
public ByteBuf
writerIndex(int writerIndex)

Implements abstract io.netty.buffer.ByteBuf.writerIndex.

Sets the writerIndex of this buffer.
public ByteBuf
writeShort(int value)

Implements abstract io.netty.buffer.ByteBuf.writeShort.

Sets the specified 16-bit short integer at the current writerIndex and increases the writerIndex by 2 in this buffer.
public ByteBuf
writeShortLE(int value)

Implements abstract io.netty.buffer.ByteBuf.writeShortLE.

Sets the specified 16-bit short integer in the Little Endian Byte Order at the current writerIndex and increases the writerIndex by 2 in this buffer.
public ByteBuf
writeZero(int
the number of NULs to write to the buffer
length
)

Implements abstract io.netty.buffer.ByteBuf.writeZero.

Fills this buffer with NUL (0x00) starting at the current writerIndex and increases the writerIndex by the specified length.
Inherited from io.netty.buffer.ByteBuf:
asByteBufgetDoubleLEgetFloatLEisContiguousmaxFastWritableBytesreadDoubleLEreadFloatLEsetDoubleLEsetFloatLEwriteDoubleLEwriteFloatLE