public class AppendableByteArrayInputStream extends ByteArrayInputStream
ByteArrayInputStream which allows to replace the byte buffer underneath.buf, count, mark, pos| 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(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.
|
available, close, mark, markSupported, reset, skipreadpublic AppendableByteArrayInputStream(byte[] buf,
int offset,
int length)
public AppendableByteArrayInputStream(byte[] buf)
public int read()
read in class ByteArrayInputStreampublic int read(byte[] b,
int off,
int len)
read in class 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(String[] args)
Copyright © 2014. All Rights Reserved.