|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.mina.core.buffer.SimpleBufferAllocator
public class SimpleBufferAllocator
A simplistic IoBufferAllocator which simply allocates a new
buffer every time.
| Constructor Summary | |
|---|---|
SimpleBufferAllocator()
|
|
| Method Summary | |
|---|---|
IoBuffer |
allocate(int capacity,
boolean direct)
Returns the buffer which is capable of the specified size. |
ByteBuffer |
allocateNioBuffer(int capacity,
boolean direct)
Returns the NIO buffer which is capable of the specified size. |
void |
dispose()
Dispose of this allocator. |
IoBuffer |
wrap(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 SimpleBufferAllocator()
| Method Detail |
|---|
public IoBuffer allocate(int capacity,
boolean direct)
IoBufferAllocator
allocate in interface IoBufferAllocatorcapacity - the capacity of the bufferdirect - true to get a direct buffer,
false to get a heap buffer.
public ByteBuffer allocateNioBuffer(int capacity,
boolean direct)
IoBufferAllocator
allocateNioBuffer in interface IoBufferAllocatorcapacity - the capacity of the bufferdirect - true to get a direct buffer,
false to get a heap buffer.public IoBuffer wrap(ByteBuffer nioBuffer)
IoBufferAllocatorByteBuffer into MINA buffer.
wrap in interface IoBufferAllocatorpublic void dispose()
IoBufferAllocator
dispose in interface IoBufferAllocator
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||