|
TrueZIP Kernel 7.0-rc2 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectde.schlichtherle.truezip.socket.ByteArrayIOPool
@ThreadSafe public final class ByteArrayIOPool
A pool of byte array I/O entries.
| Nested Class Summary | |
|---|---|
class |
ByteArrayIOPool.Entry
|
| Nested classes/interfaces inherited from interface de.schlichtherle.truezip.util.Pool |
|---|
Pool.Releasable<E extends Exception> |
| Field Summary | |
|---|---|
private int |
active
|
private int |
initialCapacity
|
private static String |
MOCK_ENTRY_NAME
|
private int |
total
|
| Constructor Summary | |
|---|---|
ByteArrayIOPool()
Equivalent to new ByteArrayIOPool(32). |
|
ByteArrayIOPool(int initialCapacity)
Constructs a new byte array I/O pool. |
|
| Method Summary | |
|---|---|
ByteArrayIOPool.Entry |
allocate()
Allocates a resource from this pool. |
int |
getSize()
Returns the number of I/O entries allocated but not yet released from this pool. |
void |
release(IOPool.Entry<ByteArrayIOEntry> entry)
Releases a previously allocated resource to this pool. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private static final String MOCK_ENTRY_NAME
private final int initialCapacity
private volatile int total
private volatile int active
| Constructor Detail |
|---|
public ByteArrayIOPool()
new ByteArrayIOPool(32).
public ByteArrayIOPool(int initialCapacity)
initialCapacity - the initial capacity of the array to use for
writing to an allocated I/O entry.| Method Detail |
|---|
public ByteArrayIOPool.Entry allocate()
Pool
allocate in interface Pool<IOPool.Entry<ByteArrayIOEntry>,IOException>
public void release(IOPool.Entry<ByteArrayIOEntry> entry)
throws IOException
PoolIllegalArgumentException or an
IllegalStateException upon the conditions explained below.
release in interface Pool<IOPool.Entry<ByteArrayIOEntry>,IOException>entry - a resource.
IOExceptionpublic int getSize()
|
TrueZIP Kernel 7.0-rc2 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||