Package io.netty.buffer
Class AbstractDerivedByteBuf
java.lang.Object
io.netty.buffer.ByteBuf
io.netty.buffer.AbstractByteBuf
io.netty.buffer.AbstractDerivedByteBuf
- All Implemented Interfaces:
ByteBufConvertible
,ReferenceCounted
,Comparable<ByteBuf>
- Direct Known Subclasses:
AbstractUnpooledSlicedByteBuf
,DuplicatedByteBuf
,ReadOnlyByteBuf
Deprecated.
Do not use.
-
Field Summary
Fields inherited from class io.netty.buffer.AbstractByteBuf
checkAccessible, leakDetector, readerIndex, writerIndex
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioninternalNioBuffer
(int index, int length) Deprecated.Internal use only: Exposes the internal NIO buffer.(package private) final boolean
Deprecated.Used internally byAbstractByteBuf.ensureAccessible()
to try to guard against using the buffer after it was released (best-effort).(package private) boolean
Deprecated.boolean
Deprecated.Returnstrue
if thisByteBuf
implementation is backed by a single memory region.boolean
Deprecated.Returnstrue
if and only if this buffer is read-only.nioBuffer
(int index, int length) Deprecated.Exposes this buffer's sub-region as an NIOByteBuffer
.final int
refCnt()
Deprecated.Returns the reference count of this object.(package private) int
refCnt0()
Deprecated.final boolean
release()
Deprecated.Decreases the reference count by1
and deallocates this object if the reference count reaches at0
.final boolean
release
(int decrement) Deprecated.Decreases the reference count by the specifieddecrement
and deallocates this object if the reference count reaches at0
.(package private) boolean
release0()
Deprecated.(package private) boolean
release0
(int decrement) Deprecated.final ByteBuf
retain()
Deprecated.Increases the reference count by1
.final ByteBuf
retain
(int increment) Deprecated.Increases the reference count by the specifiedincrement
.(package private) ByteBuf
retain0()
Deprecated.(package private) ByteBuf
retain0
(int increment) Deprecated.final ByteBuf
touch()
Deprecated.Records the current access location of this object for debugging purposes.final ByteBuf
Deprecated.Records the current access location of this object with an additional arbitrary information for debugging purposes.(package private) ByteBuf
touch0()
Deprecated.(package private) ByteBuf
Deprecated.Methods inherited from class io.netty.buffer.AbstractByteBuf
_getByte, _getInt, _getIntLE, _getLong, _getLongLE, _getShort, _getShortLE, _getUnsignedMedium, _getUnsignedMediumLE, _setByte, _setInt, _setIntLE, _setLong, _setLongLE, _setMedium, _setMediumLE, _setShort, _setShortLE, adjustMarkers, asReadOnly, bytesBefore, bytesBefore, bytesBefore, checkDstIndex, checkDstIndex, checkIndex, checkIndex, checkIndex0, checkNewCapacity, checkReadableBytes, checkSrcIndex, clear, compareTo, copy, discardMarks, discardReadBytes, discardSomeReadBytes, duplicate, ensureAccessible, ensureWritable, ensureWritable, ensureWritable0, equals, forEachByte, forEachByte, forEachByteAsc0, forEachByteDesc, forEachByteDesc, forEachByteDesc0, getBoolean, getByte, getBytes, getBytes, getBytes, getChar, getCharSequence, getDouble, getFloat, getInt, getIntLE, getLong, getLongLE, getMedium, getMediumLE, getShort, getShortLE, getUnsignedByte, getUnsignedInt, getUnsignedIntLE, getUnsignedMedium, getUnsignedMediumLE, getUnsignedShort, getUnsignedShortLE, hashCode, indexOf, isReadable, isReadable, isWritable, isWritable, markReaderIndex, markWriterIndex, maxCapacity, maxCapacity, maxWritableBytes, newSwappedByteBuf, nioBuffer, nioBuffers, order, readableBytes, readBoolean, readByte, readBytes, readBytes, readBytes, readBytes, readBytes, readBytes, readBytes, readBytes, readBytes, readBytes, readChar, readCharSequence, readDouble, readerIndex, readerIndex, readFloat, readInt, readIntLE, readLong, readLongLE, readMedium, readMediumLE, readRetainedSlice, readShort, readShortLE, readSlice, readUnsignedByte, readUnsignedInt, readUnsignedIntLE, readUnsignedMedium, readUnsignedMediumLE, readUnsignedShort, readUnsignedShortLE, resetReaderIndex, resetWriterIndex, retainedDuplicate, retainedSlice, retainedSlice, setBoolean, setByte, setBytes, setBytes, setBytes, setChar, setCharSequence, setDouble, setFloat, setIndex, setIndex0, setInt, setIntLE, setLong, setLongLE, setMedium, setMediumLE, setShort, setShortLE, setZero, skipBytes, slice, slice, toString, toString, toString, trimIndicesToCapacity, writableBytes, writeBoolean, writeByte, writeBytes, writeBytes, writeBytes, writeBytes, writeBytes, writeBytes, writeBytes, writeBytes, writeBytes, writeChar, writeCharSequence, writeDouble, writeFloat, writeInt, writeIntLE, writeLong, writeLongLE, writeMedium, writeMediumLE, writerIndex, writerIndex, writeShort, writeShortLE, writeZero
Methods inherited from class io.netty.buffer.ByteBuf
alloc, array, arrayOffset, asByteBuf, capacity, capacity, copy, getBytes, getBytes, getBytes, getBytes, getBytes, getBytes, getDoubleLE, getFloatLE, hasArray, hasMemoryAddress, isDirect, maxFastWritableBytes, memoryAddress, nioBufferCount, nioBuffers, order, readDoubleLE, readFloatLE, setBytes, setBytes, setBytes, setBytes, setBytes, setBytes, setDoubleLE, setFloatLE, unwrap, writeDoubleLE, writeFloatLE
-
Constructor Details
-
AbstractDerivedByteBuf
protected AbstractDerivedByteBuf(int maxCapacity) Deprecated.
-
-
Method Details
-
isAccessible
final boolean isAccessible()Deprecated.Description copied from class:ByteBuf
Used internally byAbstractByteBuf.ensureAccessible()
to try to guard against using the buffer after it was released (best-effort).- Overrides:
isAccessible
in classByteBuf
-
isAccessible0
boolean isAccessible0()Deprecated. -
refCnt
public final int refCnt()Deprecated.Description copied from interface:ReferenceCounted
Returns the reference count of this object. If0
, it means this object has been deallocated. -
refCnt0
int refCnt0()Deprecated. -
retain
Deprecated.Description copied from interface:ReferenceCounted
Increases the reference count by1
.- Specified by:
retain
in interfaceReferenceCounted
- Specified by:
retain
in classByteBuf
-
retain0
ByteBuf retain0()Deprecated. -
retain
Deprecated.Description copied from interface:ReferenceCounted
Increases the reference count by the specifiedincrement
.- Specified by:
retain
in interfaceReferenceCounted
- Specified by:
retain
in classByteBuf
-
retain0
Deprecated. -
touch
Deprecated.Description copied from interface:ReferenceCounted
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 viaResourceLeakDetector
. This method is a shortcut totouch(null)
.- Specified by:
touch
in interfaceReferenceCounted
- Specified by:
touch
in classByteBuf
-
touch0
ByteBuf touch0()Deprecated. -
touch
Deprecated.Description copied from interface:ReferenceCounted
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 viaResourceLeakDetector
.- Specified by:
touch
in interfaceReferenceCounted
- Specified by:
touch
in classByteBuf
-
touch0
Deprecated. -
release
public final boolean release()Deprecated.Description copied from interface:ReferenceCounted
Decreases the reference count by1
and deallocates this object if the reference count reaches at0
.- Returns:
true
if and only if the reference count became0
and this object has been deallocated
-
release0
boolean release0()Deprecated. -
release
public final boolean release(int decrement) Deprecated.Description copied from interface:ReferenceCounted
Decreases the reference count by the specifieddecrement
and deallocates this object if the reference count reaches at0
.- Returns:
true
if and only if the reference count became0
and this object has been deallocated
-
release0
boolean release0(int decrement) Deprecated. -
isReadOnly
public boolean isReadOnly()Deprecated.Description copied from class:ByteBuf
Returnstrue
if and only if this buffer is read-only.- Overrides:
isReadOnly
in classAbstractByteBuf
-
internalNioBuffer
Deprecated.Description copied from class:ByteBuf
Internal use only: Exposes the internal NIO buffer.- Specified by:
internalNioBuffer
in classByteBuf
-
nioBuffer
Deprecated.Description copied from class:ByteBuf
Exposes this buffer's sub-region as an NIOByteBuffer
. 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 modifyreaderIndex
orwriterIndex
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. -
isContiguous
public boolean isContiguous()Deprecated.Description copied from class:ByteBuf
Returnstrue
if thisByteBuf
implementation is backed by a single memory region. Composite buffer implementations must return false even if they currently hold ≤ 1 components. For buffers that returntrue
, it's guaranteed that a successful call toByteBuf.discardReadBytes()
will increase the value ofByteBuf.maxFastWritableBytes()
by the currentreaderIndex
.This method will return
false
by default, and afalse
return value does not necessarily mean that the implementation is composite or that it is not backed by a single memory region.- Overrides:
isContiguous
in classByteBuf
-