us.zuercher.gpx2map.util
Class PrintStreamMessageSink

java.lang.Object
  extended by us.zuercher.gpx2map.util.MessageSink
      extended by us.zuercher.gpx2map.util.PrintStreamMessageSink

public class PrintStreamMessageSink
extends MessageSink

PrintStreamMessageSink extends MessageSink to send all messages to a PrintStream.

Author:
Stephan Zuercher

Field Summary
private  PrintStream out
          The PrintStream to be used for all output.
 
Constructor Summary
PrintStreamMessageSink()
          Consructs a PrintStreamMessageSink that sends all output to System.out.
PrintStreamMessageSink(PrintStream out)
          Consructs a PrintStreamMessageSink that sends all output to the given PrintStream.
 
Method Summary
 void newLine()
          Writes a new-line to the configured PrintStream.
 void write(String message)
          Writes the message to the configured PrintStream.
 
Methods inherited from class us.zuercher.gpx2map.util.MessageSink
write, write, write, write, write, writeLine, writeLine, writeLine, writeLine, writeLine, writeLine, writeLine
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

out

private final PrintStream out
The PrintStream to be used for all output.

Constructor Detail

PrintStreamMessageSink

public PrintStreamMessageSink()
Consructs a PrintStreamMessageSink that sends all output to System.out.


PrintStreamMessageSink

public PrintStreamMessageSink(PrintStream out)
Consructs a PrintStreamMessageSink that sends all output to the given PrintStream.

Parameters:
out - output PrintStream
Method Detail

write

public void write(String message)
Writes the message to the configured PrintStream.

Specified by:
write in class MessageSink
Parameters:
message - the message to output
See Also:
MessageSink.write(String)

newLine

public void newLine()
Writes a new-line to the configured PrintStream.

Specified by:
newLine in class MessageSink
See Also:
MessageSink.newLine()