|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.mina.common.SimpleByteBufferAllocator
public class SimpleByteBufferAllocator
A simplistic ByteBufferAllocator
which simply allocates a new
buffer every time.
Constructor Summary | |
---|---|
SimpleByteBufferAllocator()
|
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SimpleByteBufferAllocator()
Method Detail |
---|
public ByteBuffer allocate(int capacity, boolean direct)
ByteBufferAllocator
allocate
in interface ByteBufferAllocator
capacity
- the capacity of the bufferdirect
- true to get a direct buffer,
false to get a heap buffer.public ByteBuffer wrap(java.nio.ByteBuffer nioBuffer)
ByteBufferAllocator
ByteBuffer
into MINA buffer.
wrap
in interface ByteBufferAllocator
public void dispose()
ByteBufferAllocator
dispose
in interface ByteBufferAllocator
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |