public class FixedSizeByteArrayOutputStream extends ByteArrayOutputStream
A ByteArrayOutputStream with a limited capacity.
If the data about to be written does not fit the remaining capacity an IllegalStateException will be thrown
buf, count| Constructor and Description |
|---|
FixedSizeByteArrayOutputStream(int maxSize)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
reset() |
void |
write(byte[] b,
int off,
int len) |
void |
write(int b) |
close, size, toByteArray, toString, toString, toString, writeToflush, writepublic FixedSizeByteArrayOutputStream(int maxSize)
Constructor.
maxSize - The max size in bytes.public void write(int b)
write in class ByteArrayOutputStreampublic void write(byte[] b,
int off,
int len)
write in class ByteArrayOutputStreampublic void reset()
reset in class ByteArrayOutputStreamCopyright © 2017. All rights reserved.