public class AppendableByteArrayInputStream
extends java.io.ByteArrayInputStream
ByteArrayInputStream which allows to replace the byte buffer underneath.| Constructor and Description |
|---|
AppendableByteArrayInputStream(byte[] buf) |
AppendableByteArrayInputStream(byte[] buf,
int offset,
int length) |
| Modifier and Type | Method and Description |
|---|---|
void |
appendBuffer(byte[] buf,
int offset,
int length,
boolean discard)
Appends new data to the buffer.
|
static void |
main(java.lang.String[] args) |
int |
read() |
int |
read(byte[] b,
int off,
int len) |
void |
setBuffer(byte[] buf,
int offset,
int length)
Sets the buffer and resets the stream.
|
public AppendableByteArrayInputStream(byte[] buf,
int offset,
int length)
public AppendableByteArrayInputStream(byte[] buf)
public int read()
read in class java.io.ByteArrayInputStreampublic int read(byte[] b,
int off,
int len)
read in class java.io.ByteArrayInputStreampublic void appendBuffer(byte[] buf,
int offset,
int length,
boolean discard)
buf - Data.offset - Offset in the data.length - Length of the data.discard - True if data which has already been read can be discarded.public void setBuffer(byte[] buf,
int offset,
int length)
buf - Data.offset - Offset in the data.length - Length of the data.public static void main(java.lang.String[] args)