| Modifier and Type | Field and Description |
|---|---|
| private final ByteBufAllocator | |
| protected final ByteBuffer | |
| private ByteBuffer |
| Access | Constructor and Description |
|---|---|
| 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. |
| protected void | deallocate()
Implements abstract io. refCnt() is equals 0.
|
| public ByteBuf | ensureWritable(int
the expected minimum number of writable bytes minWritableBytes)Overrides io. 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 force)writerIndex() + minWritableBytes > maxCapacity():
Overrides io. capacity() to make sure the number of
writable bytes is equal to or greater than the
specified value.
|
| 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.
|
| protected final ByteBuffer | |
| public ByteBuffer | internalNioBuffer(int index, int length)
Implements abstract io. |
| public final boolean | isContiguous()
Overrides io. true if this ByteBuf implementation is backed by a single memory region.
|
| public boolean | isDirect()
Implements abstract io. true if and only if this buffer is backed by an
NIO direct buffer.
|
| public boolean | isReadOnly()
Overrides io. true if and only if this buffer is read-only.
|
| public boolean | isWritable()
Overrides io. true
if and only if (this.capacity - this.writerIndex) is greater
than 0.
|
| public boolean | isWritable(int numBytes)
Overrides io. true if and only if this buffer has enough room to allow writing the specified number of
elements.
|
| public long | memoryAddress()
Implements abstract io. |
| public ByteBuffer | nioBuffer(int index, int length)
Implements abstract io. ByteBuffer.
|
| 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 | |
| public ByteBuf | setByte(int index, int value)
Overrides io. index in this
buffer.
|
| 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, byte[] src, int srcIndex, int 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 | unwrap()
Implements abstract io. |