de.unkrig.commons.text
Class StreamPrinter

java.lang.Object
  extended by de.unkrig.commons.text.AbstractPrinter
      extended by de.unkrig.commons.text.StreamPrinter
All Implemented Interfaces:
Printer

public class StreamPrinter
extends AbstractPrinter

A printer that prints its messages to two OutputStreams.

See Also:
setOut(OutputStream), setErr(OutputStream)

Constructor Summary
StreamPrinter()
           
 
Method Summary
 void debug(java.lang.String message)
          Prints a debug message.
 void error(java.lang.String message)
          Prints an error condition.
 void info(java.lang.String message)
          Prints an informative ("normal") message.
 void setErr(java.io.OutputStream err)
          Sets the output stream for info(String), verbose(String) and debug(String).
 void setOut(java.io.OutputStream out)
          Sets the output stream for error(String) and warn(String).
 void verbose(java.lang.String message)
          Prints a verbose message.
 void warn(java.lang.String message)
          Prints a warning condition.
 
Methods inherited from class de.unkrig.commons.text.AbstractPrinter
debug, error, error, error, info, isDebugEnabled, isInfoEnabled, isVerboseEnabled, isWarnEnabled, verbose, warn
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StreamPrinter

public StreamPrinter()
Method Detail

setOut

public void setOut(java.io.OutputStream out)
Sets the output stream for error(String) and warn(String). The default is System.err.


setErr

public void setErr(java.io.OutputStream err)
Sets the output stream for info(String), verbose(String) and debug(String). The default is System.out.


error

public void error(@Nullable
                  java.lang.String message)
Description copied from interface: Printer
Prints an error condition.


warn

public void warn(@Nullable
                 java.lang.String message)
Description copied from interface: Printer
Prints a warning condition.


info

public void info(@Nullable
                 java.lang.String message)
Description copied from interface: Printer
Prints an informative ("normal") message.


verbose

public void verbose(@Nullable
                    java.lang.String message)
Description copied from interface: Printer
Prints a verbose message.


debug

public void debug(@Nullable
                  java.lang.String message)
Description copied from interface: Printer
Prints a debug message.