|
||||||||||
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(java.io.OutputStream out)
Constructor, given an output stream. |
|
PrintOutput(java.lang.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(byte[] str,
int i)
Writes a string to the output stream. |
void |
print(char ch)
Writes a character to the output stream. |
void |
print(int i,
byte[] str)
Writes a string to the output stream. |
void |
print(java.lang.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(java.lang.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(java.lang.String fn) throws java.io.IOException
fn
- filename
java.io.IOException
- in case of write errorspublic PrintOutput(java.io.OutputStream out)
out
- the OutputStream to operate onMethod Detail |
---|
public void write(int b) throws java.io.IOException
write
in class java.io.OutputStream
java.io.IOException
public final void print(char ch) throws java.io.IOException
ch
- string to be written
java.io.IOException
- in case of write errorspublic final void print(int i, byte[] str) throws java.io.IOException
str
- string to be writteni
- number of spaces to indent
java.io.IOException
- in case of write errorspublic final void print(byte[] str, int i) throws java.io.IOException
str
- string to be writteni
- number of spaces to indent
java.io.IOException
- in case of write errorspublic final void print(java.lang.String str) throws java.io.IOException
str
- string to be written
java.io.IOException
- in case of write errorspublic final void println(java.lang.String str) throws java.io.IOException
str
- string to be written
java.io.IOException
- in case of write errorspublic final void println() throws java.io.IOException
java.io.IOException
- in case of write errorspublic final void print(byte[] token) throws java.io.IOException
token
- token to be written
java.io.IOException
- in case of write errorspublic final void println(byte[] token) throws java.io.IOException
token
- token to be written
java.io.IOException
- in case of write errorspublic final int size()
public void flush() throws java.io.IOException
flush
in interface java.io.Flushable
flush
in class java.io.OutputStream
java.io.IOException
public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in class java.io.OutputStream
java.io.IOException
public boolean finished()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |