| Modifier and Type | Field and Description |
|---|---|
(package private) byte[] |
buf
The byte buffer used for reading and writing.
|
(package private) static Queue<Reference<Streams.Buffer[]>> |
queue
Each entry in this queue holds a soft reference to an array
initialized with instances of this class.
|
(package private) int |
read
The actual number of bytes read into the buffer
|
| Modifier | Constructor and Description |
|---|---|
private |
Streams.Buffer() |
| Modifier and Type | Method and Description |
|---|---|
(package private) static Streams.Buffer[] |
allocate() |
(package private) static void |
release(Streams.Buffer[] buffers) |
final byte[] buf
static final Queue<Reference<Streams.Buffer[]>> queue
The best choice would be a ConcurrentLinkedDeque where I
could call Deque.push(Object) to achieve many garbage
collector pickups of old SoftReferences further down the
stack, but this class is only available since JSE 7.
A LinkedBlockingDeque is supposedly not a good choice
because it uses locks, which I would like to abandon.
int read
IOException.static Streams.Buffer[] allocate()
static void release(Streams.Buffer[] buffers)
Copyright © 2005-2012 Schlichtherle IT Services. All Rights Reserved.