public interface ByteBufAllocator
Modifier and Type | Field and Description |
---|---|
static ByteBufAllocator |
DEFAULT |
Modifier and Type | Method and Description |
---|---|
ByteBuf |
buffer()
分配一个 ByteBuf 。
|
ByteBuf |
buffer(int initialCapacity)
分配给定的初始容量 ByteBuf 。
|
ByteBuf |
buffer(int initialCapacity, int maxCapacity)
用给定的初始容量和给定的最大容量分配 ByteBuf 。
|
int |
calculateNewCapacity(int minNewCapacity, int maxCapacity)
|
CompositeByteBuf |
compositeBuffer()
分配一个 CompositeByteBuf 。
|
CompositeByteBuf |
compositeBuffer(int maxNumComponents)
分配一个 CompositeByteBuf ,其中可以存储最多数量的组件。
|
CompositeByteBuf |
compositeDirectBuffer()
直接分配 CompositeByteBuf 。
|
CompositeByteBuf |
compositeDirectBuffer(int maxNumComponents)
分配一个直接 CompositeByteBuf 与给定的最大数量的组件可以存储在它。
|
CompositeByteBuf |
compositeHeapBuffer()
分配堆 CompositeByteBuf 。
|
CompositeByteBuf |
compositeHeapBuffer(int maxNumComponents)
分配一个堆 CompositeByteBuf ,其中可以存储最多数量的组件。
|
ByteBuf |
directBuffer()
直接分配 ByteBuf 。
|
ByteBuf |
directBuffer(int initialCapacity)
分配给定的初始容量的直接 ByteBuf 。
|
ByteBuf |
directBuffer(int initialCapacity, int maxCapacity)
分配给定的初始容量和给定的最大容量的直接 ByteBuf 。
|
ByteBuf |
heapBuffer()
分配一个堆 ByteBuf 。
|
ByteBuf |
heapBuffer(int initialCapacity)
用给定的初始容量分配堆 ByteBuf 。
|
ByteBuf |
heapBuffer(int initialCapacity, int maxCapacity)
分配一个堆 ByteBuf 与给定的初始容量和给定的最大容量。
|
ByteBuf |
ioBuffer()
分配一个 ByteBuf ,最好是一个适用于I / O的直接缓冲区。
|
ByteBuf |
ioBuffer(int initialCapacity)
分配一个 ByteBuf ,最好是一个适合I / O的直接缓冲区。
|
ByteBuf |
ioBuffer(int initialCapacity, int maxCapacity)
分配一个 ByteBuf ,最好是一个适用于I / O的直接缓冲区。
|
boolean |
isDirectBufferPooled()
如果直接收集 true 则返回true
|
static final ByteBufAllocator DEFAULT
ByteBuf buffer(int initialCapacity, int maxCapacity)
ByteBuf
。
如果是直接或堆缓冲取决于实际的实现。
ByteBuf directBuffer(int initialCapacity, int maxCapacity)
ByteBuf
。
CompositeByteBuf compositeBuffer()
CompositeByteBuf
。
如果是直接或堆缓冲取决于实际的实现。
CompositeByteBuf compositeBuffer(int maxNumComponents)
CompositeByteBuf
与给定的最大数量的组件可以存储在它。
如果是直接或堆缓冲取决于实际的实现。
CompositeByteBuf compositeHeapBuffer()
CompositeByteBuf
。
CompositeByteBuf compositeHeapBuffer(int maxNumComponents)
CompositeByteBuf
,其中可以存储最多数量的组件。
CompositeByteBuf compositeDirectBuffer()
CompositeByteBuf
。
CompositeByteBuf compositeDirectBuffer(int maxNumComponents)
CompositeByteBuf
与给定的最大数量的组件可以存储在它。
boolean isDirectBufferPooled()
true
则返回true
int calculateNewCapacity(int minNewCapacity, int maxCapacity)
Copyright © 2008–2018 The Netty Project. All rights reserved.