juju.reattore.io.impl
Class ByteBufferPool

java.lang.Object
  |
  +--juju.reattore.io.impl.ByteBufferPool

public class ByteBufferPool
extends java.lang.Object

A pool for a set of ByteBuffers. Primitive.


Constructor Summary
ByteBufferPool()
           
 
Method Summary
static java.nio.ByteBuffer allocate(int minSize)
          Allocate a buffer of at least minSize in size.
static void release(java.nio.ByteBuffer bb)
          Return a buffer to the pool.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ByteBufferPool

public ByteBufferPool()
Method Detail

allocate

public static java.nio.ByteBuffer allocate(int minSize)
Allocate a buffer of at least minSize in size.

Parameters:
minSize - The minimum capacity of the buffer.
Returns:
A new, usable buffer.

release

public static void release(java.nio.ByteBuffer bb)
Return a buffer to the pool.

Parameters:
bb - The buffer to return.


Copyright © 2002-2003 Michael Hope. All Rights Reserved.