Hilbert II - Version 0.03.04

org.qedeq.kernel.utility
Class TextOutput

java.lang.Object
  extended byorg.qedeq.kernel.utility.TextOutput

public class TextOutput
extends Object

Wraps a text output stream.

Version:
$Revision: 1.3 $

Constructor Summary
TextOutput(String name, OutputStream output)
          Constructor.
TextOutput(String name, PrintStream output)
          Constructor.
 
Method Summary
 boolean checkError()
          Did any error occur during output?
 void clearLevel()
          Reset tab level to zero.
 void close()
          Close output.
 void flush()
          Close output.
 IOException getError()
          Get IO exception that occurred - if any.
 String getName()
          Get name of output file.
 void levelPrint(String text)
          Print spaces and text to output.
 void levelPrintln(String line)
          Print spaces, text and new line to output.
 void popLevel()
          Decrement tab level.
 void print(Object object)
          Print object to output.
 void print(String text)
          Print text to output.
 void println()
          Print new line to output.
 void println(Object object)
          Print object and new line to output.
 void println(String line)
          Print spaces text and new line to output.
 void pushLevel()
          Increment tab level.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TextOutput

public TextOutput(String name,
                  PrintStream output)
Constructor.

Parameters:
name - File name.
output - Write to this output.

TextOutput

public TextOutput(String name,
                  OutputStream output)
Constructor.

Parameters:
name - File name.
output - Write to this output.
Method Detail

print

public void print(String text)
Print text to output.

Parameters:
text - Append this.

levelPrint

public void levelPrint(String text)
Print spaces and text to output.

Parameters:
text - Append this.

print

public void print(Object object)
Print object to output.

Parameters:
object - Append text representation of this.

println

public final void println(String line)
Print spaces text and new line to output.

Parameters:
line - Append this.

levelPrintln

public final void levelPrintln(String line)
Print spaces, text and new line to output.

Parameters:
line - Append this.

println

public final void println(Object object)
Print object and new line to output.

Parameters:
object - Append text representation of this.

println

public final void println()
Print new line to output.


flush

public final void flush()
Close output.


close

public final void close()
Close output.


clearLevel

public final void clearLevel()
Reset tab level to zero.


popLevel

public final void popLevel()
Decrement tab level.


pushLevel

public final void pushLevel()
Increment tab level.


checkError

public final boolean checkError()
Did any error occur during output?

Returns:
Did an error occur?

getName

public final String getName()
Get name of output file.

Returns:
File name.

getError

public final IOException getError()
Get IO exception that occurred - if any.

TODO mime 20070131: use something else than PrintStream to get better error support?

Returns:
Occurred IO exception. Could be null.

Hilbert II - Version 0.03.04

©left GNU General Public Licence
All Rights Reserved.