shell
Class Pipe

java.lang.Object
  |
  +--shell.Pipe
All Implemented Interfaces:
java.lang.Runnable

public class Pipe
extends java.lang.Object
implements java.lang.Runnable

This is a base class that all pipes written for freelance have to extend. It provides input and output functionality that child classes don't have to worry about.

See Also:
ProcessController

Field Summary
 java.io.BufferedInputStream bis
          Buffer for the user defined InputStream.
 java.lang.StringBuffer buffer
           
 java.io.OutputStream os
          User defined OutputStream which can be set in the constructor, or using setPipeIn(InputStream inStream).
 java.io.PipedInputStream pipeIn
           
 ShellCommand rcIn
          The RuntimeCommand which the output is to be piped from.
 ShellCommand rcOut
          The RuntimeCommand which the input is to be piped into.
 
Constructor Summary
Pipe(ShellCommand rc1, ShellCommand rc2)
          Creates the pipe, setting the is variable to the InputStream parameter, which is then piped into variable bis.
 
Method Summary
 void run()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

bis

public java.io.BufferedInputStream bis
Buffer for the user defined InputStream.


os

public java.io.OutputStream os
User defined OutputStream which can be set in the constructor, or using setPipeIn(InputStream inStream).


rcOut

public ShellCommand rcOut
The RuntimeCommand which the input is to be piped into.


rcIn

public ShellCommand rcIn
The RuntimeCommand which the output is to be piped from.


pipeIn

public java.io.PipedInputStream pipeIn

buffer

public java.lang.StringBuffer buffer
Constructor Detail

Pipe

public Pipe(ShellCommand rc1,
            ShellCommand rc2)
     throws java.io.IOException
Creates the pipe, setting the is variable to the InputStream parameter, which is then piped into variable bis. The RuntimeCommand parameter is the command in which the input is to be piped to.

Parameters:
rc1 - - RuntimeCommand from which the output is piped.
rc2 - - RuntimeCommand which the output is piped into.
Method Detail

run

public void run()
Specified by:
run in interface java.lang.Runnable