@Deprecated public abstract class AbstractDerivedByteBuf extends AbstractByteBuf
限定符 | 构造器和说明 |
---|---|
protected |
AbstractDerivedByteBuf(int maxCapacity)
已过时。
|
限定符和类型 | 方法和说明 |
---|---|
java.nio.ByteBuffer |
internalNioBuffer(int index,
int length)
已过时。
Internal use only: Exposes the internal NIO buffer.
|
boolean |
isContiguous()
已过时。
Returns
true if this ByteBuf implementation is backed by a single memory region. |
boolean |
isReadOnly()
已过时。
Returns
true if and only if this buffer is read-only. |
java.nio.ByteBuffer |
nioBuffer(int index,
int length)
已过时。
Exposes this buffer's sub-region as an NIO
ByteBuffer . |
int |
refCnt()
已过时。
Returns the reference count of this object.
|
boolean |
release()
已过时。
Decreases the reference count by
1 and deallocates this object if the reference count reaches at
0 . |
boolean |
release(int decrement)
已过时。
Decreases the reference count by the specified
decrement and deallocates this object if the reference
count reaches at 0 . |
ByteBuf |
retain()
已过时。
Increases the reference count by
1 . |
ByteBuf |
retain(int increment)
已过时。
Increases the reference count by the specified
increment . |
ByteBuf |
touch()
已过时。
Records the current access location of this object for debugging purposes.
|
ByteBuf |
touch(java.lang.Object hint)
已过时。
Records the current access location of this object with an additional arbitrary information for debugging
purposes.
|
_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, checkNewCapacity, checkReadableBytes, checkSrcIndex, clear, compareTo, copy, discardReadBytes, discardSomeReadBytes, duplicate, ensureAccessible, ensureWritable, ensureWritable, equals, forEachByte, forEachByte, forEachByteDesc, forEachByteDesc, 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, 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
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
public final int refCnt()
ReferenceCounted
0
, it means this object has been deallocated.public final ByteBuf retain()
ReferenceCounted
1
.retain
在接口中 ReferenceCounted
retain
在类中 ByteBuf
public final ByteBuf retain(int increment)
ReferenceCounted
increment
.retain
在接口中 ReferenceCounted
retain
在类中 ByteBuf
public final ByteBuf touch()
ReferenceCounted
ResourceLeakDetector
. This method is a shortcut to touch(null)
.touch
在接口中 ReferenceCounted
touch
在类中 ByteBuf
public final ByteBuf touch(java.lang.Object hint)
ReferenceCounted
ResourceLeakDetector
.touch
在接口中 ReferenceCounted
touch
在类中 ByteBuf
public final boolean release()
ReferenceCounted
1
and deallocates this object if the reference count reaches at
0
.true
if and only if the reference count became 0
and this object has been deallocatedpublic final boolean release(int decrement)
ReferenceCounted
decrement
and deallocates this object if the reference
count reaches at 0
.true
if and only if the reference count became 0
and this object has been deallocatedpublic boolean isReadOnly()
ByteBuf
true
if and only if this buffer is read-only.isReadOnly
在类中 AbstractByteBuf
public java.nio.ByteBuffer internalNioBuffer(int index, int length)
ByteBuf
internalNioBuffer
在类中 ByteBuf
public java.nio.ByteBuffer nioBuffer(int index, int length)
ByteBuf
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.public boolean isContiguous()
ByteBuf
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 ByteBuf.discardReadBytes()
will increase the value of ByteBuf.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.
isContiguous
在类中 ByteBuf