Package org.biojava.utils.process
Class StreamPipe
java.lang.Object
org.biojava.utils.process.StreamPipe
- All Implemented Interfaces:
Runnable
- Direct Known Subclasses:
SimpleInputHandler,SimpleOutputHandler
A multi threaded class
which pipes the contents of an input stream to an output stream.
- Version:
- $Revision$
- Author:
- Martin Szugat
-
Constructor Summary
ConstructorsConstructorDescriptionStreamPipe(InputStream input, OutputStream output, String tag) Initializes the stream pipe. -
Method Summary
Modifier and TypeMethodDescriptiongetInput()Gets the input streamGets the output stream.voidrun()voidsetInput(InputStream input) Sets the input streamvoidsetOutput(OutputStream output) Sets the output stream
-
Constructor Details
-
StreamPipe
Initializes the stream pipe.- Parameters:
input- the input stream from which to read. May benull.output- the output stream to which to write May benull.tag- a tag which is used for logging the in- and output May benull.
-
-
Method Details
-
getInput
Gets the input stream- Returns:
- the input from which to read. May be
null.
-
setInput
Sets the input stream- Parameters:
input- the input stream from which to read. May benull.
-
setOutput
Sets the output stream- Parameters:
output- the output stream to which to write. May benull.
-
getOutput
Gets the output stream.- Returns:
- the output stream to which to write. May be
null.
-
run
-