Interface IoBufferAllocator

    • Method Detail

      • allocate

        IoBuffer allocate​(int capacity,
                          boolean direct)
        Returns the buffer which is capable of the specified size.
        Parameters:
        capacity - the capacity of the buffer
        direct - true to get a direct buffer, false to get a heap buffer.
        Returns:
        The allocated IoBuffer
      • allocateNioBuffer

        ByteBuffer allocateNioBuffer​(int capacity,
                                     boolean direct)
        Returns the NIO buffer which is capable of the specified size.
        Parameters:
        capacity - the capacity of the buffer
        direct - true to get a direct buffer, false to get a heap buffer.
        Returns:
        The allocated ByteBuffer
      • dispose

        void dispose()
        Dispose of this allocator.