public interface ByteBufAllocator
Modifier and Type | Field and Description |
---|---|
static ByteBufAllocator |
DEFAULT |
Modifier and Type | Method and Description |
---|---|
ByteBuf |
buffer()
Allocate a
ByteBuf . |
ByteBuf |
buffer(int initialCapacity)
Allocate a
ByteBuf with the given initial capacity. |
ByteBuf |
buffer(int initialCapacity,
int maxCapacity)
Allocate a
ByteBuf with the given initial capacity and the given
maximal capacity. |
int |
calculateNewCapacity(int minNewCapacity,
int maxCapacity)
|
CompositeByteBuf |
compositeBuffer()
Allocate a
CompositeByteBuf . |
CompositeByteBuf |
compositeBuffer(int maxNumComponents)
Allocate a
CompositeByteBuf with the given maximum number of components that can be stored in it. |
CompositeByteBuf |
compositeDirectBuffer()
Allocate a direct
CompositeByteBuf . |
CompositeByteBuf |
compositeDirectBuffer(int maxNumComponents)
Allocate a direct
CompositeByteBuf with the given maximum number of components that can be stored in it. |
CompositeByteBuf |
compositeHeapBuffer()
Allocate a heap
CompositeByteBuf . |
CompositeByteBuf |
compositeHeapBuffer(int maxNumComponents)
Allocate a heap
CompositeByteBuf with the given maximum number of components that can be stored in it. |
ByteBuf |
directBuffer()
Allocate a direct
ByteBuf . |
ByteBuf |
directBuffer(int initialCapacity)
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 initialCapacity)
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 |
ioBuffer()
Allocate a
ByteBuf , preferably a direct buffer which is suitable for I/O. |
ByteBuf |
ioBuffer(int initialCapacity)
Allocate a
ByteBuf , preferably a direct buffer which is suitable for I/O. |
ByteBuf |
ioBuffer(int initialCapacity,
int maxCapacity)
Allocate a
ByteBuf , preferably a direct buffer which is suitable for I/O. |
boolean |
isDirectBufferPooled()
Returns
true if direct ByteBuf 's are pooled |
static final ByteBufAllocator DEFAULT
ByteBuf buffer()
ByteBuf
. If it is a direct or heap buffer
depends on the actual implementation.ByteBuf buffer(int initialCapacity)
ByteBuf
with the given initial capacity.
If it is a direct or heap buffer depends on the actual implementation.ByteBuf buffer(int initialCapacity, int maxCapacity)
ByteBuf
with the given initial capacity and the given
maximal capacity. If it is a direct or heap buffer depends on the actual
implementation.ByteBuf ioBuffer()
ByteBuf
, preferably a direct buffer which is suitable for I/O.ByteBuf ioBuffer(int initialCapacity)
ByteBuf
, preferably a direct buffer which is suitable for I/O.ByteBuf ioBuffer(int initialCapacity, int maxCapacity)
ByteBuf
, preferably a direct buffer which is suitable for I/O.ByteBuf heapBuffer(int initialCapacity)
ByteBuf
with the given initial capacity.ByteBuf heapBuffer(int initialCapacity, int maxCapacity)
ByteBuf
with the given initial capacity and the given
maximal capacity.ByteBuf directBuffer(int initialCapacity)
ByteBuf
with the given initial capacity.ByteBuf directBuffer(int initialCapacity, int maxCapacity)
ByteBuf
with the given initial capacity and the given
maximal capacity.CompositeByteBuf compositeBuffer()
CompositeByteBuf
.
If it is a direct or heap buffer depends on the actual implementation.CompositeByteBuf compositeBuffer(int maxNumComponents)
CompositeByteBuf
with the given maximum number of components that can be stored in it.
If it is a direct or heap buffer depends on the actual implementation.CompositeByteBuf compositeHeapBuffer()
CompositeByteBuf
.CompositeByteBuf compositeHeapBuffer(int maxNumComponents)
CompositeByteBuf
with the given maximum number of components that can be stored in it.CompositeByteBuf compositeDirectBuffer()
CompositeByteBuf
.CompositeByteBuf compositeDirectBuffer(int maxNumComponents)
CompositeByteBuf
with the given maximum number of components that can be stored in it.boolean isDirectBufferPooled()
true
if direct ByteBuf
's are pooledint calculateNewCapacity(int minNewCapacity, int maxCapacity)
Copyright © 2008–2024 The Netty Project. All rights reserved.