JTools

org.jtools.io.psoutput
Class SimplePrintStream

java.lang.Object
  extended by org.jtools.io.psoutput.SimplePrintStream
All Implemented Interfaces:
PrintStreamOutput

public class SimplePrintStream
extends Object
implements PrintStreamOutput

trivial implementation of PrintStreamOutput, just wrapping a PrintStream.


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.jtools.io.psoutput.PrintStreamOutput
PrintStreamOutput.Result
 
Constructor Summary
SimplePrintStream(PrintStream printStream)
           
 
Method Summary
 PrintStreamOutput.Result execute()
          executes operations after all content is written to the printstream.
 String getOutputFilename(String defaultName)
          get the OutputFilename if available or defaultName if not.
 PrintStream getPrintStream()
          get the PrintStream to write to.
 void setCmpFilename(String filename)
          set the filename to compare with.
 void setFilename(String filename)
          set the filename.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimplePrintStream

public SimplePrintStream(PrintStream printStream)
Method Detail

execute

public PrintStreamOutput.Result execute()
                                 throws IOException
Description copied from interface: PrintStreamOutput
executes operations after all content is written to the printstream.

Specified by:
execute in interface PrintStreamOutput
Throws:
IOException

getOutputFilename

public String getOutputFilename(String defaultName)
Description copied from interface: PrintStreamOutput
get the OutputFilename if available or defaultName if not.

Specified by:
getOutputFilename in interface PrintStreamOutput

getPrintStream

public PrintStream getPrintStream()
                           throws IOException
Description copied from interface: PrintStreamOutput
get the PrintStream to write to.

Specified by:
getPrintStream in interface PrintStreamOutput
Throws:
IOException

setCmpFilename

public void setCmpFilename(String filename)
Description copied from interface: PrintStreamOutput
set the filename to compare with.

Specified by:
setCmpFilename in interface PrintStreamOutput

setFilename

public void setFilename(String filename)
Description copied from interface: PrintStreamOutput
set the filename.

Specified by:
setFilename in interface PrintStreamOutput

JTools

© 2000-2006, JTools.org.