public class PooledNioByteBuf extends AbstractByteBuf
| 限定符和类型 | 字段和说明 |
|---|---|
protected LinkedList<net.hasor.neta.bytebuf.NioChunk> |
buffers |
alloc, byteOrder, markedReaderIndex, markedWriterIndex, readerIndex, writerIndex| 限定符 | 构造器和说明 |
|---|---|
protected |
PooledNioByteBuf(ByteBufAllocator alloc,
int capacity,
int maxCapacity,
int sliceSize,
net.hasor.neta.bytebuf.NioChunkAllocator chunkAllocator) |
| 限定符和类型 | 方法和说明 |
|---|---|
protected byte |
_getByte(int offset) |
protected int |
_getBytes(int offset,
byte[] b,
int off,
int len) |
protected void |
_putByte(int offset,
byte b) |
protected void |
_putBytes(int offset,
byte[] b,
int off,
int len) |
byte[] |
array()
ByteBuf 的字节数组形态
|
ByteBuffer |
asByteBuffer()
返回 ByteBuffer 形态,PooledNioByteBuf 不支持该方法
|
int |
capacity()
最大限制
|
PooledNioByteBuf |
copy()
复制个 ByteBuf , 连同 buffer 的数据一起复制
|
protected void |
extendByteBuf(int targetCapacity)
需要扩充到的目标容量
|
protected net.hasor.neta.bytebuf.NioChunk |
extendByteBuffer(int capacity) |
void |
free()
释放 Buffer 占用的内存
|
protected String |
getSimpleName() |
boolean |
isDirect()
ByteBuf 是否为堆外方式
|
protected void |
recycleByteBuf()
回收 markedReaderIndex 之前的内存区块
|
alloc, checkFree, checkReadable, finalize, getByte, getBytes, getInt16, getInt16LE, getInt24, getInt24LE, getInt32, getInt32LE, getInt64, getInt64LE, getMaxCapacity, getUInt16, getUInt16LE, getUInt24, getUInt24LE, getUInt32, getUInt32LE, getUInt8, isFree, isOpen, markReader, markWriter, nextReadable, nextWritable, offsetWritable, order, order, read, read, readableBytes, readByte, readBytes, readBytes, readerIndex, readInt16, readInt16LE, readInt24, readInt24LE, readInt32, readInt32LE, readInt64, readInt64LE, readUInt16, readUInt16LE, readUInt24, readUInt24LE, readUInt32, readUInt32LE, readUInt8, receivedBytes, resetReader, resetWriter, setByte, setBytes, setBytes, setInt16, setInt16LE, setInt24, setInt24LE, setInt32, setInt32LE, setInt64, setInt64LE, skipReadableBytes, skipWritableBytes, toString, writableBytes, write, write, writeByte, writeBytes, writedBytes, writeInt16, writeInt16LE, writeInt24, writeInt24LE, writeInt32, writeInt32LE, writeInt64, writeInt64LE, writerIndex, writeUInt32, writeUInt32LEclear, close, expect, expect, expectLast, expectLast, expectLine, flush, getBytes, getFloat32, getFloat32LE, getFloat64, getFloat64LE, getString, hasLine, hasReadable, hasWritable, read, readBytes, readExpect, readExpect, readExpectLast, readExpectLast, readFloat32, readFloat32LE, readFloat64, readFloat64LE, readLine, readLine, readString, setFloat32, setFloat32LE, setFloat64, setFloat64LE, setString, writeBytes, writeFloat32, writeFloat32LE, writeFloat64, writeFloat64LE, writeStringprotected final LinkedList<net.hasor.neta.bytebuf.NioChunk> buffers
protected PooledNioByteBuf(ByteBufAllocator alloc, int capacity, int maxCapacity, int sliceSize, net.hasor.neta.bytebuf.NioChunkAllocator chunkAllocator)
protected void _putByte(int offset,
byte b)
_putByte 在类中 AbstractByteBufprotected void _putBytes(int offset,
byte[] b,
int off,
int len)
_putBytes 在类中 AbstractByteBufprotected byte _getByte(int offset)
_getByte 在类中 AbstractByteBufprotected int _getBytes(int offset,
byte[] b,
int off,
int len)
_getBytes 在类中 AbstractByteBufprotected void extendByteBuf(int targetCapacity)
AbstractByteBufextendByteBuf 在类中 AbstractByteBufprotected net.hasor.neta.bytebuf.NioChunk extendByteBuffer(int capacity)
protected void recycleByteBuf()
AbstractByteBufrecycleByteBuf 在类中 AbstractByteBufpublic int capacity()
ByteBufpublic byte[] array()
ByteBufpublic boolean isDirect()
ByteBufpublic PooledNioByteBuf copy()
ByteBufpublic ByteBuffer asByteBuffer()
ByteBufpublic void free()
ByteBuffree 在接口中 ByteBuffree 在类中 AbstractByteBufprotected String getSimpleName()
getSimpleName 在类中 AbstractByteBufCopyright © 2022–2024. All rights reserved.