gnu.java.nio
Class VMChannel.LocalByteArray

java.lang.Object
  extended by java.lang.ThreadLocal<byte[]>
      extended by gnu.java.nio.VMChannel.LocalByteArray
Enclosing class:
VMChannel

private static class VMChannel.LocalByteArray
extends ThreadLocal<byte[]>

A thread-local store of non-moving buffers. Used to perform IO to in cases where the actual user buffer is in a moving space.


Field Summary
private static int INITIAL_BUFFER_SIZE
           
 
Constructor Summary
private VMChannel.LocalByteArray()
           
 
Method Summary
 byte[] get(int len)
          Get a buffer, ensuring it is at least 'len' in size
protected  byte[] initialValue()
           
 
Methods inherited from class java.lang.ThreadLocal
get, remove, set
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INITIAL_BUFFER_SIZE

private static final int INITIAL_BUFFER_SIZE
See Also:
Constant Field Values
Constructor Detail

VMChannel.LocalByteArray

private VMChannel.LocalByteArray()
Method Detail

initialValue

protected byte[] initialValue()
Overrides:
initialValue in class ThreadLocal<byte[]>

get

public byte[] get(int len)
Get a buffer, ensuring it is at least 'len' in size

Parameters:
len - Minimum length of the buffer
Returns:
a new or recycled buffer