java.nio.ByteBuffer related utilities.
- Buffer a buffer inspired from
java.nio.ByteBuffer
.- FixedBuffer: a buffer with fixed size.
- AutoBuffer: a buffer grows when required.
- Buffers: factory methods for
Buffer
.
FixedBuffer
is an abstraction similar to java.nio.ByteBuffer
. Refer to FixedBuffer to find out details.
There are 3 types of auto buffer:
- Arithmetic Progression (AP): grows following AP sequences, with initial capacity and difference.
- Factory method:
Buffers.apAutoBuffer(Allocator allocator, int initCapacity, int difference)
- Factory method:
- Geometric Progression (GP): grows following GP sequences, with initial capacity and ratio.
- Factory method:
Buffers.gpAutoBuffer(Allocator allocator, int initCapacity, double ratio)
- Factory method:
- Power of 2 (POW2): grows with double capacity.
- Factory method:
Buffers.pow2AutoBuffer(Allocator allocator, int initCapacity)
- Factory method:
- Allocator allocator for
Buffer
.- FixedBufferAllocator: allocator for
FixedBufferAllocator
.
- FixedBufferAllocator: allocator for
- Allocators: factory methods for
Allocator
.- Allocator from pool:
Allocators.fromPool(IntFunction<FixedBufferPool> poolFactory)
- Allocator from pool:
- Pool pool for
Buffer
.- FixedBufferPool pool for
FixedBufferAllocator
.
- FixedBufferPool pool for
- Pools factory methods for
Pool
.- Pool from allocator:
Pools.fromAllocator(FixedBufferAllocator allocator, int bufferCapacity)
Pools.fromAllocator(FixedBufferAllocator allocator, int bufferCapacity, int initSize)
- Pool from allocator: