DataBuffers, allowing for allocation and
wrapping of data buffers.
DataBuffer
| Modifier and Type | Method and Description |
|---|---|
| public DataBuffer | Returns: the allocated buffer
Deprecated
since 6.0. as of 6.0, in favor of
Allocate a data buffer of a default initial capacity.
allocateBuffer(int)
|
| public DataBuffer | Returns: the allocated bufferthe initial capacity of the buffer to allocate initialCapacity)Allocate a data buffer of the given initial capacity. |
| public boolean | Returns: true if this factory allocates direct buffers;
false otherwiseIndicates whether this factory allocates direct buffers (i.e. non-heap, native memory). |
| public DataBuffer | Returns: a buffer that is composed of thedataBuffers argumentthe data buffers to be composed dataBuffers)Return a new |
| public DataBuffer | Returns: the wrapped bufferthe NIO byte buffer to wrap byteBuffer)Wrap the given |
| public DataBuffer | Returns: the wrapped bufferthe byte array to wrap bytes)Wrap the given |
| allocateBuffer | back to summary |
|---|---|
| public DataBuffer allocateBuffer()
Allocate a data buffer of a default initial capacity. Depending on the underlying implementation and its configuration, this will be heap-based or direct buffer.
| |
| allocateBuffer | back to summary |
|---|---|
| public DataBuffer allocateBuffer(int initialCapacity) Allocate a data buffer of the given initial capacity. Depending on the underlying implementation and its configuration, this will be heap-based or direct buffer.
| |
| isDirect | back to summary |
|---|---|
| public boolean isDirect() Indicates whether this factory allocates direct buffers (i.e. non-heap, native memory).
| |
| join | back to summary |
|---|---|
| public DataBuffer join(List<? extends DataBuffer> dataBuffers) Return a new Note that the given data buffers do not have to be released, as they are released as part of the returned composite.
| |
| wrap | back to summary |
|---|---|
| public DataBuffer wrap(ByteBuffer byteBuffer) Wrap the given
| |
| wrap | back to summary |
|---|---|
| public DataBuffer wrap(byte[] bytes) Wrap the given
| |