Top Description Fields Constructors Methods
io.netty.buffer

public abstract Class AbstractDerivedByteBuf

extends AbstractByteBuf
Class Inheritance
Known Direct Subclasses
io.netty.buffer.AbstractUnpooledSlicedByteBuf, io.netty.buffer.ReadOnlyByteBuf, io.netty.buffer.DuplicatedByteBuf
Annotations
@Deprecated
Imports
java.nio.ByteBuffer

Deprecated

Do not use.

Abstract base class for ByteBuf implementations that wrap another ByteBuf.

Field Summary

Inherited from io.netty.buffer.AbstractByteBuf:
checkAccessibleleakDetectorreaderIndexwriterIndex

Constructor Summary

AccessConstructor and Description
protected
AbstractDerivedByteBuf(int maxCapacity)

Method Summary

Modifier and TypeMethod and Description
public ByteBuffer
internalNioBuffer(int index, int length)

Implements abstract io.netty.buffer.ByteBuf.internalNioBuffer.

Internal use only: Exposes the internal NIO buffer.
pack-priv final boolean
isAccessible()

Overrides io.netty.buffer.ByteBuf.isAccessible.

Used internally by AbstractByteBuf#ensureAccessible() to try to guard against using the buffer after it was released (best-effort).
pack-priv boolean
public boolean
isContiguous()

Overrides io.netty.buffer.ByteBuf.isContiguous.

Returns true if this ByteBuf implementation is backed by a single memory region.
public boolean
isReadOnly()

Overrides io.netty.buffer.AbstractByteBuf.isReadOnly.

Returns true if and only if this buffer is read-only.
public ByteBuffer
nioBuffer(int index, int length)

Implements abstract io.netty.buffer.ByteBuf.nioBuffer.

Exposes this buffer's sub-region as an NIO ByteBuffer.
public final int
refCnt()

Implements io.netty.util.ReferenceCounted.refCnt.

Returns the reference count of this object.
pack-priv int
public final boolean
release()

Implements io.netty.util.ReferenceCounted.release.

Decreases the reference count by 1 and deallocates this object if the reference count reaches at 0.
public final boolean
release(int decrement)

Implements io.netty.util.ReferenceCounted.release.

Decreases the reference count by the specified decrement and deallocates this object if the reference count reaches at 0.
pack-priv boolean
pack-priv boolean
release0(int decrement)

public final ByteBuf
retain()

Implements abstract io.netty.buffer.ByteBuf.retain.

Implements io.netty.util.ReferenceCounted.retain.

Increases the reference count by 1.
public final ByteBuf
retain(int increment)

Implements abstract io.netty.buffer.ByteBuf.retain.

Implements io.netty.util.ReferenceCounted.retain.

Increases the reference count by the specified increment.
pack-priv ByteBuf
pack-priv ByteBuf
retain0(int increment)

public final ByteBuf
touch()

Implements abstract io.netty.buffer.ByteBuf.touch.

Implements io.netty.util.ReferenceCounted.touch.

Records the current access location of this object for debugging purposes.
public final ByteBuf
touch(Object hint)

Implements abstract io.netty.buffer.ByteBuf.touch.

Implements io.netty.util.ReferenceCounted.touch.

Records the current access location of this object with an additional arbitrary information for debugging purposes.
pack-priv ByteBuf
pack-priv ByteBuf
touch0(Object hint)

Inherited from io.netty.buffer.AbstractByteBuf:
_getByte_getInt_getIntLE_getLong_getLongLE_getShort_getShortLE_getUnsignedMedium_getUnsignedMediumLE_setByte_setInt_setIntLE_setLong_setLongLE_setMedium_setMediumLE_setShort_setShortLEadjustMarkersasReadOnlybytesBeforebytesBeforebytesBeforecheckDstIndexcheckDstIndexcheckIndexcheckIndexcheckIndex0checkNewCapacitycheckReadableBytescheckSrcIndexclearcompareTocopydiscardMarksdiscardReadBytesdiscardSomeReadBytesduplicateensureAccessibleensureWritableensureWritableensureWritable0equalsforEachByteforEachByteforEachByteAsc0forEachByteDescforEachByteDescforEachByteDesc0getBooleangetBytegetBytesgetBytesgetBytesgetChargetCharSequencegetDoublegetFloatgetIntgetIntLEgetLonggetLongLEgetMediumgetMediumLEgetShortgetShortLEgetUnsignedBytegetUnsignedIntgetUnsignedIntLEgetUnsignedMediumgetUnsignedMediumLEgetUnsignedShortgetUnsignedShortLEhashCodeindexOfisReadableisReadableisWritableisWritablemarkReaderIndexmarkWriterIndexmaxCapacitymaxCapacitymaxWritableBytesnewSwappedByteBufnioBuffernioBuffersorderreadableBytesreadBooleanreadBytereadBytesreadBytesreadBytesreadBytesreadBytesreadBytesreadBytesreadBytesreadBytesreadBytesreadCharreadCharSequencereadDoublereaderIndexreaderIndexreadFloatreadIntreadIntLEreadLongreadLongLEreadMediumreadMediumLEreadRetainedSlicereadShortreadShortLEreadSlicereadUnsignedBytereadUnsignedIntreadUnsignedIntLEreadUnsignedMediumreadUnsignedMediumLEreadUnsignedShortreadUnsignedShortLEresetReaderIndexresetWriterIndexretainedDuplicateretainedSliceretainedSlicesetBooleansetBytesetBytessetBytessetBytessetCharsetCharSequencesetDoublesetFloatsetIndexsetIndex0setIntsetIntLEsetLongsetLongLEsetMediumsetMediumLEsetShortsetShortLEsetZeroskipBytessliceslicetoStringtoStringtoStringtrimIndicesToCapacitywritableByteswriteBooleanwriteBytewriteByteswriteByteswriteByteswriteByteswriteByteswriteByteswriteByteswriteByteswriteByteswriteCharwriteCharSequencewriteDoublewriteFloatwriteIntwriteIntLEwriteLongwriteLongLEwriteMediumwriteMediumLEwriterIndexwriterIndexwriteShortwriteShortLEwriteZero

