public interface ByteBufferAllocator
ByteBuffer
s and manages them. Please implement this
interface if you need more advanced memory management scheme.Modifier and Type | Method and 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. |
ByteBuffer allocate(int capacity, boolean direct)
capacity
- the capacity of the bufferdirect
- true to get a direct buffer,
false to get a heap buffer.ByteBuffer wrap(java.nio.ByteBuffer nioBuffer)
ByteBuffer
into MINA buffer.void dispose()
Copyright © 2004-2019 Apache MINA Project. All Rights Reserved.