ByteBuf implementation that wraps another buffer to prevent a user from increasing or decreasing the
wrapped buffer's reference count.
| Modifier and Type | Field and Description |
|---|---|
| private SwappedByteBuf | swappedBuf
Deprecated
as a consequence of
SwappedByteBuf being deprecated.
|
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public ByteBuf | asReadOnly()
Overrides io. |
| public ByteBuf | duplicate()
Overrides io. |
| public ByteBuf | order(ByteOrder endianness)
Overrides io. endianness which shares the whole region,
indexes, and marks of this buffer.
|
| public ByteBuf | readRetainedSlice(int
the size of the new slice length)Overrides io. readerIndex and increases the readerIndex by the size
of the new slice (= length).
|
| public ByteBuf | readSlice(int
the size of the new slice length)Overrides io. readerIndex and increases the readerIndex by the size
of the new slice (= length).
|
| public boolean | release()
Overrides io. Implements io. 1 and deallocates this object if the reference count reaches at
0.
|
| public boolean | release(int decrement)
Overrides io. Implements io. decrement and deallocates this object if the reference
count reaches at 0.
|
| public ByteBuf | retain(int increment)
Overrides io. Implements io. increment.
|
| public ByteBuf | retain()
Overrides io. Implements io. 1.
|
| public ByteBuf | retainedDuplicate()
Returns a retained buffer which shares the whole region of this buffer.
|
| public ByteBuf | retainedSlice()
Overrides io. |
| public ByteBuf | retainedSlice(int index, int length)
Overrides io. |
| public ByteBuf | slice()
Overrides io. |
| public ByteBuf | slice(int index, int length)
Overrides io. |
| public ByteBuf | touch()
Overrides io. Implements io. |
| public ByteBuf | touch(Object hint)
Overrides io. Implements io. |
| swappedBuf | back to summary |
|---|---|
| private SwappedByteBuf swappedBuf
Deprecated as a consequence of | |
| UnreleasableByteBuf | back to summary |
|---|---|
| pack-priv UnreleasableByteBuf(ByteBuf buf) | |
| asReadOnly | back to summary |
|---|---|
| public ByteBuf asReadOnly() Overrides io. Doc from io. Returns a read-only version of this 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 | |
| order | back to summary |
|---|---|
| public ByteBuf order(ByteOrder endianness) Overrides io. Doc from io. Returns a buffer with the specified
| |
| readRetainedSlice | back to summary |
|---|---|
| public ByteBuf readRetainedSlice(int length) Overrides io. Doc from io. Returns a new retained slice of this buffer's sub-region starting at the current
Note that this method returns a retained buffer unlike | |
| readSlice | back to summary |
|---|---|
| public ByteBuf readSlice(int length) Overrides io. Doc from io. Returns a new slice of this buffer's sub-region starting at the current
Also be aware that this method will NOT call | |
| release | back to summary |
|---|---|
| public boolean release() Overrides io. Implements io. Doc from io. Decreases the reference count by
| |
| release | back to summary |
|---|---|
| public boolean release(int decrement) Overrides io. Implements io. Doc from io. Decreases the reference count by the specified
| |
| retain | back to summary |
|---|---|
| public ByteBuf retain(int increment) Overrides io. Implements io. Doc from io. Increases the reference count by the specified
| |
| retain | back to summary |
|---|---|
| public ByteBuf retain() Overrides io. Implements io. Doc from io. Increases the reference count by
| |
| 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() Overrides io. Doc from io. Returns a 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
Also be aware that this method will NOT call
| |
| 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
| |
| touch | back to summary |
|---|---|
| public ByteBuf touch() Overrides io. Implements io. Doc from io. Records the current access location of this object for debugging purposes.
If this object is determined to be leaked, the information recorded by this operation will be provided to you
via
| |
| touch | back to summary |
|---|---|
| public ByteBuf touch(Object hint) Overrides io. Implements io. Doc from io. Records the current access location of this object with an additional arbitrary information for debugging
purposes. If this object is determined to be leaked, the information recorded by this operation will be
provided to you via
| |