com.steadystate.css.util
Class Output

java.lang.Object
  extended by com.steadystate.css.util.Output

public final class Output
extends Object

A simple helper to write formated to a writer.

Author:
rbri

Constructor Summary
Output(Writer aWriter, String anIndent)
          Constructor.
 
Method Summary
 Output flush()
          Flushes the output.
 Output indent()
          Indent the following.
 Output print(char aChar)
          Write the char.
 Output print(String aString)
          Write the String.
 Output println()
          Start a newline.
 Output println(String aString)
          Write the string on a new line.
 Output unindent()
          Clear the indent.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Output

public Output(Writer aWriter,
              String anIndent)
Constructor.

Parameters:
aWriter - the writer to write to
anIndent - String to be used for indenting (e.g. "", " ", " ", "\t")
Method Detail

print

public Output print(char aChar)
             throws IOException
Write the char.

Parameters:
aChar - the char to be written
Returns:
this (for convenience)
Throws:
IOException - in case of problems

print

public Output print(String aString)
             throws IOException
Write the String.

Parameters:
aString - the string to be written
Returns:
this (for convenience)
Throws:
IOException - in case of problems

println

public Output println(String aString)
               throws IOException
Write the string on a new line.

Parameters:
aString - the string to be written
Returns:
this (for convenience)
Throws:
IOException - in case of problems

println

public Output println()
               throws IOException
Start a newline.

Returns:
this (for convenience)
Throws:
IOException - in case of problems

flush

public Output flush()
             throws IOException
Flushes the output.

Returns:
this (for convenience)
Throws:
IOException - in case of error

indent

public Output indent()
Indent the following.

Returns:
this (for convenience)

unindent

public Output unindent()
Clear the indent.

Returns:
this (for convenience)


Copyright © 2013. All rights reserved.