Package org.biojava.utils.process
Class StreamPipe
- java.lang.Object
-
- org.biojava.utils.process.StreamPipe
-
- All Implemented Interfaces:
java.lang.Runnable
- Direct Known Subclasses:
SimpleInputHandler,SimpleOutputHandler
public class StreamPipe extends java.lang.Object implements java.lang.RunnableA multi threaded class which pipes the contents of an input stream to an output stream.- Version:
- $Revision: 3634 $
- Author:
- Martin Szugat
-
-
Constructor Summary
Constructors Constructor Description StreamPipe(java.io.InputStream input, java.io.OutputStream output, java.lang.String tag)Initializes the stream pipe.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.io.InputStreamgetInput()Gets the input streamjava.io.OutputStreamgetOutput()Gets the output stream.voidrun()voidsetInput(java.io.InputStream input)Sets the input streamvoidsetOutput(java.io.OutputStream output)Sets the output stream
-
-
-
Constructor Detail
-
StreamPipe
public StreamPipe(java.io.InputStream input, java.io.OutputStream output, java.lang.String tag)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 Detail
-
getInput
public java.io.InputStream getInput()
Gets the input stream- Returns:
- the input from which to read. May be
null.
-
setInput
public void setInput(java.io.InputStream input)
Sets the input stream- Parameters:
input- the input stream from which to read. May benull.
-
setOutput
public void setOutput(java.io.OutputStream output)
Sets the output stream- Parameters:
output- the output stream to which to write. May benull.
-
getOutput
public java.io.OutputStream getOutput()
Gets the output stream.- Returns:
- the output stream to which to write. May be
null.
-
run
public void run()
- Specified by:
runin interfacejava.lang.Runnable
-
-