| Modifier and Type | Field and Description |
|---|---|
| private ByteBufAllocator | |
| pack-priv PoolThreadCache | |
| protected PoolChunk | |
| protected long | |
| protected int | |
| pack-priv int | |
| protected T | |
| protected int | |
| private final Recycler. | |
| pack-priv ByteBuffer |
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv final ByteBuffer | |
| public final ByteBufAllocator | alloc()
Implements abstract io. ByteBufAllocator which created this buffer.
|
| public final int | capacity()
Implements abstract io. |
| public final ByteBuf | capacity(int newCapacity)
Implements abstract io. |
| protected final void | deallocate()
Implements abstract io. refCnt() is equals 0.
|
| pack-priv ByteBuffer | |
| public final int | getBytes(int index, GatheringByteChannel out, int
the maximum number of bytes to transfer length)Implements abstract io. index.
|
| public final 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.
|
| protected final int | |
| pack-priv void | init(PoolChunk<T> chunk, ByteBuffer nioBuffer, long handle, int offset, int length, int maxLength, PoolThreadCache cache)
|
| private void | init0(PoolChunk<T> chunk, ByteBuffer nioBuffer, long handle, int offset, int length, int maxLength, PoolThreadCache cache)
|
| pack-priv void | |
| protected final ByteBuffer | |
| public final 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 int | maxFastWritableBytes()
Overrides io. |
| protected abstract ByteBuffer | |
| public final ByteBuffer | nioBuffer(int index, int length)
Implements abstract io. ByteBuffer.
|
| public final int | nioBufferCount()
Implements abstract io. ByteBuffers that consist this buffer.
|
| public final 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 final ByteOrder | |
| public final int | readBytes(GatheringByteChannel out, int
the maximum number of bytes to transfer length)Overrides io. readerIndex.
|
| public final 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)Overrides io. readerIndex
to the specified channel starting at the given file position.
|
| public final ByteBuf | retainedDuplicate()
Overrides io. |
| public final ByteBuf | retainedSlice()
Returns a retained slice of this buffer's readable bytes.
|
| public final ByteBuf | retainedSlice(int index, int length)
Returns a retained slice of this buffer's sub-region.
|
| pack-priv final void | |
| public final int | setBytes(int index, ScatteringByteChannel in, int
the maximum number of bytes to transfer length)Implements abstract io. index.
|
| public final 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 final ByteBuf | unwrap()
Implements abstract io. |
| allocator | back to summary |
|---|---|
| private ByteBufAllocator allocator | |
| cache | back to summary |
|---|---|
| pack-priv PoolThreadCache cache | |
| chunk | back to summary |
|---|---|
| protected PoolChunk<T> chunk | |
| handle | back to summary |
|---|---|
| protected long handle | |
| length | back to summary |
|---|---|
| protected int length | |
| maxLength | back to summary |
|---|---|
| pack-priv int maxLength | |
| memory | back to summary |
|---|---|
| protected T memory | |
| offset | back to summary |
|---|---|
| protected int offset | |
| recyclerHandle | back to summary |
|---|---|
| private final Recycler. | |
| tmpNioBuf | back to summary |
|---|---|
| pack-priv ByteBuffer tmpNioBuf | |
| PooledByteBuf | back to summary |
|---|---|
protected PooledByteBuf(ObjectPool.
| |
| _internalNioBuffer | back to summary |
|---|---|
| pack-priv final ByteBuffer _internalNioBuffer(int index, int length, boolean duplicate) | |
| alloc | back to summary |
|---|---|
| public final ByteBufAllocator alloc() Implements abstract io. Doc from io. Returns the
| |
| capacity | back to summary |
|---|---|
| public final int capacity() Implements abstract io. Doc from io. Returns the number of bytes (octets) this buffer can contain.
| |
| capacity | back to summary |
|---|---|
| public final ByteBuf capacity(int newCapacity) Implements abstract io. Doc from io. Adjusts the capacity of this buffer. If the
| |
| deallocate | back to summary |
|---|---|
| protected final void deallocate() Implements abstract io. Doc from io. Called once
| |
| duplicateInternalNioBuffer | back to summary |
|---|---|
| pack-priv ByteBuffer duplicateInternalNioBuffer(int index, int length) | |
| getBytes | back to summary |
|---|---|
| public final 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 final 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
| |
| idx | back to summary |
|---|---|
| protected final int idx(int index) | |
| init | back to summary |
|---|---|
| pack-priv void init(PoolChunk<T> chunk, ByteBuffer nioBuffer, long handle, int offset, int length, int maxLength, PoolThreadCache cache) | |
| init0 | back to summary |
|---|---|
| private void init0(PoolChunk<T> chunk, ByteBuffer nioBuffer, long handle, int offset, int length, int maxLength, PoolThreadCache cache) | |
| initUnpooled | back to summary |
|---|---|
| pack-priv void initUnpooled(PoolChunk<T> chunk, int length) | |
| internalNioBuffer | back to summary |
|---|---|
| protected final ByteBuffer internalNioBuffer() | |
| internalNioBuffer | back to summary |
|---|---|
| public final ByteBuffer internalNioBuffer(int index, int length) Implements abstract io. Doc from io. Internal use only: Exposes the internal NIO buffer.
| |
| isContiguous | back to summary |
|---|---|
| public final boolean isContiguous() Overrides io. Doc from io. Returns
This method will return
| |
| maxFastWritableBytes | back to summary |
|---|---|
| public int maxFastWritableBytes() Overrides io. Doc from io. Returns the maximum number of bytes which can be written for certain without involving
an internal reallocation or data-copy. The returned value will be ≥
| |
| newInternalNioBuffer | back to summary |
|---|---|
| protected abstract ByteBuffer newInternalNioBuffer(T memory) | |
| nioBuffer | back to summary |
|---|---|
| public final ByteBuffer nioBuffer(int index, int length) Implements abstract io. Doc from io. Exposes this buffer's sub-region as an NIO
| |
| nioBufferCount | back to summary |
|---|---|
| public final int nioBufferCount() Implements abstract io. Doc from io. Returns the maximum number of NIO
| |
| nioBuffers | back to summary |
|---|---|
| public final 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 final ByteOrder order() Implements abstract io. Doc from io. Returns the endianness of this buffer.
| |
| readBytes | back to summary |
|---|---|
| public final int readBytes(GatheringByteChannel out, int length) throws IOException Overrides io. Doc from io. Transfers this buffer's data to the specified stream starting at the
current
| |
| readBytes | back to summary |
|---|---|
| public final int readBytes(FileChannel out, long position, int length) throws IOException Overrides io. Doc from io. Transfers this buffer's data starting at the current
| |
| retainedDuplicate | back to summary |
|---|---|
| public final ByteBuf retainedDuplicate() Overrides io. Doc from io. Returns a retained buffer which shares the whole region of this buffer.
Modifying the content of the returned buffer or this buffer affects
each other's content while they maintain separate indexes and marks.
This method is identical to
Note that this method returns a retained buffer unlike
| |
| retainedSlice | back to summary |
|---|---|
| public final ByteBuf retainedSlice() Overrides io. Doc from io. Returns a retained slice of this buffer's readable bytes. Modifying the content
of the returned buffer or this buffer affects each other's content
while they maintain separate indexes and marks. This method is
identical to
Note that this method returns a retained buffer unlike
| |
| retainedSlice | back to summary |
|---|---|
| public final ByteBuf retainedSlice(int index, int length) Overrides io. Doc from io. Returns a retained 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
Note that this method returns a retained buffer unlike
| |
| reuse | back to summary |
|---|---|
| pack-priv final void reuse(int maxCapacity) Method must be called before reuse this | |
| setBytes | back to summary |
|---|---|
| public final 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 final 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
| |
| unwrap | back to summary |
|---|---|
| public final ByteBuf unwrap() Implements abstract io. Doc from io. Return the underlying buffer instance if this buffer is a wrapper of another buffer. | |