Interface ByteBufferAllocator

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      ByteBuffer allocate​(int capacity, boolean direct)
      Returns the buffer which is capable of the specified size.
      void dispose()
      Dispose of this allocator.
      ByteBuffer wrap​(java.nio.ByteBuffer nioBuffer)
      Wraps the specified NIO ByteBuffer into MINA buffer.
    • Method Detail

      • allocate

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

        ByteBuffer wrap​(java.nio.ByteBuffer nioBuffer)
        Wraps the specified NIO ByteBuffer into MINA buffer.
      • dispose

        void dispose()
        Dispose of this allocator.