org.biojava.utils.process
Class WriterOutputHandler

java.lang.Object
  extended by org.biojava.utils.process.ReaderWriterPipe
      extended by org.biojava.utils.process.WriterOutputHandler
All Implemented Interfaces:
java.lang.Runnable, OutputHandler

public class WriterOutputHandler
extends ReaderWriterPipe
implements OutputHandler

Simple output handler that writes the output of an external process to an writer.

Version:
$Revision: 3634 $
Author:
Martin Szugat

Constructor Summary
WriterOutputHandler(java.io.Writer writer, java.lang.String tag)
          Initializes the writer output handler.
 
Method Summary
 java.io.InputStream getInput()
          Gets the input stream.
 void setInput(java.io.InputStream input)
          Sets the input stream.
 
Methods inherited from class org.biojava.utils.process.ReaderWriterPipe
getReader, getWriter, run, setReader, setWriter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.lang.Runnable
run
 

Constructor Detail

WriterOutputHandler

public WriterOutputHandler(java.io.Writer writer,
                           java.lang.String tag)
Initializes the writer output handler.

Parameters:
writer - the writer to which to write the output of the external process. May be null.
tag - a tag for logging. May be null.
Method Detail

setInput

public void setInput(java.io.InputStream input)
Sets the input stream. The output of the external process is written to this input stream.

Specified by:
setInput in interface OutputHandler
Parameters:
input - the input stream. May be null.

getInput

public java.io.InputStream getInput()
Gets the input stream. The output of the external process is written to this input stream.

Specified by:
getInput in interface OutputHandler
Returns:
the input stream. May be null.