public class SimpleByteBufferAllocator extends java.lang.Object implements ByteBufferAllocator
ByteBufferAllocator which simply allocates a new
buffer every time.| 构造器和说明 |
|---|
SimpleByteBufferAllocator() |
| 限定符和类型 | 方法和说明 |
|---|---|
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. |
public ByteBuffer allocate(int capacity, boolean direct)
ByteBufferAllocatorallocate 在接口中 ByteBufferAllocatorcapacity - the capacity of the bufferdirect - true to get a direct buffer,
false to get a heap buffer.public ByteBuffer wrap(java.nio.ByteBuffer nioBuffer)
ByteBufferAllocatorByteBuffer into MINA buffer.wrap 在接口中 ByteBufferAllocatorpublic void dispose()
ByteBufferAllocatordispose 在接口中 ByteBufferAllocator