public final class ArrayOutput extends PrintOutput
ByteArrayOutputStream class. Bytes that exceed an
optional maximum are ignored.| Constructor and Description |
|---|
ArrayOutput() |
| Modifier and Type | Method and Description |
|---|---|
byte[] |
buffer()
Returns the internal buffer.
|
boolean |
finished()
Checks if stream can output more characters; can be overwritten to
interrupt streaming at some point.
|
ArrayOutput |
max(int m)
Sets the maximum number of bytes to be written.
|
void |
reset()
Resets the internal buffer.
|
byte[] |
toArray()
Returns the output as byte array.
|
java.lang.String |
toString() |
void |
write(int b) |
public ArrayOutput max(int m)
m - maximumpublic void write(int b)
write in class PrintOutputpublic byte[] toArray()
public boolean finished()
PrintOutputfinished in class PrintOutputpublic byte[] buffer()
public void reset()
public java.lang.String toString()
toString in class java.lang.Object