## org.biojava.utils.process
Class StreamPipe

    java.lang.Object
      org.biojava.utils.process.StreamPipe

All Implemented Interfaces:
  Runnable

Direct Known Subclasses:
  SimpleInputHandler, SimpleOutputHandler

    public class StreamPipe

extends Object
implements Runnable

A multi threaded class which pipes the contents of an input stream to an output stream.

Version:
  $Revision: 3634 $
Author:
  Martin Szugat

Constructor Summary
`StreamPipe(InputStream input, OutputStream output, String tag)` Initializes the stream pipe.

Method Summary
`InputStream` `getInput()` Gets the input stream
`OutputStream` `getOutput()` Gets the output stream.
`void` `run()`
`void` `setInput(InputStream input)` Sets the input stream
`void` `setOutput(OutputStream output)` Sets the output stream

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### StreamPipe

    public StreamPipe(InputStream input,
                      OutputStream output,
                      String tag)

  Initializes the stream pipe.

  Parameters:
    `input` - the input stream from which to read. May be `null`.
    `output` - the output stream to which to write May be `null`.
    `tag` - a tag which is used for logging the in- and output May be `null`.

Method Detail

### getInput

    public InputStream getInput()

  Gets the input stream

  Returns:
    the input from which to read. May be `null`.

### setInput

    public void setInput(InputStream input)

  Sets the input stream

  Parameters:
    `input` - the input stream from which to read. May be `null`.

### setOutput

    public void setOutput(OutputStream output)

  Sets the output stream

  Parameters:
    `output` - the output stream to which to write. May be `null`.

### getOutput

    public OutputStream getOutput()

  Gets the output stream.

  Returns:
    the output stream to which to write. May be `null`.

### run

    public void run()

  Specified by:
    `run` in interface `Runnable`