|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.io.OutputStream
org.basex.io.PrintOutput
public class PrintOutput
This class is a stream-wrapper for textual data. Note that the internal byte representation (usually UTF8) will be directly output without further character conversion.
Constructor Summary | |
---|---|
PrintOutput(OutputStream out)
Constructor, given an output stream. |
|
PrintOutput(String fn)
Constructor, given a filename. |
Method Summary | |
---|---|
void |
close()
|
boolean |
finished()
Checks if stream can output more characters; can be overwritten to interrupt streaming at some point. |
void |
flush()
|
void |
print(byte[] token)
Writes a token to the output stream. |
void |
print(char ch)
Writes a character to the output stream. |
void |
print(String str)
Writes a string to the output stream. |
void |
println()
Writes a newline to the output stream. |
void |
println(byte[] token)
Writes a token to the output stream. |
void |
println(String str)
Writes a string and newline to the output stream. |
int |
size()
Returns the number of written bytes. |
void |
write(int b)
|
Methods inherited from class java.io.OutputStream |
---|
write, write |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PrintOutput(String fn) throws IOException
fn
- filename
IOException
- I/O exceptionpublic PrintOutput(OutputStream out)
out
- output stream referenceMethod Detail |
---|
public void write(int b) throws IOException
write
in class OutputStream
IOException
public final void print(char ch) throws IOException
ch
- string to be written
IOException
- I/O exceptionpublic final void print(String str) throws IOException
str
- string to be written
IOException
- I/O exceptionpublic final void println(String str) throws IOException
str
- string to be written
IOException
- I/O exceptionpublic final void println() throws IOException
IOException
- I/O exceptionpublic final void print(byte[] token) throws IOException
token
- token to be written
IOException
- I/O exceptionpublic final void println(byte[] token) throws IOException
token
- token to be written
IOException
- I/O exceptionpublic final int size()
public void flush() throws IOException
flush
in interface Flushable
flush
in class OutputStream
IOException
public void close() throws IOException
close
in interface Closeable
close
in class OutputStream
IOException
public boolean finished()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |