org.metasyntactic.io
Class Pipe

java.lang.Object
  |
  +--java.lang.Thread
        |
        +--org.metasyntactic.io.Pipe
All Implemented Interfaces:
java.lang.Runnable

public class Pipe
extends java.lang.Thread


Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
Pipe(java.io.InputStream in, java.io.OutputStream out)
          Connects in to out and will transport all data over when Pipe.start() gets called.
Pipe(java.io.InputStream in, java.io.OutputStream out, long numBytes)
          Pipes numBytes bytes of data from in to out.
 
Method Summary
 void kill()
           
 void run()
           
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Pipe

public Pipe(java.io.InputStream in,
            java.io.OutputStream out)
     throws java.io.IOException
Connects in to out and will transport all data over when Pipe.start() gets called. The piping will occur in a separate thread and will terminate when the pipe runs out of data.


Pipe

public Pipe(java.io.InputStream in,
            java.io.OutputStream out,
            long numBytes)
     throws java.io.IOException
Pipes numBytes bytes of data from in to out.

Method Detail

run

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

kill

public void kill()