public abstract class AbstractByteBufAllocator extends Object implements ByteBufAllocator
| 限定符和类型 | 字段和说明 |
|---|---|
protected net.hasor.neta.bytebuf.NioChunkAllocator |
directNioChunkAllocator |
protected net.hasor.neta.bytebuf.NioChunkAllocator |
heapNioChunkAllocator |
protected int |
initialCapacityByDefault |
protected int |
sliceSizeByDefault |
DEFAULT| 限定符 | 构造器和说明 |
|---|---|
protected |
AbstractByteBufAllocator(int initialCapacityByDefault,
int sliceSizeByDefault)
Create new instance
|
| 限定符和类型 | 方法和说明 |
|---|---|
ByteBuf |
arrayBuffer()
Allocate a
ByteBuf, with the bytes array. |
ByteBuf |
arrayBuffer(int capacity)
Allocate a
ByteBuf, with the bytes array. |
ByteBuf |
arrayBuffer(int initialCapacity,
int maxCapacity)
Allocate a
ByteBuf, with the bytes array. |
ByteBuf |
buffer()
Allocate a
ByteBuf. |
ByteBuf |
buffer(int initialCapacity)
Allocate a
ByteBuf with the given initial capacity. |
ByteBuf |
directBuffer()
Allocate a direct
ByteBuf. |
ByteBuf |
directBuffer(int capacity)
Allocate a direct
ByteBuf with the given initial capacity. |
ByteBuf |
directBuffer(int initialCapacity,
int maxCapacity)
Allocate a direct
ByteBuf with the given initial capacity and the given maximal capacity. |
ByteBuf |
heapBuffer()
Allocate a heap
ByteBuf. |
ByteBuf |
heapBuffer(int capacity)
Allocate a heap
ByteBuf with the given initial capacity. |
ByteBuf |
heapBuffer(int initialCapacity,
int maxCapacity)
Allocate a heap
ByteBuf with the given initial capacity and the given maximal capacity. |
ByteBuf |
pooledBuffer()
Allocate pooled
ByteBuf. |
ByteBuf |
pooledBuffer(int maxCapacity,
int sliceSize)
Allocate pooled
ByteBuf with the given maximal capacity. |
ByteBuf |
pooledDirectBuffer()
Allocate pooled
ByteBuf. |
ByteBuf |
pooledDirectBuffer(int maxCapacity,
int sliceSize)
Allocate pooled
ByteBuf with the given maximal capacity. |
ByteBuf |
pooledDirectBuffer(int initialCapacity,
int maxCapacity,
int sliceSize)
Allocate a direct
ByteBuf with the given initial capacity and the given maximal capacity. |
ByteBuf |
pooledHeapBuffer()
Allocate pooled
ByteBuf. |
ByteBuf |
pooledHeapBuffer(int maxCapacity,
int sliceSize)
Allocate pooled
ByteBuf with the given maximal capacity. |
ByteBuf |
pooledHeapBuffer(int initialCapacity,
int maxCapacity,
int sliceSize)
Allocate a direct
ByteBuf with the given initial capacity and the given maximal capacity. |
ByteBuf |
wrap(byte[] bytes)
Allocate a
ByteBuf, with the bytes array. |
ByteBuf |
wrap(ByteBuffer javaBuffer)
Allocate a
ByteBuf, with the ByteBuffer. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitbuffer, isDirect, isPooled, pooledBufferprotected final int initialCapacityByDefault
protected final int sliceSizeByDefault
protected final net.hasor.neta.bytebuf.NioChunkAllocator heapNioChunkAllocator
protected final net.hasor.neta.bytebuf.NioChunkAllocator directNioChunkAllocator
protected AbstractByteBufAllocator(int initialCapacityByDefault,
int sliceSizeByDefault)
public ByteBuf buffer()
ByteBufAllocatorByteBuf.
If it is a direct or heap buffer depends on the actual implementation.buffer 在接口中 ByteBufAllocatorpublic ByteBuf buffer(int initialCapacity)
ByteBufAllocatorByteBuf with the given initial capacity.
If it is a direct or heap buffer depends on the actual implementation.buffer 在接口中 ByteBufAllocatorpublic ByteBuf arrayBuffer()
ByteBufAllocatorByteBuf, with the bytes array.arrayBuffer 在接口中 ByteBufAllocatorpublic ByteBuf wrap(byte[] bytes)
ByteBufAllocatorByteBuf, with the bytes array.wrap 在接口中 ByteBufAllocatorpublic ByteBuf wrap(ByteBuffer javaBuffer)
ByteBufAllocatorByteBuf, with the ByteBuffer.wrap 在接口中 ByteBufAllocatorpublic ByteBuf arrayBuffer(int capacity)
ByteBufAllocatorByteBuf, with the bytes array.arrayBuffer 在接口中 ByteBufAllocatorpublic ByteBuf arrayBuffer(int initialCapacity, int maxCapacity)
ByteBufAllocatorByteBuf, with the bytes array.arrayBuffer 在接口中 ByteBufAllocatorpublic ByteBuf heapBuffer()
ByteBufAllocatorByteBuf.heapBuffer 在接口中 ByteBufAllocatorpublic ByteBuf heapBuffer(int capacity)
ByteBufAllocatorByteBuf with the given initial capacity.heapBuffer 在接口中 ByteBufAllocatorpublic ByteBuf heapBuffer(int initialCapacity, int maxCapacity)
ByteBufAllocatorByteBuf with the given initial capacity and the given maximal capacity.heapBuffer 在接口中 ByteBufAllocatorpublic ByteBuf directBuffer()
ByteBufAllocatorByteBuf.directBuffer 在接口中 ByteBufAllocatorpublic ByteBuf directBuffer(int capacity)
ByteBufAllocatorByteBuf with the given initial capacity.directBuffer 在接口中 ByteBufAllocatorpublic ByteBuf directBuffer(int initialCapacity, int maxCapacity)
ByteBufAllocatorByteBuf with the given initial capacity and the given maximal capacity.directBuffer 在接口中 ByteBufAllocatorpublic ByteBuf pooledBuffer()
ByteBufAllocatorByteBuf.
If it is a direct or heap buffer depends on the actual implementation.pooledBuffer 在接口中 ByteBufAllocatorpublic ByteBuf pooledBuffer(int maxCapacity, int sliceSize)
ByteBufAllocatorByteBuf with the given maximal capacity.
If it is a direct or heap buffer depends on the actual implementation.pooledBuffer 在接口中 ByteBufAllocatorpublic ByteBuf pooledHeapBuffer()
ByteBufAllocatorByteBuf.pooledHeapBuffer 在接口中 ByteBufAllocatorpublic ByteBuf pooledHeapBuffer(int maxCapacity, int sliceSize)
ByteBufAllocatorByteBuf with the given maximal capacity.pooledHeapBuffer 在接口中 ByteBufAllocatorpublic ByteBuf pooledHeapBuffer(int initialCapacity, int maxCapacity, int sliceSize)
ByteBufAllocatorByteBuf with the given initial capacity and the given maximal capacity.pooledHeapBuffer 在接口中 ByteBufAllocatorpublic ByteBuf pooledDirectBuffer()
ByteBufAllocatorByteBuf.pooledDirectBuffer 在接口中 ByteBufAllocatorpublic ByteBuf pooledDirectBuffer(int maxCapacity, int sliceSize)
ByteBufAllocatorByteBuf with the given maximal capacity.pooledDirectBuffer 在接口中 ByteBufAllocatorpublic ByteBuf pooledDirectBuffer(int initialCapacity, int maxCapacity, int sliceSize)
ByteBufAllocatorByteBuf with the given initial capacity and the given maximal capacity.pooledDirectBuffer 在接口中 ByteBufAllocatorCopyright © 2022–2024. All rights reserved.