|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.io.OutputStream
org.basex.io.out.PrintOutput
org.basex.io.out.ArrayOutput
public final class ArrayOutput
This class caches the output bytes in an array, similar to the
ByteArrayOutputStream
class. Bytes that exceed an
optional maximum are ignored.
Constructor Summary | |
---|---|
ArrayOutput()
|
Method Summary | |
---|---|
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)
|
Methods inherited from class org.basex.io.out.PrintOutput |
---|
close, flush, get, print, print, println, println, size, utf8, writeString |
Methods inherited from class java.io.OutputStream |
---|
write, write |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ArrayOutput()
Method Detail |
---|
public ArrayOutput max(int m)
m
- maximum
public void write(int b)
write
in class PrintOutput
public byte[] toArray()
public boolean finished()
PrintOutput
finished
in class PrintOutput
public byte[] buffer()
public void reset()
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |