com.sun.electric.tool.user
Class Exec.ExecProcessReader

java.lang.Object
  extended by java.lang.Thread
      extended by com.sun.electric.tool.user.Exec.ExecProcessReader
All Implemented Interfaces:
java.lang.Runnable
Enclosing class:
Exec

public static class Exec.ExecProcessReader
extends java.lang.Thread

This class is used to read data from an external process. If something does not consume the data, it will fill up the default buffer and deadlock. This class also redirects data read from the process (the process' output) to another stream, if specified.


Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
 
Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
Exec.ExecProcessReader(java.io.InputStream in)
          Create a stream reader that will read from the stream
Exec.ExecProcessReader(java.io.InputStream in, java.io.OutputStream redirect)
          Create a stream reader that will read from the stream, and store the read text into buffer.
 
Method Summary
 void run()
           
 
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
 

Constructor Detail

Exec.ExecProcessReader

public Exec.ExecProcessReader(java.io.InputStream in)
Create a stream reader that will read from the stream

Parameters:
in - the input stream

Exec.ExecProcessReader

public Exec.ExecProcessReader(java.io.InputStream in,
                              java.io.OutputStream redirect)
Create a stream reader that will read from the stream, and store the read text into buffer.

Parameters:
in - the input stream
redirect - read text is redirected to this
Method Detail

run

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