to.etc.util
Class ProcessTools.StreamReaderThread

java.lang.Object
  extended by java.lang.Thread
      extended by to.etc.util.ProcessTools.StreamReaderThread
All Implemented Interfaces:
java.lang.Runnable
Enclosing class:
ProcessTools

public static class ProcessTools.StreamReaderThread
extends java.lang.Thread

This is used to async read strout and stderr streams from a process...


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
ProcessTools.StreamReaderThread(java.lang.Appendable sb, java.lang.String name, java.io.InputStream is)
           
ProcessTools.StreamReaderThread(java.lang.Appendable sb, java.lang.String name, java.io.InputStream is, java.lang.String encoding)
           
ProcessTools.StreamReaderThread(java.io.Writer sb, java.lang.String name, java.io.InputStream is)
           
ProcessTools.StreamReaderThread(java.io.Writer w, java.lang.String name, java.io.InputStream is, java.lang.String encoding)
           
 
Method Summary
 void run()
          Read data from the stream until it closes line by line; add each line to the output channel.
 
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

ProcessTools.StreamReaderThread

public ProcessTools.StreamReaderThread(java.lang.Appendable sb,
                                       java.lang.String name,
                                       java.io.InputStream is)

ProcessTools.StreamReaderThread

public ProcessTools.StreamReaderThread(java.lang.Appendable sb,
                                       java.lang.String name,
                                       java.io.InputStream is,
                                       java.lang.String encoding)

ProcessTools.StreamReaderThread

public ProcessTools.StreamReaderThread(java.io.Writer sb,
                                       java.lang.String name,
                                       java.io.InputStream is)

ProcessTools.StreamReaderThread

public ProcessTools.StreamReaderThread(java.io.Writer w,
                                       java.lang.String name,
                                       java.io.InputStream is,
                                       java.lang.String encoding)
Method Detail

run

public void run()
Read data from the stream until it closes line by line; add each line to the output channel.

Specified by:
run in interface java.lang.Runnable
Overrides:
run in class java.lang.Thread