# Uses of Interface
org.xnio.BufferAllocator

Packages that use BufferAllocator
Package
Description
org.xnio
The main API package for XNIO.

## Uses of BufferAllocator in org.xnio

Fields in org.xnio declared as BufferAllocator
Modifier and Type
Field
Description
`static final BufferAllocator<ByteBuffer>`
BufferAllocator.`BYTE_BUFFER_ALLOCATOR`
A simple allocator for heap-array-backed byte buffers.
`static final BufferAllocator<ByteBuffer>`
BufferAllocator.`DIRECT_BYTE_BUFFER_ALLOCATOR`
A simple allocator for direct byte buffers.
Methods in org.xnio that return BufferAllocator
Modifier and Type
Method
Description
`static BufferAllocator<ByteBuffer>`
Buffers.`sliceAllocator(ByteBuffer buffer)`
A buffer allocator which allocates slices off of the given buffer.
Methods in org.xnio with parameters of type BufferAllocator
Modifier and Type
Method
Description
`static <B extends Buffer>
Pool<B>`
Buffers.`allocatedBufferPool(BufferAllocator<B> allocator, int size)`
A buffer pool which allocates a new buffer on every allocate request, and discards buffers on free.
`static ByteBuffer`
Buffers.`copy(ByteBuffer buffer, int count, BufferAllocator<ByteBuffer> allocator)`
Copy a portion of the buffer into a newly allocated buffer.
Constructors in org.xnio with parameters of type BufferAllocator
Modifier
Constructor
Description
``
`ByteBufferSlicePool(BufferAllocator<ByteBuffer> allocator, int bufferSize, int maxRegionSize)`
Deprecated.
Construct a new instance.
``
`ByteBufferSlicePool(BufferAllocator<ByteBuffer> allocator, int bufferSize, int maxRegionSize, int threadLocalQueueSize)`
Deprecated.
Construct a new instance.