예제 #1
0
 /**
  * Release a buffer and make it available for reuse.
  *
  * @param buffer buffer to release
  */
 public static final void release(final ByteBuffer buffer) {
   BYTE_BUFFER_CACHE.release(buffer);
 }
예제 #2
0
 /**
  * Allocate a new buffer
  *
  * @param capacity
  * @return the new allocated or reused buffer. May not be filled with 0.
  */
 public static final ByteBuffer allocate(final int capacity) {
   return BYTE_BUFFER_CACHE.allocate(capacity);
 }