public interface DataBufferFactory
DataBuffers, 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 | join(List<? extends DataBuffer> dataBuffers)Return a new  DataBuffercomposed of thedataBufferselements joined together. | 
| DataBuffer | wrap(byte[] bytes)Wrap the given  bytearray in aDataBuffer. | 
| DataBuffer | wrap(ByteBuffer byteBuffer)Wrap the given  ByteBufferin aDataBuffer. | 
DataBuffer allocateBuffer()
DataBuffer allocateBuffer(int initialCapacity)
initialCapacity - the initial capacity of the buffer to allocateDataBuffer wrap(ByteBuffer byteBuffer)
byteBuffer - the NIO byte buffer to wrapDataBuffer wrap(byte[] bytes)
bytes - the byte array to wrapDataBuffer join(List<? extends DataBuffer> dataBuffers)
DataBuffer composed of the dataBuffers elements joined together.
 Depending on the implementation, the returned buffer may be a single buffer containing all
 data of the provided buffers, or it may be a true composite that contains references to the
 buffers.
 Note that the given data buffers do not have to be released, as they are released as part of the returned composite.
dataBuffers - the data buffers to be composeddataBuffers argument