Constructor Detail

AbstractDerivedByteBufback to summary
protected AbstractDerivedByteBuf(int maxCapacity)

Method Detail

internalNioBufferback to summary
public ByteBuffer internalNioBuffer(int index, int length)

Implements abstract io.netty.buffer.ByteBuf.internalNioBuffer.

Doc from io.netty.buffer.ByteBuf.internalNioBuffer.

Internal use only: Exposes the internal NIO buffer.

Annotations
@Override
isAccessibleback to summary
pack-priv final boolean isAccessible()

Overrides io.netty.buffer.ByteBuf.isAccessible.

Doc from io.netty.buffer.ByteBuf.isAccessible.

Used internally by AbstractByteBuf#ensureAccessible() to try to guard against using the buffer after it was released (best-effort).

Annotations
@Override
isAccessible0back to summary
pack-priv boolean isAccessible0()
isContiguousback to summary
public boolean isContiguous()

Overrides io.netty.buffer.ByteBuf.isContiguous.

Doc from io.netty.buffer.ByteBuf.isContiguous.

Returns true if this ByteBuf implementation is backed by a single memory region. Composite buffer implementations must return false even if they currently hold ≤ 1 components. For buffers that return true, it's guaranteed that a successful call to discardReadBytes() will increase the value of maxFastWritableBytes() by the current readerIndex.

This method will return false by default, and a false return value does not necessarily mean that the implementation is composite or that it is not backed by a single memory region.

Annotations
@Override
isReadOnlyback to summary
public boolean isReadOnly()

Overrides io.netty.buffer.AbstractByteBuf.isReadOnly.

Doc from io.netty.buffer.ByteBuf.isReadOnly.

Returns true if and only if this buffer is read-only.

Annotations
@Override
nioBufferback to summary
public ByteBuffer nioBuffer(int index, int length)

Implements abstract io.netty.buffer.ByteBuf.nioBuffer.

Doc from io.netty.buffer.ByteBuf.nioBuffer.

Exposes this buffer's sub-region as an NIO ByteBuffer. 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. This method does not modify readerIndex or writerIndex of this buffer. Please note that the returned NIO buffer will not see the changes of this buffer if this buffer is a dynamic buffer and it adjusted its capacity.

Annotations
@Override
refCntback to summary
public final int refCnt()

Implements io.netty.util.ReferenceCounted.refCnt.

Doc from io.netty.util.ReferenceCounted.refCnt.

Returns the reference count of this object. If 0, it means this object has been deallocated.

Annotations
@Override
refCnt0back to summary
pack-priv int refCnt0()
releaseback to summary
public final boolean release()

Implements io.netty.util.ReferenceCounted.release.

Doc from io.netty.util.ReferenceCounted.release.

Decreases the reference count by 1 and deallocates this object if the reference count reaches at 0.

Returns:boolean

true if and only if the reference count became 0 and this object has been deallocated

Annotations
@Override
releaseback to summary
public final boolean release(int decrement)

Implements io.netty.util.ReferenceCounted.release.

Doc from io.netty.util.ReferenceCounted.release.

Decreases the reference count by the specified decrement and deallocates this object if the reference count reaches at 0.

Returns:boolean

true if and only if the reference count became 0 and this object has been deallocated

Annotations
@Override
release0back to summary
pack-priv boolean release0()
release0back to summary
pack-priv boolean release0(int decrement)
retainback to summary
public final ByteBuf retain()

Implements abstract io.netty.buffer.ByteBuf.retain.

Implements io.netty.util.ReferenceCounted.retain.

Doc from io.netty.util.ReferenceCounted.retain.

Increases the reference count by 1.

Annotations
@Override
retainback to summary
public final ByteBuf retain(int increment)

Implements abstract io.netty.buffer.ByteBuf.retain.

Implements io.netty.util.ReferenceCounted.retain.

Doc from io.netty.util.ReferenceCounted.retain.

Increases the reference count by the specified increment.

Annotations
@Override
retain0back to summary
pack-priv ByteBuf retain0()
retain0back to summary
pack-priv ByteBuf retain0(int increment)
touchback to summary
public final ByteBuf touch()

Implements abstract io.netty.buffer.ByteBuf.touch.

Implements io.netty.util.ReferenceCounted.touch.

Doc from io.netty.util.ReferenceCounted.touch.

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 ResourceLeakDetector. This method is a shortcut to touch(null).

Annotations
@Override
touchback to summary
public final ByteBuf touch(Object hint)

Implements abstract io.netty.buffer.ByteBuf.touch.

Implements io.netty.util.ReferenceCounted.touch.

Doc from io.netty.util.ReferenceCounted.touch.

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 ResourceLeakDetector.

Annotations
@Override
touch0back to summary
pack-priv ByteBuf touch0()
touch0back to summary
pack-priv ByteBuf touch0(Object hint)