Mp3dings 
20100427

de.mospace.lang
Class ProcessRunnable.PipeThread

java.lang.Object
  extended by java.lang.Thread
      extended by de.mospace.lang.ProcessRunnable.PipeThread
All Implemented Interfaces:
Runnable
Enclosing class:
ProcessRunnable

protected static class ProcessRunnable.PipeThread
extends Thread

A thread that writes bytes from its input to its output as long as the associated ProcessRunnable is running. All pipe threads belong to the same thread group named ProcessRunableIO.


Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
 
Field Summary
protected  ProcessRunnable.Input inp
          The input that this PipeThread reads from.
protected  ProcessRunnable.Output outp
          The output that this PipeThread writes to.
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Method Summary
 void run()
          Opens this pipe thread's input and output and writes any bytes that become available on the input to the output.
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, 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
 

Field Detail

inp

protected ProcessRunnable.Input inp
The input that this PipeThread reads from.


outp

protected ProcessRunnable.Output outp
The output that this PipeThread writes to.

Method Detail

run

public void run()
Opens this pipe thread's input and output and writes any bytes that become available on the input to the output. When it encounters an End Of File on the input or when the process runnable associated with this PipeThread stops running the close methods of input and output will be called.

Specified by:
run in interface Runnable
Overrides:
run in class Thread

Mp3dings 
20100427