Interface Buffers
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
A strategy for allocating the
ByteBuffer into which records are read- Since:
- 0.4.0
-
Method Summary
Modifier and TypeMethodDescriptionallocate()Allocate a buffer configured with this specificationstatic BuffersSpecify a block-aligned direct buffer, rounding capacity up to whole blocksstatic Buffersheap(int capacity) Specify a little endian heap bufferstatic BuffersSpecify a heap buffer with the provided byte order
-
Method Details
-
allocate
ByteBuffer allocate()Allocate a buffer configured with this specification- Returns:
- the allocated buffer
- Since:
- 1.0.0
-
heap
Specify a little endian heap buffer- Parameters:
capacity- the capacity in bytes with which to allocate buffers- Returns:
- the heap buffers
-
heap
-
direct
Specify a block-aligned direct buffer, rounding capacity up to whole blocks- Parameters:
capacity- the capacity in bytes with which to allocate buffers, treated as a lower boundorder- the byte order to be used in the interpretation of the buffered data- Returns:
- the direct buffers
-