Package org.conscrypt

Class BufferAllocator


  • @ExperimentalApi
    public abstract class BufferAllocator
    extends java.lang.Object
    An object responsible for allocation of buffers. This is an extension point to enable buffer pooling within an application.
    • Constructor Detail

      • BufferAllocator

        public BufferAllocator()
    • Method Detail

      • 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.