|
||||||||||
| 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.io.OutputStream out,
int m)
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 - I/O exceptionpublic PrintOutput(java.io.OutputStream out)
out - output stream reference
public PrintOutput(java.io.OutputStream out,
int m)
out - output stream referencem - maximum number of bytes to write| Method Detail |
|---|
public void write(int b)
throws java.io.IOException
write in class java.io.OutputStreamjava.io.IOException
public final void print(char ch)
throws java.io.IOException
ch - string to be written
java.io.IOException - I/O exception
public final void print(int i,
byte[] str)
throws java.io.IOException
str - string to be writteni - number of spaces to indent
java.io.IOException - I/O exception
public final void print(byte[] str,
int i)
throws java.io.IOException
str - string to be writteni - number of spaces to indent
java.io.IOException - I/O exception
public final void print(java.lang.String str)
throws java.io.IOException
str - string to be written
java.io.IOException - I/O exception
public final void println(java.lang.String str)
throws java.io.IOException
str - string to be written
java.io.IOException - I/O exception
public final void println()
throws java.io.IOException
java.io.IOException - I/O exception
public final void print(byte[] token)
throws java.io.IOException
token - token to be written
java.io.IOException - I/O exception
public final void println(byte[] token)
throws java.io.IOException
token - token to be written
java.io.IOException - I/O exceptionpublic final int size()
public void flush()
throws java.io.IOException
flush in interface java.io.Flushableflush in class java.io.OutputStreamjava.io.IOException
public void close()
throws java.io.IOException
close in interface java.io.Closeableclose in class java.io.OutputStreamjava.io.IOExceptionpublic boolean finished()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||