public interface ByteBufferPool
Acquired buffers may be
released but they do not need to;
if they are released, they may be recycled and reused, otherwise they will be garbage
collected as usual.
|Modifier and Type||Method and Description|
ByteBuffer acquire(int size, boolean direct)
ByteBuffer of the given size.
The returned buffer may have a bigger capacity than the size being requested but it will have the limit set to the given size.
size- the size of the buffer
direct- whether the buffer must be direct or not
void release(ByteBuffer buffer)
ByteBuffer, usually obtained with
(but not necessarily), making it available for recycling and reuse.
buffer- the buffer to return
Copyright © 1995-2014 Mort Bay Consulting. All Rights Reserved.