Block is acquired by a caller via
BlockAllocator#allocateBlock() and released by close().
This class and its implementations are not thread-safe.
| Modifier and Type | Field and Description |
|---|---|
| public final byte[] | data
The data backing this block. |
| public int | limit
The first index for which data has not been written to or read from. |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public final int | |
| public abstract void | close()
Redeclares java. Releases the block back to the |
| public final int | |
| public final void |
| data | back to summary |
|---|---|
| public final byte[] data The data backing this block. | |
| limit | back to summary |
|---|---|
| public int limit The first index for which data has not been written to or read from. | |
| Block | back to summary |
|---|---|
| pack-priv Block(final byte[] data) | |
| capacity | back to summary |
|---|---|
| public final int capacity() Returns the underlying data array's capacity. | |
| close | back to summary |
|---|---|
| public abstract void close() Redeclares java. Releases the block back to the | |
| remaining | back to summary |
|---|---|
| public final int remaining() Returns the unused amount of bytes from the limit to the capacity of the data array. | |
| reset | back to summary |
|---|---|
| public final void reset() Resets the limit to zero. | |