ByteBuf implementations.
| Modifier and Type | Class and Description |
|---|---|
| private static class | AbstractPooledDerivedByteBuf.PooledNonRetainedDuplicateByteBuf
Deprecated
as a consequence of
UnpooledDuplicatedByteBuf being deprecated.
|
| private static class | AbstractPooledDerivedByteBuf.PooledNonRetainedSlicedByteBuf
Deprecated
as a consequence of
UnpooledSlicedByteBuf being deprecated.
|
| Modifier and Type | Field and Description |
|---|---|
| private ByteBuf | parent
Deallocations of a pooled derived buffer should always propagate through the entire chain of derived buffers. |
| private final Recycler. | |
| private AbstractByteBuf |
| Access | Constructor and Description |
|---|---|
| pack-priv | AbstractPooledDerivedByteBuf(ObjectPool.
|
| Modifier and Type | Method and Description |
|---|---|
| public final ByteBufAllocator | alloc()
Implements abstract io. ByteBufAllocator which created this buffer.
|
| public byte[] | array()
Implements abstract io. |
| protected final void | deallocate()
Implements abstract io. refCnt() is equals 0.
|
| pack-priv final ByteBuf | |
| 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.
|
| pack-priv final <U extends AbstractPooledDerivedByteBuf> U | |
| public final ByteBuffer | internalNioBuffer(int index, int length)
Implements abstract io. |
| public boolean | isContiguous()
Overrides io. true if this ByteBuf implementation is backed by a single memory region.
|
| public final 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 final int | nioBufferCount()
Implements abstract io. ByteBuffers that consist this buffer.
|
| public final ByteOrder | order()
Implements abstract io.
Deprecated
Returns the endianness
of this buffer.
|
| pack-priv final void | |
| public final ByteBuf | retainedSlice()
Returns a retained slice of this buffer's readable bytes.
|
| public ByteBuf | slice(int index, int length)
Overrides io. |
| public final AbstractByteBuf | unwrap()
Implements abstract io. |
| parent | back to summary |
|---|---|
| private ByteBuf parent Deallocations of a pooled derived buffer should always propagate through the entire chain of derived buffers. This is because each pooled derived buffer maintains its own reference count and we should respect each one. If deallocations cause a release of the "root parent" then then we may prematurely release the underlying content before all the derived buffers have been released. | |
| recyclerHandle | back to summary |
|---|---|
| private final Recycler. | |
| rootParent | back to summary |
|---|---|
| private AbstractByteBuf rootParent | |
| AbstractPooledDerivedByteBuf | back to summary |
|---|---|
pack-priv AbstractPooledDerivedByteBuf(ObjectPool.
| |
| alloc | back to summary |
|---|---|
| public final 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.
| |
| deallocate | back to summary |
|---|---|
| protected final void deallocate() Implements abstract io. Doc from io. Called once
| |
| duplicate0 | back to summary |
|---|---|
| pack-priv final ByteBuf duplicate0() | |
| 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
| |
| init | back to summary |
|---|---|
| pack-priv final <U extends AbstractPooledDerivedByteBuf> U init(AbstractByteBuf unwrapped, ByteBuf wrapped, int readerIndex, int writerIndex, int maxCapacity) | |
| 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 boolean isContiguous() Overrides io. Doc from io. Returns
This method will return
| |
| isDirect | back to summary |
|---|---|
| public final boolean isDirect() Implements abstract io. Doc from io. Returns
| |
| isReadOnly | back to summary |
|---|---|
| public boolean isReadOnly() Overrides io. Doc from io. Returns
| |
| nioBufferCount | back to summary |
|---|---|
| public final int nioBufferCount() Implements abstract io. Doc from io. Returns the maximum number of NIO
| |
| order | back to summary |
|---|---|
| public final ByteOrder order() Implements abstract io. Doc from io. Deprecated
Returns the endianness of this buffer.
| |
| parent | back to summary |
|---|---|
| pack-priv final void parent(ByteBuf newParent) | |
| 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
| |
| 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 final AbstractByteBuf unwrap() Implements abstract io. Doc from io. Return the underlying buffer instance if this buffer is a wrapper of another buffer.
| |
Deprecated
as a consequence of UnpooledDuplicatedByteBuf being deprecated. See corresponding docs for further information.
| Modifier and Type | Field and Description |
|---|---|
| private final ByteBuf |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public ByteBuf | duplicate()
Overrides io. |
| pack-priv boolean | |
| pack-priv int | |
| pack-priv boolean | |
| pack-priv boolean | |
| pack-priv ByteBuf | |
| pack-priv ByteBuf | |
| public ByteBuf | retainedDuplicate()
Overrides io. |
| public ByteBuf | retainedSlice()
Returns a retained slice of this buffer's readable bytes.
|
| public ByteBuf | retainedSlice(int index, int length)
Returns a retained slice of this buffer's sub-region.
|
| public ByteBuf | slice(int index, int length)
Overrides io. |
| pack-priv ByteBuf | |
| pack-priv ByteBuf |
| referenceCountDelegate | back to summary |
|---|---|
| private final ByteBuf referenceCountDelegate | |
| PooledNonRetainedDuplicateByteBuf | back to summary |
|---|---|
| pack-priv PooledNonRetainedDuplicateByteBuf(ByteBuf referenceCountDelegate, AbstractByteBuf buffer) | |
| duplicate | back to summary |
|---|---|
| public ByteBuf duplicate() Overrides io. Doc from io. Returns a 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 does not modify
The reader and writer marks will not be duplicated. Also be aware that this method will
NOT call | |
| isAccessible0 | back to summary |
|---|---|
| pack-priv boolean isAccessible0() Overrides io.
| |
| refCnt0 | back to summary |
|---|---|
| pack-priv int refCnt0() Overrides io.
| |
| release0 | back to summary |
|---|---|
| pack-priv boolean release0() Overrides io.
| |
| release0 | back to summary |
|---|---|
| pack-priv boolean release0(int decrement) Overrides io.
| |
| retain0 | back to summary |
|---|---|
| pack-priv ByteBuf retain0() Overrides io.
| |
| retain0 | back to summary |
|---|---|
| pack-priv ByteBuf retain0(int increment) Overrides io.
| |
| retainedDuplicate | back to summary |
|---|---|
| public 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 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 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
| |
| 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
| |
| touch0 | back to summary |
|---|---|
| pack-priv ByteBuf touch0() Overrides io.
| |
| touch0 | back to summary |
|---|---|
| pack-priv ByteBuf touch0(Object hint) Overrides io.
| |
Deprecated
as a consequence of UnpooledSlicedByteBuf being deprecated. See corresponding docs for further information.
| Modifier and Type | Field and Description |
|---|---|
| private final ByteBuf |
| Access | Constructor and Description |
|---|---|
| pack-priv | PooledNonRetainedSlicedByteBuf(ByteBuf referenceCountDelegate, AbstractByteBuf buffer, int index, int length)
|
| Modifier and Type | Method and Description |
|---|---|
| public ByteBuf | duplicate()
Overrides io. |
| pack-priv boolean | |
| pack-priv int | |
| pack-priv boolean | |
| pack-priv boolean | |
| pack-priv ByteBuf | |
| pack-priv ByteBuf | |
| public ByteBuf | retainedDuplicate()
Overrides io. |
| public ByteBuf | retainedSlice()
Returns a retained slice of this buffer's readable bytes.
|
| public ByteBuf | retainedSlice(int index, int length)
Returns a retained slice of this buffer's sub-region.
|
| public ByteBuf | slice(int index, int length)
Overrides io. |
| pack-priv ByteBuf | |
| pack-priv ByteBuf |
| referenceCountDelegate | back to summary |
|---|---|
| private final ByteBuf referenceCountDelegate | |
| PooledNonRetainedSlicedByteBuf | back to summary |
|---|---|
| pack-priv PooledNonRetainedSlicedByteBuf(ByteBuf referenceCountDelegate, AbstractByteBuf buffer, int index, int length) | |
| duplicate | back to summary |
|---|---|
| public ByteBuf duplicate() Overrides io. Doc from io. Returns a 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 does not modify
The reader and writer marks will not be duplicated. Also be aware that this method will
NOT call | |
| isAccessible0 | back to summary |
|---|---|
| pack-priv boolean isAccessible0() Overrides io.
| |
| refCnt0 | back to summary |
|---|---|
| pack-priv int refCnt0() Overrides io.
| |
| release0 | back to summary |
|---|---|
| pack-priv boolean release0() Overrides io.
| |
| release0 | back to summary |
|---|---|
| pack-priv boolean release0(int decrement) Overrides io.
| |
| retain0 | back to summary |
|---|---|
| pack-priv ByteBuf retain0() Overrides io.
| |
| retain0 | back to summary |
|---|---|
| pack-priv ByteBuf retain0(int increment) Overrides io.
| |
| retainedDuplicate | back to summary |
|---|---|
| public 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 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 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
| |
| 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
| |
| touch0 | back to summary |
|---|---|
| pack-priv ByteBuf touch0() Overrides io.
| |
| touch0 | back to summary |
|---|---|
| pack-priv ByteBuf touch0(Object hint) Overrides io.
| |