public interface DataBufferFactory
DataBuffer
s,allowing for allocation and wrapping of
data buffers.DataBuffer
Modifier and Type | Method and Description |
---|---|
DataBuffer |
allocateBuffer()
Allocate a data buffer of a default initial capacity.
|
DataBuffer |
allocateBuffer(int initialCapacity)
Allocate a data buffer of the given initial capacity.
|
DataBuffer |
wrap(byte[] bytes)
Wrap the given
byte array in a DataBuffer . |
DataBuffer |
wrap(java.nio.ByteBuffer byteBuffer)
Wrap the given
ByteBuffer in a DataBuffer . |
DataBuffer allocateBuffer()
DataBuffer allocateBuffer(int initialCapacity)
initialCapacity
- the initial capacity of the buffer to allocateDataBuffer wrap(java.nio.ByteBuffer byteBuffer)
ByteBuffer
in a DataBuffer
.byteBuffer
- the NIO byte buffer to wrapDataBuffer wrap(byte[] bytes)
byte
array in a DataBuffer
.bytes
- the byte array to wrap