gnu.java.nio
Class VMChannel.LocalByteArray
java.lang.Object
java.lang.ThreadLocal<byte[]>
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.
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.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
INITIAL_BUFFER_SIZE
private static final int INITIAL_BUFFER_SIZE
- See Also:
- Constant Field Values
VMChannel.LocalByteArray
private VMChannel.LocalByteArray()
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