Deprecated
Do not use.
ByteBuf#duplicate() instead
of calling the constructor explicitly.
| Access | Constructor and Description |
|---|---|
| public | |
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| protected byte | |
| protected int | |
| protected int | |
| protected long | |
| protected long | |
| protected short | |
| protected short | |
| protected int | _getUnsignedMedium(int index)
Implements abstract io. |
| protected int | _getUnsignedMediumLE(int index)
Implements abstract io. |
| protected void | |
| protected void | |
| protected void | |
| protected void | |
| protected void | |
| protected void | |
| protected void | |
| protected void | |
| protected void | |
| public ByteBufAllocator | alloc()
Implements abstract io. ByteBufAllocator which created this buffer.
|
| public byte[] | array()
Implements abstract io. |
| public int | arrayOffset()
Implements abstract io. |
| public int | capacity()
Implements abstract io. |
| public ByteBuf | capacity(int newCapacity)
Implements abstract io. |
| public ByteBuf | copy(int index, int length)
Implements abstract io. |
| public int | forEachByte(int index, int length, ByteProcessor processor)
Overrides io. processor in ascending order.
|
| public int | forEachByteDesc(int index, int length, ByteProcessor processor)
Overrides io. processor in descending order.
|
| public byte | getByte(int index)
Overrides io. index in this buffer.
|
| 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. index.
|
| 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. index.
|
| public ByteBuf | getBytes(int index, ByteBuffer dst)
Implements abstract io. index until the destination's position
reaches its limit.
|
| public ByteBuf | getBytes(int index, OutputStream out, int
the number of bytes to transfer length)Implements abstract io. index.
|
| public int | getBytes(int index, GatheringByteChannel out, int
the maximum number of bytes to transfer length)Implements abstract io. 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. index
to the specified channel starting at the given file position.
|
| public int | getInt(int index)
Overrides io. index in
this buffer.
|
| public int | getIntLE(int index)
Overrides io. index in
this buffer with Little Endian Byte Order.
|
| public long | getLong(int index)
Overrides io. index in
this buffer.
|
| public long | getLongLE(int index)
Overrides io. index in
this buffer in Little Endian Byte Order.
|
| public short | getShort(int index)
Overrides io. index in
this buffer.
|
| public short | getShortLE(int index)
Overrides io. index in
this buffer in Little Endian Byte Order.
|
| public int | getUnsignedMedium(int index)
Overrides io. index in this buffer.
|
| public int | getUnsignedMediumLE(int index)
Overrides io. index in this buffer in Little Endian Byte Order.
|
| public boolean | hasArray()
Implements abstract io. true if and only if this buffer has a backing byte array.
|
| public boolean | hasMemoryAddress()
Implements abstract io. true if and only if this buffer has a reference to the low-level memory address that points
to the backing data.
|
| public boolean | isDirect()
Implements abstract io. true if and only if this buffer is backed by an
NIO direct buffer.
|
| public long | memoryAddress()
Implements abstract io. |
| public int | nioBufferCount()
Implements abstract io. ByteBuffers that consist this buffer.
|
| public ByteBuffer[] | nioBuffers(int index, int length)
Implements abstract io. 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.
Deprecated
Returns the endianness
of this buffer.
|
| public ByteBuf | setByte(int index, int value)
Overrides io. index in this
buffer.
|
| public ByteBuf | setBytes(int index, byte[] src, int srcIndex, int length)
Implements abstract io. index.
|
| 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. index.
|
| public ByteBuf | setBytes(int index, ByteBuffer src)
Implements abstract io. index until the source buffer's position
reaches its limit.
|
| public int | setBytes(int index, InputStream in, int
the number of bytes to transfer length)Implements abstract io. index.
|
| public int | setBytes(int index, ScatteringByteChannel in, int
the maximum number of bytes to transfer length)Implements abstract io. 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. index.
|
| public ByteBuf | setInt(int index, int value)
Overrides io. index in this buffer.
|
| public ByteBuf | setIntLE(int index, int value)
Overrides io. index in this buffer with Little Endian byte order
.
|
| public ByteBuf | setLong(int index, long value)
Overrides io. index in this buffer.
|
| public ByteBuf | setLongLE(int index, long value)
Overrides io. index in this buffer in Little Endian Byte Order.
|
| public ByteBuf | setMedium(int index, int value)
Overrides io. index in this buffer.
|
| public ByteBuf | setMediumLE(int index, int value)
Overrides io. index in this buffer in the Little Endian Byte Order.
|
| public ByteBuf | setShort(int index, int value)
Overrides io. index in this buffer.
|
| public ByteBuf | setShortLE(int index, int value)
Overrides io. index in this buffer with the Little Endian Byte Order.
|
| public ByteBuf | slice(int index, int length)
Overrides io. |
| public ByteBuf | unwrap()
Implements abstract io. |
| buffer | back to summary |
|---|---|
| private final ByteBuf buffer | |
| DuplicatedByteBuf | back to summary |
|---|---|
| public DuplicatedByteBuf(ByteBuf buffer) | |
| DuplicatedByteBuf | back to summary |
|---|---|
| pack-priv DuplicatedByteBuf(ByteBuf buffer, int readerIndex, int writerIndex) | |
| _getByte | back to summary |
|---|---|
| protected byte _getByte(int index) Implements abstract io.
| |
| _getInt | back to summary |
|---|---|
| protected int _getInt(int index) Implements abstract io.
| |
| _getIntLE | back to summary |
|---|---|
| protected int _getIntLE(int index) Implements abstract io.
| |
| _getLong | back to summary |
|---|---|
| protected long _getLong(int index) Implements abstract io.
| |
| _getLongLE | back to summary |
|---|---|
| protected long _getLongLE(int index) Implements abstract io.
| |
| _getShort | back to summary |
|---|---|
| protected short _getShort(int index) Implements abstract io.
| |
| _getShortLE | back to summary |
|---|---|
| protected short _getShortLE(int index) Implements abstract io.
| |
| _getUnsignedMedium | back to summary |
|---|---|
| protected int _getUnsignedMedium(int index) Implements abstract io.
| |
| _getUnsignedMediumLE | back to summary |
|---|---|
| protected int _getUnsignedMediumLE(int index) Implements abstract io.
| |
| _setByte | back to summary |
|---|---|
| protected void _setByte(int index, int value) Implements abstract io.
| |
| _setInt | back to summary |
|---|---|
| protected void _setInt(int index, int value) Implements abstract io.
| |
| _setIntLE | back to summary |
|---|---|
| protected void _setIntLE(int index, int value) Implements abstract io.
| |
| _setLong | back to summary |
|---|---|
| protected void _setLong(int index, long value) Implements abstract io.
| |
| _setLongLE | back to summary |
|---|---|
| protected void _setLongLE(int index, long value) Implements abstract io.
| |
| _setMedium | back to summary |
|---|---|
| protected void _setMedium(int index, int value) Implements abstract io.
| |
| _setMediumLE | back to summary |
|---|---|
| protected void _setMediumLE(int index, int value) Implements abstract io.
| |
| _setShort | back to summary |
|---|---|
| protected void _setShort(int index, int value) Implements abstract io.
| |
| _setShortLE | back to summary |
|---|---|
| protected void _setShortLE(int index, int value) Implements abstract io.
| |
| alloc | back to summary |
|---|---|
| public ByteBufAllocator alloc() Implements abstract io. Doc from io. Returns the
| |
| array | back to summary |
|---|---|
| public byte[] array() Implements abstract io. Doc from io. Returns the backing byte array of this buffer.
| |
| arrayOffset | back to summary |
|---|---|
| public int arrayOffset() Implements abstract io. Doc from io. Returns the offset of the first byte within the backing byte array of this buffer.
| |
| capacity | back to summary |
|---|---|
| public int capacity() Implements abstract io. Doc from io. Returns the number of bytes (octets) this buffer can contain.
| |
| capacity | back to summary |
|---|---|
| public ByteBuf capacity(int newCapacity) Implements abstract io. Doc from io. Adjusts the capacity of this buffer. If the
| |
| copy | back to summary |
|---|---|
| public ByteBuf copy(int index, int length) Implements abstract io. Doc from io. Returns a copy of this buffer's sub-region. Modifying the content of
the returned buffer or this buffer does not affect each other at all.
This method does not modify
| |
| forEachByte | back to summary |
|---|---|
| public int forEachByte(int index, int length, ByteProcessor processor) Overrides io. Doc from io. Iterates over the specified area of this buffer with the specified
| |
| forEachByteDesc | back to summary |
|---|---|
| public int forEachByteDesc(int index, int length, ByteProcessor processor) Overrides io. Doc from io. Iterates over the specified area of this buffer with the specified
| |
| getByte | back to summary |
|---|---|
| public byte getByte(int index) Overrides io. Doc from io. Gets a byte at the specified absolute
| |
| getBytes | back to summary |
|---|---|
| public ByteBuf getBytes(int index, ByteBuf dst, int dstIndex, int length) Implements abstract io. Doc from io. Transfers this buffer's data to the specified destination starting at
the specified absolute
| |
| getBytes | back to summary |
|---|---|
| public ByteBuf getBytes(int index, byte[] dst, int dstIndex, int length) Implements abstract io. Doc from io. Transfers this buffer's data to the specified destination starting at
the specified absolute
| |
| getBytes | back to summary |
|---|---|
| public ByteBuf getBytes(int index, ByteBuffer dst) Implements abstract io. Doc from io. Transfers this buffer's data to the specified destination starting at
the specified absolute
| |
| getBytes | back to summary |
|---|---|
| public ByteBuf getBytes(int index, OutputStream out, int length) throws IOException Implements abstract io. Doc from io. Transfers this buffer's data to the specified stream starting at the
specified absolute
| |
| getBytes | back to summary |
|---|---|
| public int getBytes(int index, GatheringByteChannel out, int length) throws IOException Implements abstract io. Doc from io. Transfers this buffer's data to the specified channel starting at the
specified absolute
| |
| getBytes | back to summary |
|---|---|
| public int getBytes(int index, FileChannel out, long position, int length) throws IOException Implements abstract io. Doc from io. Transfers this buffer's data starting at the specified absolute
| |
| getInt | back to summary |
|---|---|
| public int getInt(int index) Overrides io. Doc from io. Gets a 32-bit integer at the specified absolute
| |
| getIntLE | back to summary |
|---|---|
| public int getIntLE(int index) Overrides io. Doc from io. Gets a 32-bit integer at the specified absolute
| |
| getLong | back to summary |
|---|---|
| public long getLong(int index) Overrides io. Doc from io. Gets a 64-bit long integer at the specified absolute
| |
| getLongLE | back to summary |
|---|---|
| public long getLongLE(int index) Overrides io. Doc from io. Gets a 64-bit long integer at the specified absolute
| |
| getShort | back to summary |
|---|---|
| public short getShort(int index) Overrides io. Doc from io. Gets a 16-bit short integer at the specified absolute
| |
| getShortLE | back to summary |
|---|---|
| public short getShortLE(int index) Overrides io. Doc from io. Gets a 16-bit short integer at the specified absolute
| |
| getUnsignedMedium | back to summary |
|---|---|
| public int getUnsignedMedium(int index) Overrides io. Doc from io. Gets an unsigned 24-bit medium integer at the specified absolute
| |
| getUnsignedMediumLE | back to summary |
|---|---|
| public int getUnsignedMediumLE(int index) Overrides io. Doc from io. Gets an unsigned 24-bit medium integer at the specified absolute
| |
| hasArray | back to summary |
|---|---|
| public boolean hasArray() Implements abstract io. Doc from io. Returns
| |
| hasMemoryAddress | back to summary |
|---|---|
| public boolean hasMemoryAddress() Implements abstract io. Doc from io. Returns
| |
| isDirect | back to summary |
|---|---|
| public boolean isDirect() Implements abstract io. Doc from io. Returns
| |
| memoryAddress | back to summary |
|---|---|
| public long memoryAddress() Implements abstract io. Doc from io. Returns the low-level memory address that point to the first byte of ths backing data.
| |
| nioBufferCount | back to summary |
|---|---|
| public int nioBufferCount() Implements abstract io. Doc from io. Returns the maximum number of NIO
| |
| nioBuffers | back to summary |
|---|---|
| public ByteBuffer[] nioBuffers(int index, int length) Implements abstract io. Doc from io. Exposes this buffer's bytes as an NIO
| |
| order | back to summary |
|---|---|
| public ByteOrder order() Implements abstract io. Doc from io. Deprecated
Returns the endianness of this buffer.
| |
| setByte | back to summary |
|---|---|
| public ByteBuf setByte(int index, int value) Overrides io. Doc from io. Sets the specified byte at the specified absolute
| |
| setBytes | back to summary |
|---|---|
| public ByteBuf setBytes(int index, byte[] src, int srcIndex, int length) Implements abstract io. Doc from io. Transfers the specified source array's data to this buffer starting at
the specified absolute
| |
| setBytes | back to summary |
|---|---|
| public ByteBuf setBytes(int index, ByteBuf src, int srcIndex, int length) Implements abstract io. Doc from io. Transfers the specified source buffer's data to this buffer starting at
the specified absolute
| |
| setBytes | back to summary |
|---|---|
| public ByteBuf setBytes(int index, ByteBuffer src) Implements abstract io. Doc from io. Transfers the specified source buffer's data to this buffer starting at
the specified absolute
| |
| setBytes | back to summary |
|---|---|
| public int setBytes(int index, InputStream in, int length) throws IOException Implements abstract io. Doc from io. Transfers the content of the specified source stream to this buffer
starting at the specified absolute
| |
| setBytes | back to summary |
|---|---|
| public int setBytes(int index, ScatteringByteChannel in, int length) throws IOException Implements abstract io. Doc from io. Transfers the content of the specified source channel to this buffer
starting at the specified absolute
| |
| setBytes | back to summary |
|---|---|
| public int setBytes(int index, FileChannel in, long position, int length) throws IOException Implements abstract io. Doc from io. Transfers the content of the specified source channel starting at the given file position
to this buffer starting at the specified absolute
| |
| setInt | back to summary |
|---|---|
| public ByteBuf setInt(int index, int value) Overrides io. Doc from io. Sets the specified 32-bit integer at the specified absolute
| |
| setIntLE | back to summary |
|---|---|
| public ByteBuf setIntLE(int index, int value) Overrides io. Doc from io. Sets the specified 32-bit integer at the specified absolute
| |
| setLong | back to summary |
|---|---|
| public ByteBuf setLong(int index, long value) Overrides io. Doc from io. Sets the specified 64-bit long integer at the specified absolute
| |
| setLongLE | back to summary |
|---|---|
| public ByteBuf setLongLE(int index, long value) Overrides io. Doc from io. Sets the specified 64-bit long integer at the specified absolute
| |
| setMedium | back to summary |
|---|---|
| public ByteBuf setMedium(int index, int value) Overrides io. Doc from io. Sets the specified 24-bit medium integer at the specified absolute
| |
| setMediumLE | back to summary |
|---|---|
| public ByteBuf setMediumLE(int index, int value) Overrides io. Doc from io. Sets the specified 24-bit medium integer at the specified absolute
| |
| setShort | back to summary |
|---|---|
| public ByteBuf setShort(int index, int value) Overrides io. Doc from io. Sets the specified 16-bit short integer at the specified absolute
| |
| setShortLE | back to summary |
|---|---|
| public ByteBuf setShortLE(int index, int value) Overrides io. Doc from io. Sets the specified 16-bit short integer at the specified absolute
| |
| slice | back to summary |
|---|---|
| public ByteBuf slice(int index, int length) Overrides io. Doc from io. Returns a slice of this buffer's sub-region. Modifying the content of
the returned buffer or this buffer affects each other's content while
they maintain separate indexes and marks.
This method does not modify
Also be aware that this method will NOT call
| |
| unwrap | back to summary |
|---|---|
| public ByteBuf unwrap() Implements abstract io. Doc from io. Return the underlying buffer instance if this buffer is a wrapper of another buffer. | |