public final class HistoryBuffer
extends java.lang.Object
| Constructor and Description |
|---|
HistoryBuffer(int size)
Construct
HistoryBuffer. |
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Clear the history buffer.
|
void |
copyBlock(int dist,
int len)
Copy (repeat) a number of bytes from the history buffer.
|
int |
flush(java.nio.ByteBuffer dst)
Flush the history data to a byte buffer.
|
int |
getSize()
Get the history buffer size.
|
void |
putByte(byte b)
Put a single byte into the history buffer.
|
void |
putBytes(BitDecoder bitDecoder,
java.nio.channels.ReadableByteChannel src,
int length)
Read a number of bytes from a channel and put them into the history
buffer.
|
public HistoryBuffer(int size)
HistoryBuffer.size - The history buffer size.public int getSize()
public void clear()
public void putByte(byte b)
b - The byte to put into the history buffer.public void putBytes(BitDecoder bitDecoder, java.nio.channels.ReadableByteChannel src, int length) throws java.io.IOException
bitDecoder - The BitDecoder to use for reading the
bytes.src - The ReadableByteChannel to read the bytes from.length - The number of bytes to read and to put into the history
buffer.java.io.IOException - if an I/O error occurs.public void copyBlock(int dist,
int len)
throws java.io.IOException
dist - The distance of the history bytes to copy.len - The number of bytes to copy.java.io.IOException - if an I/O error occurs.public int flush(java.nio.ByteBuffer dst)
dst - The ByteBuffer receiving the history data.