org.apache.mina.common
Class SimpleByteBufferAllocator
java.lang.Objectorg.apache.mina.common.SimpleByteBufferAllocator
- ByteBufferAllocator
public class SimpleByteBufferAllocator
extends java.lang.Object
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
java.nio.ByteBuffer into MINA buffer.
|
SimpleByteBufferAllocator
public SimpleByteBufferAllocator()
allocate
public ByteBuffer allocate(int capacity,
boolean direct) Returns the buffer which is capable of the specified size.
- allocate in interface ByteBufferAllocator
capacity - the capacity of the bufferdirect - true to get a direct buffer,
false to get a heap buffer.