Package: org.conscrypt
BufferAllocator
public abstract class BufferAllocator
An object responsible for allocation of buffers. This is an extension point to enable buffer
pooling within an application.
Constructors
Public Methods
unpooled
public static BufferAllocator unpooled()
Returns an unpooled buffer allocator, which will create a new buffer for each request.
allocateDirectBuffer
public abstract AllocatedBuffer allocateDirectBuffer(int capacity)
Allocates a direct (i.e. non-heap) buffer with the given capacity.
allocateHeapBuffer
public abstract AllocatedBuffer allocateHeapBuffer(int capacity)
Allocates a heap buffer with the given capacity.