public class CompositeByteBuf extends AbstractReferenceCountedByteBuf implements java.lang.Iterable<ByteBuf>
ByteBufAllocator.compositeBuffer()或Unpooled.wrappedBuffer(ByteBuf...)而不是显式调用构造函数。
| Constructor and Description |
|---|
CompositeByteBuf(ByteBufAllocator alloc, boolean direct, int maxNumComponents) |
CompositeByteBuf(ByteBufAllocator alloc, boolean direct, int maxNumComponents, ByteBuf... buffers) |
CompositeByteBuf(ByteBufAllocator alloc, boolean direct, int maxNumComponents, java.lang.Iterable<ByteBuf> buffers) |
| Modifier and Type | Method and Description |
|---|---|
protected byte |
_getByte(int index) |
protected int |
_getInt(int index) |
protected int |
_getIntLE(int index) |
protected long |
_getLong(int index) |
protected long |
_getLongLE(int index) |
protected short |
_getShort(int index) |
protected short |
_getShortLE(int index) |
protected int |
_getUnsignedMedium(int index) |
protected int |
_getUnsignedMediumLE(int index) |
protected void |
_setByte(int index, int value) |
protected void |
_setInt(int index, int value) |
protected void |
_setIntLE(int index, int value) |
protected void |
_setLong(int index, long value) |
protected void |
_setLongLE(int index, long value) |
protected void |
_setMedium(int index, int value) |
protected void |
_setMediumLE(int index, int value) |
protected void |
_setShort(int index, int value) |
protected void |
_setShortLE(int index, int value) |
CompositeByteBuf |
addComponent(boolean increaseWriterIndex, ByteBuf buffer)
添加指定的 ByteBuf ,增加writerIndex如果increaseWriterIndex是true 。
|
CompositeByteBuf |
addComponent(boolean increaseWriterIndex, int cIndex, ByteBuf buffer)
添加指定的 ByteBuf具体指标,并增加了writerIndex如果increaseWriterIndex是true 。
|
CompositeByteBuf |
addComponent(ByteBuf buffer)
添加给定的 ByteBuf 。
|
CompositeByteBuf |
addComponent(int cIndex, ByteBuf buffer)
在特定索引上添加给定的 ByteBuf 。
|
CompositeByteBuf |
addComponents(boolean increaseWriterIndex, ByteBuf... buffers)
添加指定的 ByteBuf个 S和增加writerIndex如果increaseWriterIndex是true 。
|
CompositeByteBuf |
addComponents(boolean increaseWriterIndex, java.lang.Iterable<ByteBuf> buffers)
添加指定的 ByteBuf个 S和增加writerIndex如果increaseWriterIndex是true 。
|
CompositeByteBuf |
addComponents(ByteBuf... buffers)
添加给定的 ByteBuf 。
|
CompositeByteBuf |
addComponents(int cIndex, ByteBuf... buffers)
在特定索引上添加给定 ByteBuf请注意,此方法不会增加writerIndex的writerIndex 。
|
CompositeByteBuf |
addComponents(int cIndex, java.lang.Iterable<ByteBuf> buffers)
将特定索引添加给定的 ByteBuf请注意,此方法不会增加writerIndex的writerIndex 。
|
CompositeByteBuf |
addComponents(java.lang.Iterable<ByteBuf> buffers)
添加给定的 ByteBuf 。
|
ByteBufAllocator |
alloc()
返回创建此缓冲区的 ByteBufAllocator 。
|
byte[] |
array()
返回此缓冲区的后备字节数组。
|
int |
arrayOffset()
返回此缓冲区的后备字节数组中第一个字节的偏移量。
|
int |
capacity()
返回此缓冲区可包含的字节数(字节)。
|
CompositeByteBuf |
capacity(int newCapacity)
调整此缓冲区的容量。
|
CompositeByteBuf |
clear()
将此缓冲区的
readerIndex和
writerIndex设置为
0 。
|
ByteBuf |
component(int cIndex)
返回指定索引上的 ByteBuf
|
ByteBuf |
componentAtOffset(int offset)
返回指定索引上的 ByteBuf
|
CompositeByteBuf |
consolidate()
合并组成的 ByteBuf
|
CompositeByteBuf |
consolidate(int cIndex, int numComponents)
合并组成的 ByteBuf
|
ByteBuf |
copy(int index, int length)
返回此缓冲区的子区域的副本。
|
protected void |
deallocate()
|
java.util.List<ByteBuf> |
decompose(int offset, int length)
除了此方法返回一个列表外,与
AbstractByteBuf.slice(int, int)相同。
|
CompositeByteBuf |
discardReadBytes()
丢弃第0个索引和
readerIndex之间的字节。
|
CompositeByteBuf |
discardReadComponents()
丢弃所有被读取的 ByteBuf 。
|
CompositeByteBuf |
discardSomeReadBytes()
与
ByteBuf.discardReadBytes()类似,不同之
处在于此方法可能会丢弃部分,全部或者全部读取字节,具体取决于其内部实现方式,以减少潜在的额外内存消耗为代价降低整体内存带宽消耗。
|
CompositeByteBuf |
ensureWritable(int minWritableBytes)
确保
the writable bytes的数量等于或大于指定的值。
|
byte |
getByte(int index)
获取此缓冲区中指定的绝对
index一个字节。
|
CompositeByteBuf |
getBytes(int index, byte[] dst)
将此缓冲区的数据传输到指定绝对
index开始的目标。
|
CompositeByteBuf |
getBytes(int index, byte[] dst, int dstIndex, int length)
将此缓冲区的数据传输到指定的绝对目标
index开始的目标。
|
CompositeByteBuf |
getBytes(int index, ByteBuf dst)
将该缓冲区的数据传输到指定的目的地,从指定的绝对
index开始,直到目标变为不可写。
|
CompositeByteBuf |
getBytes(int index, java.nio.ByteBuffer dst)
将该缓冲区的数据传输到指定的目的地,从指定的绝对
index开始,直到目的地的位置达到其限制。
|
CompositeByteBuf |
getBytes(int index, ByteBuf dst, int length)
将此缓冲区的数据传输到指定绝对
index开始的目标
index 。
|
CompositeByteBuf |
getBytes(int index, ByteBuf dst, int dstIndex, int length)
将此缓冲区的数据传输到指定的绝对
index开始的目标。
|
int |
getBytes(int index, java.nio.channels.FileChannel out, long position, int length)
将此缓冲区的数据从指定的绝对
index开始
index到指定的通道,从给定的文件位置开始。
|
int |
getBytes(int index, java.nio.channels.GatheringByteChannel out, int length)
将此缓冲区的数据传输到指定的绝对
index开始的通道。
|
CompositeByteBuf |
getBytes(int index, java.io.OutputStream out, int length)
将此缓冲区的数据传输到指定的绝对
index开始的流。
|
boolean |
hasArray()
当且仅当此缓冲区有一个后备字节数组时返回
true 。
|
boolean |
hasMemoryAddress()
当且仅当此缓冲区引用指向后备数据的低级内存地址时才返回
true 。
|
ByteBuf |
internalComponent(int cIndex)
返回指定索引上的内部 ByteBuf 。
|
ByteBuf |
internalComponentAtOffset(int offset)
在指定的偏移量上返回内部 ByteBuf 。
|
java.nio.ByteBuffer |
internalNioBuffer(int index, int length)
仅内部使用:公开内部NIO缓冲区。
|
boolean |
isDirect()
当且仅当此缓冲区由NIO直接缓冲区支持时才返回
true 。
|
java.util.Iterator<ByteBuf> |
iterator() |
CompositeByteBuf |
markReaderIndex()
在此缓冲区中标记当前的
readerIndex 。
|
CompositeByteBuf |
markWriterIndex()
在此缓冲区中标记当前
writerIndex 。
|
int |
maxNumComponents()
返回在此实例中组成的最大数量 ByteBuf
|
long |
memoryAddress()
返回指向备份数据第一个字节的低级内存地址。
|
java.nio.ByteBuffer |
nioBuffer(int index, int length)
将此缓冲区的子区域公开为NIO
ByteBuffer 。
|
int |
nioBufferCount()
返回构成此缓冲区的NIO
ByteBuffer的最大数量。
|
java.nio.ByteBuffer[] |
nioBuffers()
以NIO
ByteBuffer的形式公开此缓冲区的可读字节。
|
java.nio.ByteBuffer[] |
nioBuffers(int index, int length)
以指定索引和长度公开此缓冲区的NIO
ByteBuffer字节返回的缓冲区共享或包含此缓冲区的复制内容,同时更改返回的NIO缓冲区的位置和限制不会影响此索引和标记缓冲。
|
int |
numComponents()
返回在此实例中组成的当前编号 ByteBuf
|
java.nio.ByteOrder |
order()
返回此缓冲区的
endianness 。
|
CompositeByteBuf |
readBytes(byte[] dst)
传输此缓冲区的数据到指定的目标并从当前
readerIndex并增加了
readerIndex由传输的字节(=数量
dst.length )。
|
CompositeByteBuf |
readBytes(byte[] dst, int dstIndex, int length)
将此缓冲区的数据传输到从当前
readerIndex开始的指定目标,
readerIndex传输字节数(=
length )增加
length 。
|
CompositeByteBuf |
readBytes(ByteBuf dst)
将此缓冲区的数据传输到指定的目标,从当前
readerIndex开始,直到目标变为不可写入,并将传输字节数增加
readerIndex 。
|
CompositeByteBuf |
readBytes(java.nio.ByteBuffer dst)
将此缓冲区的数据传输到指定的目标,从当前
readerIndex开始,直到目标的位置达到其限制,并将
readerIndex增加
readerIndex的传输字节数。
|
CompositeByteBuf |
readBytes(ByteBuf dst, int length)
传输此缓冲区的数据到指定的目标并从当前
readerIndex并增加了
readerIndex由传输的字节(=数量
length )。
|
CompositeByteBuf |
readBytes(ByteBuf dst, int dstIndex, int length)
传输此缓冲区的数据到指定的目标并从当前
readerIndex并增加了
readerIndex由传输的字节(=数量
length )。
|
CompositeByteBuf |
readBytes(java.io.OutputStream out, int length)
将此缓冲区的数据传输到当前
readerIndex开始的指定流。
|
CompositeByteBuf |
readerIndex(int readerIndex)
设置此缓冲区的
readerIndex 。
|
CompositeByteBuf |
removeComponent(int cIndex)
从给定的索引中删除 ByteBuf 。
|
CompositeByteBuf |
removeComponents(int cIndex, int numComponents)
从指定索引开始删除 ByteBuf的数量。
|
CompositeByteBuf |
resetReaderIndex()
将当前
readerIndex重新定位到此缓冲区中标记为
readerIndex 。
|
CompositeByteBuf |
resetWriterIndex()
将当前
writerIndex重新定位到此缓冲区中标记为
writerIndex 。
|
CompositeByteBuf |
retain()
将参考计数增加
1 。
|
CompositeByteBuf |
retain(int increment)
通过指定的
increment增加引用计数。
|
CompositeByteBuf |
setBoolean(int index, boolean value)
在此缓冲区中的指定绝对
index处设置指定的布尔值。
|
CompositeByteBuf |
setByte(int index, int value)
在此缓冲区中的指定绝对
index处设置指定的字节。
|
CompositeByteBuf |
setBytes(int index, byte[] src)
将指定的源数组的数据传输到此缓冲区,从指定的绝对
index 。
|
CompositeByteBuf |
setBytes(int index, byte[] src, int srcIndex, int length)
将指定的源数组的数据传输到此缓冲区,从指定的绝对
index 。
|
CompositeByteBuf |
setBytes(int index, ByteBuf src)
将指定的源缓冲区的数据从指定的绝对
index开始传输到此缓冲区,直到源缓冲区变得不可读。
|
CompositeByteBuf |
setBytes(int index, java.nio.ByteBuffer src)
将指定的源缓冲区的数据从指定的绝对
index开始传送到此缓冲区,直到源缓冲区的位置达到其限制。
|
CompositeByteBuf |
setBytes(int index, ByteBuf src, int length)
将指定的源缓冲区的数据从指定的绝对
index开始传送到此缓冲区。
|
CompositeByteBuf |
setBytes(int index, ByteBuf src, int srcIndex, int length)
将指定的源缓冲区的数据从指定的绝对
index开始传送到此缓冲区。
|
int |
setBytes(int index, java.nio.channels.FileChannel in, long position, int length)
将从给定文件位置开始的指定源通道的内容传输到此缓冲区,从指定的绝对
index 。
|
int |
setBytes(int index, java.io.InputStream in, int length)
将指定源流的内容从指定的绝对
index开始传输到此缓冲区。
|
int |
setBytes(int index, java.nio.channels.ScatteringByteChannel in, int length)
将指定源通道的内容从指定绝对
index开始传送到此缓冲区。
|
CompositeByteBuf |
setChar(int index, int value)
在此缓冲区的指定绝对
index处设置指定的2字节UTF-16字符。
|
CompositeByteBuf |
setDouble(int index, double value)
在此缓冲区中的指定绝对
index处设置指定的64位浮点数。
|
CompositeByteBuf |
setFloat(int index, float value)
在此缓冲区中的指定绝对
index处设置指定的32位浮点数。
|
CompositeByteBuf |
setIndex(int readerIndex, int writerIndex)
readerIndex设置此缓冲区的
readerIndex和
writerIndex 。
|
CompositeByteBuf |
setInt(int index, int value)
在此缓冲区中的指定绝对
index处设置指定的32位整数。
|
CompositeByteBuf |
setLong(int index, long value)
在此缓冲区中的指定绝对
index处设置指定的64位长整数。
|
CompositeByteBuf |
setMedium(int index, int value)
在此缓冲区中的指定绝对
index处设置指定的24位中等整数。
|
CompositeByteBuf |
setShort(int index, int value)
在此缓冲区中的指定绝对
index处设置指定的16位短整数。
|
CompositeByteBuf |
setZero(int index, int length)
NUL (0x00)从指定的绝对
index开始填充此缓冲区。
|
CompositeByteBuf |
skipBytes(int length)
此缓冲区中指定的
length增加当前
readerIndex 。
|
int |
toByteIndex(int cIndex) |
int |
toComponentIndex(int offset)
返回给定偏移量的索引
|
java.lang.String |
toString()
返回此缓冲区的字符串表示形式。
|
CompositeByteBuf |
touch()
记录此对象的当前访问位置以进行调试。
|
CompositeByteBuf |
touch(java.lang.Object hint)
记录此对象的当前访问位置,并附加一些用于调试的任意信息。
|
ByteBuf |
unwrap()
如果此缓冲区是另一个缓冲区的包装,则返回底层缓冲区实例。
|
CompositeByteBuf |
writeBoolean(boolean value)
在当前
writerIndex处设置指定的布尔值,并在此缓冲区
writerIndex
1增加
writerIndex 。
|
CompositeByteBuf |
writeByte(int value)
在当前
writerIndex处设置指定的字节,并在此缓冲区
writerIndex
1增加
writerIndex 。
|
CompositeByteBuf |
writeBytes(byte[] src)
指定的源阵列的数据传送到该缓冲液并从当前
writerIndex并增加了
writerIndex由传输的字节(=数量
src.length )。
|
CompositeByteBuf |
writeBytes(byte[] src, int srcIndex, int length)
将指定的源数组的数据传输到此缓冲区,从当前
writerIndex开始,并将
writerIndex增加
writerIndex传输的字节数(=
length )。
|
CompositeByteBuf |
writeBytes(ByteBuf src)
将指定的源缓冲区数据传输到此缓冲区,从当前
writerIndex开始,直到源缓冲区变得不可读,并将传输字节数增加
writerIndex 。
|
CompositeByteBuf |
writeBytes(java.nio.ByteBuffer src)
将指定源缓冲区的数据传输到此缓冲区,从当前
writerIndex开始,直到源缓冲区的位置达到其限制,并将传输字节数增加
writerIndex 。
|
CompositeByteBuf |
writeBytes(ByteBuf src, int length)
指定的源缓冲区的数据传送到该缓冲液并从当前
writerIndex并增加了
writerIndex由传输的字节(=数量
length )。
|
CompositeByteBuf |
writeBytes(ByteBuf src, int srcIndex, int length)
指定的源缓冲区的数据传送到该缓冲液并从当前
writerIndex并增加了
writerIndex由传输的字节(=数量
length )。
|
CompositeByteBuf |
writeChar(int value)
在当前
writerIndex处设置指定的2字节UTF-16字符,并在此缓冲区
writerIndex
2增加
writerIndex 。
|
CompositeByteBuf |
writeDouble(double value)
在当前
writerIndex处设置指定的64位浮点数,并在此缓冲区
writerIndex
8增加
writerIndex 。
|
CompositeByteBuf |
writeFloat(float value)
在当前
writerIndex处设置指定的32位浮点数,并在此缓冲区
writerIndex
4增加
writerIndex 。
|
CompositeByteBuf |
writeInt(int value)
在当前
writerIndex处设置指定的32位整数,并在此缓冲区
writerIndex
4增加
writerIndex 。
|
CompositeByteBuf |
writeLong(long value)
在当前
writerIndex处设置指定的64位长整数,并在此缓冲区
writerIndex
8增加
writerIndex 。
|
CompositeByteBuf |
writeMedium(int value)
在当前
writerIndex中设置指定的24位中等整数,并在此缓冲区
writerIndex
3增加
writerIndex 。
|
CompositeByteBuf |
writerIndex(int writerIndex)
设置此缓冲区的
writerIndex 。
|
CompositeByteBuf |
writeShort(int value)
在当前
writerIndex处设置指定的16位短整数,并在此缓冲区
writerIndex
2增加
writerIndex 。
|
CompositeByteBuf |
writeZero(int length)
填充这个缓冲器与
NUL (0x00)并从当前
writerIndex并增加了
writerIndex由指定的
length 。
|
refCnt, release, release, setRefCntadjustMarkers, asReadOnly, bytesBefore, bytesBefore, bytesBefore, checkDstIndex, checkIndex, checkIndex, checkNewCapacity, checkReadableBytes, checkSrcIndex, compareTo, copy, duplicate, ensureAccessible, ensureWritable, equals, forEachByte, forEachByte, forEachByteDesc, forEachByteDesc, getBoolean, getChar, getCharSequence, getDouble, getFloat, getInt, getIntLE, getLong, getLongLE, getMedium, getMediumLE, getShort, getShortLE, getUnsignedByte, getUnsignedInt, getUnsignedIntLE, getUnsignedMedium, getUnsignedMediumLE, getUnsignedShort, getUnsignedShortLE, hashCode, indexOf, isReadable, isReadable, isReadOnly, isWritable, isWritable, maxCapacity, maxCapacity, maxWritableBytes, newSwappedByteBuf, nioBuffer, order, readableBytes, readBoolean, readByte, readBytes, readBytes, readBytes, readChar, readCharSequence, readDouble, readerIndex, readFloat, readInt, readIntLE, readLong, readLongLE, readMedium, readMediumLE, readRetainedSlice, readShort, readShortLE, readSlice, readUnsignedByte, readUnsignedInt, readUnsignedIntLE, readUnsignedMedium, readUnsignedMediumLE, readUnsignedShort, readUnsignedShortLE, retainedDuplicate, retainedSlice, retainedSlice, setCharSequence, setIntLE, setLongLE, setMediumLE, setShortLE, slice, slice, toString, toString, writableBytes, writeBytes, writeBytes, writeBytes, writeCharSequence, writeIntLE, writeLongLE, writeMediumLE, writerIndex, writeShortLEgetDoubleLE, getFloatLE, readDoubleLE, readFloatLE, setDoubleLE, setFloatLE, writeDoubleLE, writeFloatLEpublic CompositeByteBuf(ByteBufAllocator alloc, boolean direct, int maxNumComponents)
public CompositeByteBuf(ByteBufAllocator alloc, boolean direct, int maxNumComponents, ByteBuf... buffers)
public CompositeByteBuf(ByteBufAllocator alloc, boolean direct, int maxNumComponents, java.lang.Iterable<ByteBuf> buffers)
public CompositeByteBuf addComponent(ByteBuf buffer)
ByteBuf 。
请注意,此方法不会增加writerIndex的writerIndex 。 如果你需要增加使用addComponent(boolean, ByteBuf) 。
ReferenceCounted.release()所有权buffer被转移到这个CompositeByteBuf 。
buffer - 要添加ByteBuf 。
ReferenceCounted.release()所有权转移到此CompositeByteBuf 。
public CompositeByteBuf addComponents(ByteBuf... buffers)
ByteBuf 。
请注意,此方法不会增加writerIndex的writerIndex 。 如果你需要增加使用addComponents(boolean, ByteBuf[]) 。
ReferenceCounted.release()所有的所有权ByteBuf个的对象buffers被转移到这个CompositeByteBuf 。
buffers - 要添加的ByteBuf 。
ReferenceCounted.release()所有的所有权ReferenceCounted.release()所有的所有权ByteBuf个对象被转移到这个CompositeByteBuf 。
public CompositeByteBuf addComponents(java.lang.Iterable<ByteBuf> buffers)
ByteBuf 。
请注意,此方法不会增加writerIndex的writerIndex 。 如果你需要增加使用addComponents(boolean, Iterable) 。
ReferenceCounted.release()所有的所有权ByteBuf个的对象buffers被转移到这个CompositeByteBuf 。
buffers - 要添加的ByteBuf 。
ReferenceCounted.release()所有的所有权ReferenceCounted.release()所有的所有权ByteBuf个对象被转移到这个CompositeByteBuf 。
public CompositeByteBuf addComponent(int cIndex, ByteBuf buffer)
ByteBuf 。
请注意,此方法不会增加writerIndex的writerIndex 。 如果你需要增加使用addComponent(boolean, int, ByteBuf) 。
ReferenceCounted.release()所有权buffer被转移到这个CompositeByteBuf 。
cIndex -在其上的指数ByteBuf将被添加。
buffer - 添加ByteBuf 。
ReferenceCounted.release()所有权转移到此CompositeByteBuf 。
public CompositeByteBuf addComponent(boolean increaseWriterIndex, ByteBuf buffer)
ByteBuf ,增加writerIndex如果increaseWriterIndex是true 。
ReferenceCounted.release()所有权buffer被转移到这个CompositeByteBuf 。
buffer - 添加ByteBuf 。
ReferenceCounted.release()所有权转移到此CompositeByteBuf 。
public CompositeByteBuf addComponents(boolean increaseWriterIndex, ByteBuf... buffers)
ByteBuf个 S和增加writerIndex如果increaseWriterIndex是true 。
ReferenceCounted.release()所有的所有权ByteBuf个的对象buffers被转移到这个CompositeByteBuf 。
buffers - 要添加的ByteBuf 。
ReferenceCounted.release()全部ByteBuf所有权ByteBuf所有权ByteBuf转移到此CompositeByteBuf 。
public CompositeByteBuf addComponents(boolean increaseWriterIndex, java.lang.Iterable<ByteBuf> buffers)
ByteBuf个 S和增加writerIndex如果increaseWriterIndex是true 。
ReferenceCounted.release()所有的所有权ByteBuf个的对象buffers被转移到这个CompositeByteBuf 。
buffers - 要添加的ByteBuf 。
ReferenceCounted.release()所有的所有权ReferenceCounted.release()所有的所有权ByteBuf个对象被转移到这个CompositeByteBuf 。
public CompositeByteBuf addComponent(boolean increaseWriterIndex, int cIndex, ByteBuf buffer)
ByteBuf具体指标,并增加了writerIndex如果increaseWriterIndex是true 。
ReferenceCounted.release()所有权buffer被转移到这个CompositeByteBuf 。
cIndex -在其上的指数ByteBuf将被添加。
buffer - 要添加ByteBuf 。
ReferenceCounted.release()所有权转移到此CompositeByteBuf 。
public CompositeByteBuf addComponents(int cIndex, ByteBuf... buffers)
ByteBuf
请注意,此方法不会增加writerIndex的writerIndex 。 如果你需要增加它,你需要自己处理它。
ReferenceCounted.release()所有的所有权ByteBuf个的对象buffers被转移到这个CompositeByteBuf 。
cIndex -在其上的指数ByteBuf将被添加。
ReferenceCounted.release()所有的所有权ReferenceCounted.release()所有的所有权ByteBuf个对象被转移到这个CompositeByteBuf 。
buffers - 要添加的ByteBuf 。
ReferenceCounted.release()所有权ReferenceCounted.release()全部ByteBuf对象的所有权转移到此CompositeByteBuf 。
public CompositeByteBuf addComponents(int cIndex, java.lang.Iterable<ByteBuf> buffers)
ByteBuf s请注意,此方法不会增加writerIndex的writerIndex 。
如果你需要增加它,你需要自己处理它。
ReferenceCounted.release()所有的所有权ByteBuf个的对象buffers被转移到这个CompositeByteBuf 。
cIndex -在其上的指数ByteBuf将被添加。
buffers - 要添加的ByteBuf 。
ReferenceCounted.release()所有的所有权ReferenceCounted.release()所有的所有权ByteBuf个对象被转移到这个CompositeByteBuf 。
public CompositeByteBuf removeComponent(int cIndex)
ByteBuf 。
cIndex -从该索引ByteBuf将被除去
public CompositeByteBuf removeComponents(int cIndex, int numComponents)
ByteBuf的数量。
cIndex - ByteBuf将开始移除的索引
numComponents - 要移除的组件数量
public java.util.Iterator<ByteBuf> iterator()
iterator在界面
java.lang.Iterable<ByteBuf>
public java.util.List<ByteBuf> decompose(int offset, int length)
AbstractByteBuf.slice(int, int)相同。
public boolean isDirect()
ByteBuf
true 。
public boolean hasArray()
ByteBuf
true 。
如果此方法返回true,则可以安全地调用ByteBuf.array()和ByteBuf.arrayOffset() 。
public int arrayOffset()
ByteBuf
arrayOffset在类
ByteBuf
public boolean hasMemoryAddress()
ByteBuf
true当且仅当此缓冲区具有对指向后备数据的低级内存地址的引用时。
hasMemoryAddress在类
ByteBuf
public long memoryAddress()
ByteBuf
memoryAddress在类
ByteBuf
public CompositeByteBuf capacity(int newCapacity)
ByteBuf
newCapacity小于当前容量,则此缓冲区的内容将被截断。
如果newCapacity大于当前容量,则缓冲区会附加长度为(newCapacity - currentCapacity)未指定数据。
public ByteBufAllocator alloc()
ByteBuf
ByteBufAllocator 。
public java.nio.ByteOrder order()
ByteBuf
public int numComponents()
ByteBuf
public int maxNumComponents()
ByteBuf
public int toComponentIndex(int offset)
public int toByteIndex(int cIndex)
public byte getByte(int index)
ByteBuf
index一个字节。
此方法不会修改此缓冲区的readerIndex或writerIndex 。
getByte在类
AbstractByteBuf
protected byte _getByte(int index)
_getByte在类
AbstractByteBuf
protected short _getShort(int index)
_getShort类
AbstractByteBuf
protected short _getShortLE(int index)
_getShortLE在类
AbstractByteBuf
protected int _getUnsignedMedium(int index)
_getUnsignedMedium在类
AbstractByteBuf
protected int _getUnsignedMediumLE(int index)
_getUnsignedMediumLE在类
AbstractByteBuf
protected int _getInt(int index)
_getInt在类
AbstractByteBuf
protected int _getIntLE(int index)
_getIntLE在类
AbstractByteBuf
protected long _getLong(int index)
_getLong在类
AbstractByteBuf
protected long _getLongLE(int index)
_getLongLE在类
AbstractByteBuf
public CompositeByteBuf getBytes(int index, byte[] dst, int dstIndex, int length)
ByteBuf
index开始的目标index 。
此方法不会修改此缓冲区的readerIndex或writerIndex 。
public CompositeByteBuf getBytes(int index, java.nio.ByteBuffer dst)
ByteBuf
index开始,直到目标位置达到其限制。
此方法不会修改此缓冲区的readerIndex或writerIndex ,而目标的position将会增加。
public CompositeByteBuf getBytes(int index, ByteBuf dst, int dstIndex, int length)
ByteBuf
index开始的目标。
此方法不会修改源(即this )和目标的readerIndex或writerIndex 。
public int getBytes(int index,
java.nio.channels.GatheringByteChannel out,
int length)
throws java.io.IOException
ByteBuf
index开始的通道。
此方法不会修改此缓冲区的readerIndex或writerIndex 。
public int getBytes(int index,
java.nio.channels.FileChannel out,
long position,
int length)
throws java.io.IOException
ByteBuf
index开始index到指定的通道,从给定的文件位置开始。
此方法不会修改此缓冲区的readerIndex或writerIndex 。
此方法不会修改频道的位置。
public CompositeByteBuf getBytes(int index, java.io.OutputStream out, int length) throws java.io.IOException
ByteBuf
index开始的指定流。
此方法不会修改此缓冲区的readerIndex或writerIndex 。
public CompositeByteBuf setByte(int index, int value)
ByteBuf
index处设置指定的字节。
指定值的24个高位被忽略。
此方法不会修改此缓冲区的readerIndex或writerIndex 。
setByte在类
AbstractByteBuf
protected void _setByte(int index,
int value)
_setByte类
AbstractByteBuf
public CompositeByteBuf setShort(int index, int value)
ByteBuf
index处设置指定的16位短整数。
指定值的16个高位被忽略。
此方法不会修改此缓冲区的readerIndex或writerIndex 。
setShort在类
AbstractByteBuf
protected void _setShort(int index,
int value)
_setShort在类
AbstractByteBuf
protected void _setShortLE(int index,
int value)
_setShortLE在类
AbstractByteBuf
public CompositeByteBuf setMedium(int index, int value)
ByteBuf
index处设置指定的24位中等整数。
请注意,最高有效字节在指定值中被忽略。
此方法不会修改此缓冲区的readerIndex或writerIndex 。
setMedium在类
AbstractByteBuf
protected void _setMedium(int index,
int value)
_setMedium在课堂上
AbstractByteBuf
protected void _setMediumLE(int index,
int value)
_setMediumLE类
AbstractByteBuf
public CompositeByteBuf setInt(int index, int value)
ByteBuf
index处设置指定的32位整数。
此方法不会修改此缓冲区的readerIndex或writerIndex 。
setInt在类
AbstractByteBuf
protected void _setInt(int index,
int value)
_setInt在类
AbstractByteBuf
protected void _setIntLE(int index,
int value)
_setIntLE在类
AbstractByteBuf
public CompositeByteBuf setLong(int index, long value)
ByteBuf
index处设置指定的64位长整数。
此方法不会修改此缓冲区的readerIndex或writerIndex 。
setLong在类
AbstractByteBuf
protected void _setLong(int index,
long value)
_setLong在类
AbstractByteBuf
protected void _setLongLE(int index,
long value)
_setLongLE在类
AbstractByteBuf
public CompositeByteBuf setBytes(int index, byte[] src, int srcIndex, int length)
ByteBuf
index 。
此方法不修改此缓冲区的readerIndex或writerIndex 。
public CompositeByteBuf setBytes(int index, java.nio.ByteBuffer src)
ByteBuf
index开始传输到此缓冲区,直到源缓冲区的位置达到其限制。
此方法不会修改此缓冲区的readerIndex或writerIndex 。
public CompositeByteBuf setBytes(int index, ByteBuf src, int srcIndex, int length)
ByteBuf
index开始传送到此缓冲区。
此方法不会修改源(即this )和目标的readerIndex或writerIndex 。
public int setBytes(int index,
java.io.InputStream in,
int length)
throws java.io.IOException
ByteBuf
index开始传输到此缓冲区。
此方法不会修改此缓冲区的readerIndex或writerIndex 。
public int setBytes(int index,
java.nio.channels.ScatteringByteChannel in,
int length)
throws java.io.IOException
ByteBuf
index开始传输到此缓冲区。
此方法不会修改此缓冲区的readerIndex或writerIndex 。
public int setBytes(int index,
java.nio.channels.FileChannel in,
long position,
int length)
throws java.io.IOException
ByteBuf
index 。
此方法不会修改此缓冲区的readerIndex或writerIndex 。
此方法不会修改频道的位置。
public ByteBuf copy(int index, int length)
ByteBuf
readerIndex或writerIndex 。
public ByteBuf internalComponent(int cIndex)
ByteBuf 。
请注意,更新返回缓冲区的索引将导致此缓冲区的未定义行为。
cIndex -查找索引ByteBuf应退还
public ByteBuf internalComponentAtOffset(int offset)
ByteBuf 。
请注意,更新返回缓冲区的索引将导致此缓冲区的未定义行为。
offset -偏移量为其ByteBuf应退还
public int nioBufferCount()
ByteBuf
ByteBuffer的最大数量。
请注意, ByteBuf.nioBuffers()或ByteBuf.nioBuffers(int, int)可能会返回更少数量的ByteBuffer 。
nioBufferCount在类
ByteBuf
-1如果此缓冲区没有标的ByteBuffer 。
如果此缓冲区至少有一个基础ByteBuffer ,则基础ByteBuffer的ByteBuffer 。
请注意,此方法不返回0以避免混淆。
ByteBuf.nioBuffer() ,
ByteBuf.nioBuffer(int, int) ,
ByteBuf.nioBuffers() ,
ByteBuf.nioBuffers(int, int)
public java.nio.ByteBuffer internalNioBuffer(int index,
int length)
ByteBuf
internalNioBuffer在类
ByteBuf
public java.nio.ByteBuffer nioBuffer(int index,
int length)
ByteBuf
ByteBuffer 。
返回的缓冲区共享或包含此缓冲区的复制内容,同时更改返回的NIO缓冲区的位置和限制不会影响此缓冲区的索引和标记。
此方法不会修改此缓冲区的readerIndex或writerIndex 。
请注意,如果此缓冲区是动态缓冲区并且它调整了其容量,则返回的NIO缓冲区将不会看到此缓冲区的更改。
nioBuffer在类
ByteBuf
ByteBuf.nioBufferCount() ,
ByteBuf.nioBuffers() ,
ByteBuf.nioBuffers(int, int)
public java.nio.ByteBuffer[] nioBuffers(int index,
int length)
ByteBuf
ByteBuffer返回的缓冲区共享或包含此缓冲区的复制内容,同时更改返回的NIO缓冲区的位置和限制不会影响此索引和标记缓冲。
此方法不会修改此缓冲区的readerIndex或writerIndex 。
请注意,如果此缓冲区是动态缓冲区并且它调整了其容量,则返回的NIO缓冲区将不会看到此缓冲区的更改。
nioBuffers在类
ByteBuf
ByteBuf.nioBufferCount() ,
ByteBuf.nioBuffer() ,
ByteBuf.nioBuffer(int, int)
public CompositeByteBuf consolidate()
ByteBuf
public CompositeByteBuf consolidate(int cIndex, int numComponents)
ByteBuf
cIndex - 开始撰写的索引
numComponents - 组成的组件数量
public CompositeByteBuf discardReadComponents()
ByteBuf 。
public CompositeByteBuf discardReadBytes()
ByteBuf
readerIndex之间的字节。
它移动之间的字节readerIndex和writerIndex至第0索引,并且设置readerIndex和writerIndex至0和oldWriterIndex - oldReaderIndex分别。
请参阅班级文件以获得更详细的解释。
public java.lang.String toString()
ByteBuf
ByteBuf.readerIndex() , ByteBuf.writerIndex()和ByteBuf.capacity() 。
toString在类
AbstractByteBuf
public CompositeByteBuf readerIndex(int readerIndex)
ByteBuf
readerIndex 。
readerIndex在类
AbstractByteBuf
public CompositeByteBuf writerIndex(int writerIndex)
ByteBuf
writerIndex 。
writerIndex在类
AbstractByteBuf
public CompositeByteBuf setIndex(int readerIndex, int writerIndex)
ByteBuf
readerIndex设置此缓冲区的readerIndex和writerIndex 。
当您不得不担心ByteBuf.readerIndex(int)和ByteBuf.writerIndex(int)方法的调用顺序时,此方法非常有用。
例如,以下代码将失败:
// Create a buffer whose readerIndex, writerIndex and capacity are
// 0, 0 and 8 respectively.
ByteBuf buf = Unpooled.buffer(8);
// IndexOutOfBoundsException is thrown because the specified
// readerIndex (2) cannot be greater than the current writerIndex (0).
buf.readerIndex(2);
buf.writerIndex(4);
以下代码也将失败:
// Create a buffer whose readerIndex, writerIndex and capacity are
// 0, 8 and 8 respectively.
ByteBuf buf = Unpooled.wrappedBuffer(new byte[8]);
// readerIndex becomes 8.
buf.readLong();
// IndexOutOfBoundsException is thrown because the specified
// writerIndex (4) cannot be less than the current readerIndex (8).
buf.writerIndex(4);
buf.readerIndex(2);
相比之下,只要指定的索引满足基本约束,该方法就保证它不会抛出IndexOutOfBoundsException ,无论缓冲区的当前索引值是什么:
// No matter what the current state of the buffer is, the following
// call always succeeds as long as the capacity of the buffer is not
// less than 4.
buf.setIndex(2, 4);
public CompositeByteBuf clear()
ByteBuf
readerIndex和writerIndex设置为0 。
该方法与setIndex(0, 0)完全相同。
请注意,此方法的行为与NIO缓冲区的行为不同,后者将limit设置为limit的capacity 。
clear在类
AbstractByteBuf
public CompositeByteBuf markReaderIndex()
ByteBuf
readerIndex 。
您可以重新定位当前readerIndex到标记readerIndex通过调用ByteBuf.resetReaderIndex() 。
标记的初始值readerIndex是0 。
public CompositeByteBuf resetReaderIndex()
ByteBuf
readerIndex重新定位到此缓冲区中标记为
readerIndex 。
public CompositeByteBuf markWriterIndex()
ByteBuf
writerIndex 。
您可以重新定位当前writerIndex到标记writerIndex通过调用ByteBuf.resetWriterIndex() 。
标记的初始值writerIndex是0 。
public CompositeByteBuf resetWriterIndex()
ByteBuf
writerIndex重新定位到此缓冲区中标记为
writerIndex 。
public CompositeByteBuf ensureWritable(int minWritableBytes)
ByteBuf
ensureWritable在类
AbstractByteBuf
minWritableBytes - 可写入字节的预期最小数量
public CompositeByteBuf getBytes(int index, ByteBuf dst)
ByteBuf
index开始,直到目标变为不可写。
此方法与ByteBuf.getBytes(int, ByteBuf, int, int)基本相同,不同之writerIndex于此方法通过传输字节数增加目标的writerIndex ,而ByteBuf.getBytes(int, ByteBuf, int, int)则不增加。
此方法不会修改源缓冲区的readerIndex或writerIndex (即this )。
getBytes在类
AbstractByteBuf
public CompositeByteBuf getBytes(int index, ByteBuf dst, int length)
ByteBuf
index开始的目标。
此方法与ByteBuf.getBytes(int, ByteBuf, int, int)基本相同,不同之writerIndex于此方法通过传输字节数增加目标的writerIndex ,而ByteBuf.getBytes(int, ByteBuf, int, int)则不增加。
此方法不会修改源缓冲区的readerIndex或writerIndex (即this )。
getBytes上课
AbstractByteBuf
length - 要传输的字节数
public CompositeByteBuf getBytes(int index, byte[] dst)
ByteBuf
index开始的目标。
此方法不会修改此缓冲区的readerIndex或writerIndex
getBytes在类
AbstractByteBuf
public CompositeByteBuf setBoolean(int index, boolean value)
ByteBuf
index处设置指定的布尔值。
此方法不会修改此缓冲区的readerIndex或writerIndex 。
setBoolean在类
AbstractByteBuf
public CompositeByteBuf setChar(int index, int value)
ByteBuf
index处设置指定的2字节UTF-16字符。
指定值的16个高位被忽略。
此方法不会修改此缓冲区的readerIndex或writerIndex 。
setChar在类
AbstractByteBuf
public CompositeByteBuf setFloat(int index, float value)
ByteBuf
index处设置指定的32位浮点数。
此方法不会修改此缓冲区的readerIndex或writerIndex 。
setFloat在类
AbstractByteBuf
public CompositeByteBuf setDouble(int index, double value)
ByteBuf
index处设置指定的64位浮点数。
此方法不会修改此缓冲区的readerIndex或writerIndex 。
setDouble在类
AbstractByteBuf
public CompositeByteBuf setBytes(int index, ByteBuf src)
ByteBuf
index开始传输到此缓冲区,直到源缓冲区变得不可读。
此方法与ByteBuf.setBytes(int, ByteBuf, int, int)基本相同,不同之readerIndex于此方法将源缓冲区的readerIndex增加了传输字节数,而ByteBuf.setBytes(int, ByteBuf, int, int)则不增加。
此方法不会修改源缓冲区的readerIndex或writerIndex (即this )。
setBytes类
AbstractByteBuf
public CompositeByteBuf setBytes(int index, ByteBuf src, int length)
ByteBuf
index 。
此方法与ByteBuf.setBytes(int, ByteBuf, int, int)基本相同,不同之readerIndex于此方法将源缓冲区的readerIndex增加了传输字节数,而ByteBuf.setBytes(int, ByteBuf, int, int)则不增加。
此方法不会修改源缓冲区的readerIndex或writerIndex (即this )。
setBytes在类
AbstractByteBuf
length - 要传输的字节数
public CompositeByteBuf setBytes(int index, byte[] src)
ByteBuf
index 。
此方法不会修改此缓冲区的readerIndex或writerIndex 。
setBytes在类
AbstractByteBuf
public CompositeByteBuf setZero(int index, int length)
ByteBuf
index开始填充此缓冲区。
此方法不会修改此缓冲区的readerIndex或writerIndex 。
setZero在类
AbstractByteBuf
length - 写入缓冲区的数量为
NUL
public CompositeByteBuf readBytes(ByteBuf dst)
ByteBuf
readerIndex开始,直到目标变为不可写,并将readerIndex增加readerIndex 。
此方法与ByteBuf.readBytes(ByteBuf, int, int)基本相同,只是此方法通过传输字节数增加目标的writerIndex ,而ByteBuf.readBytes(ByteBuf, int, int)则不增加。
readBytes在课堂上
AbstractByteBuf
public CompositeByteBuf readBytes(ByteBuf dst, int length)
ByteBuf
readerIndex并增加了readerIndex由传输的字节(=数量length )。
此方法与ByteBuf.readBytes(ByteBuf, int, int)基本相同,不同之writerIndex于此方法通过传输的字节数(= length )增加目标的writerIndex ,而ByteBuf.readBytes(ByteBuf, int, int)则不增加。
readBytes在类
AbstractByteBuf
public CompositeByteBuf readBytes(ByteBuf dst, int dstIndex, int length)
ByteBuf
readerIndex并增加了
readerIndex由传输的字节(=数量
length )。
readBytes在类
AbstractByteBuf
dstIndex - 目的地的第一个索引
length - 要传输的字节数
public CompositeByteBuf readBytes(byte[] dst)
ByteBuf
readerIndex开始,并将
readerIndex增加
readerIndex (传输的字节
dst.length )(=
dst.length )。
readBytes在类
AbstractByteBuf
public CompositeByteBuf readBytes(byte[] dst, int dstIndex, int length)
ByteBuf
readerIndex并增加了
readerIndex由传输的字节(=数量
length )。
readBytes在类
AbstractByteBuf
dstIndex - 目的地的第一个索引
length - 要传输的字节数
public CompositeByteBuf readBytes(java.nio.ByteBuffer dst)
ByteBuf
readerIndex开始,直到目标的位置达到其限制,并将
readerIndex增加
readerIndex 。
readBytes在类
AbstractByteBuf
public CompositeByteBuf readBytes(java.io.OutputStream out, int length) throws java.io.IOException
ByteBuf
readerIndex开始的指定流。
readBytes在类
AbstractByteBuf
length - 要传输的字节数
java.io.IOException - 如果指定的流在I / O期间抛出异常
public CompositeByteBuf skipBytes(int length)
ByteBuf
length增加当前
readerIndex 。
skipBytes在类
AbstractByteBuf
public CompositeByteBuf writeBoolean(boolean value)
ByteBuf
writerIndex设置指定的布尔值,并在此缓冲区
writerIndex
1增加
writerIndex 。
writeBoolean在类
AbstractByteBuf
public CompositeByteBuf writeByte(int value)
ByteBuf
writerIndex处设置指定的字节,并在此缓冲区writerIndex 1增加writerIndex 。
指定值的24个高位被忽略。
writeByte在类
AbstractByteBuf
public CompositeByteBuf writeShort(int value)
ByteBuf
writerIndex处设置指定的16位短整数,并在此缓冲区writerIndex 2增加writerIndex 。
指定值的16个高位被忽略。
writeShort在类
AbstractByteBuf
public CompositeByteBuf writeMedium(int value)
ByteBuf
writerIndex中设置指定的24位中等整数,并在此缓冲区
writerIndex
3增加
writerIndex 。
writeMedium在类
AbstractByteBuf
public CompositeByteBuf writeInt(int value)
ByteBuf
writerIndex处设置指定的32位整数,并在此缓冲区
writerIndex
4增加
writerIndex 。
writeInt在类
AbstractByteBuf
public CompositeByteBuf writeLong(long value)
ByteBuf
writerIndex处设置指定的64位长整数,并在此缓冲区
writerIndex
8增加
writerIndex 。
writeLong在类
AbstractByteBuf
public CompositeByteBuf writeChar(int value)
ByteBuf
writerIndex处设置指定的2字节UTF-16字符,并在此缓冲区writerIndex 2增加writerIndex 。
指定值的16个高位被忽略。
writeChar在类
AbstractByteBuf
public CompositeByteBuf writeFloat(float value)
ByteBuf
writerIndex处设置指定的32位浮点数,并在此缓冲区
writerIndex
4增加
writerIndex 。
writeFloat在类
AbstractByteBuf
public CompositeByteBuf writeDouble(double value)
ByteBuf
writerIndex处设置指定的64位浮点数,并在此缓冲区
writerIndex
8增加
writerIndex 。
writeDouble在类
AbstractByteBuf
public CompositeByteBuf writeBytes(ByteBuf src)
ByteBuf
writerIndex开始,直到源缓冲区变得不可读,并将传输字节数增加writerIndex 。
该方法与ByteBuf.writeBytes(ByteBuf, int, int)基本相同,不同的是此方法将源缓冲区的readerIndex增加了传输字节数,而ByteBuf.writeBytes(ByteBuf, int, int)则不增加。
writeBytes上课
AbstractByteBuf
public CompositeByteBuf writeBytes(ByteBuf src, int length)
ByteBuf
writerIndex开始,并将writerIndex增加writerIndex所传输的字节数(= length )。
此方法与ByteBuf.writeBytes(ByteBuf, int, int)基本相同,不同之readerIndex于此方法将源缓冲区的readerIndex增加了传输字节数(= length ),而ByteBuf.writeBytes(ByteBuf, int, int)不增加ByteBuf.writeBytes(ByteBuf, int, int) 。
writeBytes在类
AbstractByteBuf
length - 要传输的字节数
public CompositeByteBuf writeBytes(ByteBuf src, int srcIndex, int length)
ByteBuf
writerIndex并增加了
writerIndex由传输的字节(=数量
length )。
writeBytes在类
AbstractByteBuf
srcIndex - 来源的第一个索引
length - 要传输的字节数
public CompositeByteBuf writeBytes(byte[] src)
ByteBuf
writerIndex并增加了
writerIndex由传输的字节(=数量
src.length )。
writeBytes在类
AbstractByteBuf
public CompositeByteBuf writeBytes(byte[] src, int srcIndex, int length)
ByteBuf
writerIndex并增加了
writerIndex由传输的字节(=数量
length )。
writeBytes在类
AbstractByteBuf
srcIndex - 来源的第一个索引
length - 要传输的字节数
public CompositeByteBuf writeBytes(java.nio.ByteBuffer src)
ByteBuf
writerIndex开始传输到此缓冲区,直到源缓冲区的位置达到其限制,并将传输字节数增加
writerIndex 。
public CompositeByteBuf writeZero(int length)
ByteBuf
writerIndex增加
writerIndex指定的
length 。
writeZero在类
AbstractByteBuf
length - 写入缓冲区的数量为
NUL
public CompositeByteBuf retain(int increment)
ReferenceCounted复制的描述
increment增加引用计数。
retain接口
ReferenceCounted
retain在类
AbstractReferenceCountedByteBuf
public CompositeByteBuf retain()
ReferenceCounted复制的描述
1 。
retain在界面
ReferenceCounted
retain在类
AbstractReferenceCountedByteBuf
public CompositeByteBuf touch()
ReferenceCounted复制的描述
touch ,界面
ReferenceCounted
touch在类
AbstractReferenceCountedByteBuf
public CompositeByteBuf touch(java.lang.Object hint)
ReferenceCounted复制的描述
ResourceLeakDetector提供给您。
touch接口
ReferenceCounted
touch类
AbstractReferenceCountedByteBuf
public java.nio.ByteBuffer[] nioBuffers()
ByteBuf
ByteBuffer的形式公开此缓冲区的可读字节。
返回的缓冲区共享或包含此缓冲区的复制内容,同时更改返回的NIO缓冲区的位置和限制不会影响此缓冲区的索引和标记。
此方法不会修改此缓冲区的readerIndex或writerIndex 。
请注意,如果此缓冲区是动态缓冲区并且它调整了其容量,则返回的NIO缓冲区将不会看到此缓冲区的更改。
public CompositeByteBuf discardSomeReadBytes()
ByteBuf
ByteBuf.discardReadBytes(),不同之
处在于此方法可能会丢弃部分,全部或者全部读取字节,具体取决于其内部实现方式,以减少潜在的额外内存消耗为代价来降低整体内存带宽消耗。
protected void deallocate()
AbstractReferenceCountedByteBuf
deallocate在类
AbstractReferenceCountedByteBuf
Copyright © 2008–2018 The Netty Project. All rights reserved.