## org.biojava.utils.process
Class ReaderWriterPipe

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

All Implemented Interfaces:
  Runnable

Direct Known Subclasses:
  ReaderInputHandler, WriterOutputHandler

    public class ReaderWriterPipe

extends Object
implements Runnable

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

Version:
  $Revision: 3634 $
Author:
  Martin Szugat

Constructor Summary
`ReaderWriterPipe(Reader reader, Writer writer, String tag)` Initializes the reader writer pipe.

Method Summary
`Reader` `getReader()` Gets the reader.
`Writer` `getWriter()` Gets the writer.
`void` `run()`
`void` `setReader(Reader reader)` Sets the reader.
`void` `setWriter(Writer writer)` Sets the writer.

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

Constructor Detail

### ReaderWriterPipe

    public ReaderWriterPipe(Reader reader,
                            Writer writer,
                            String tag)

  Initializes the reader writer pipe.

  Parameters:
    `reader` - the reader from which to read. May be `null`.
    `writer` - the writer to which to write. May be `null`.
    `tag` - a tag for loggging. May be `null`.

Method Detail

### getReader

    public Reader getReader()

  Gets the reader.

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

### getWriter

    public Writer getWriter()

  Gets the writer.

  Returns:
    the writer to which to write. May be `null`.

### setReader

    public void setReader(Reader reader)

  Sets the reader.

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

### setWriter

    public void setWriter(Writer writer)

  Sets the writer.

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

### run

    public void run()

  Specified by:
    `run` in interface `Runnable`