| Modifier and Type | Field and Description |
|---|---|
| private final byte[] | buffer
The buffer |
| private int | readIndex
Index of the next data to be read from the buffer |
| private final int | size
Size of the buffer |
| private int | writeIndex
Index of the next data written in the buffer |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | Returns: Whether a new byte can be read from the buffer.Tests whether a new byte can be read from the buffer. |
| public void | copy(final int
the distance from the current write position distance, final int the number of bytes to copy length)Copies a previous interval in the buffer to the current position. |
| public int | |
| public void |
| buffer | back to summary |
|---|---|
| private final byte[] buffer The buffer | |
| readIndex | back to summary |
|---|---|
| private int readIndex Index of the next data to be read from the buffer | |
| size | back to summary |
|---|---|
| private final int size Size of the buffer | |
| writeIndex | back to summary |
|---|---|
| private int writeIndex Index of the next data written in the buffer | |
| CircularBuffer | back to summary |
|---|---|
| pack-priv CircularBuffer(final int size) | |
| available | back to summary |
|---|---|
| public boolean available() Tests whether a new byte can be read from the buffer.
| |
| copy | back to summary |
|---|---|
| public void copy(final int distance, final int length) Copies a previous interval in the buffer to the current position.
| |
| get | back to summary |
|---|---|
| public int get() Reads a byte from the buffer.
| |
| put | back to summary |
|---|---|
| public void put(final int value) Puts a byte to the buffer.
| |