org.cdlib.xtf.util
Class ProcessRunner.OutputGrabber

Object
  extended by Thread
      extended by ProcessRunner.OutputGrabber
All Implemented Interfaces:
Runnable
Enclosing class:
ProcessRunner

private static class ProcessRunner.OutputGrabber
extends Thread

Class to accumulate the output from a process's output stream (which is an InputStream to us), and turn it into a string.


Nested Class Summary
 
Nested classes/interfaces inherited from class Thread
Thread.State, Thread.UncaughtExceptionHandler
 
Field Summary
private  ByteArrayOutputStream buffer
           
 boolean done
           
 Throwable error
           
private  InputStream inStream
           
 byte[] outBytes
           
 
Fields inherited from class Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
ProcessRunner.OutputGrabber(InputStream stream)
           
 
Method Summary
 void run()
           
 
Methods inherited from class Thread
activeCount, checkAccess, clone, 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 Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

inStream

private InputStream inStream

buffer

private ByteArrayOutputStream buffer

outBytes

public byte[] outBytes

error

public Throwable error

done

public boolean done
Constructor Detail

ProcessRunner.OutputGrabber

public ProcessRunner.OutputGrabber(InputStream stream)
Method Detail

run

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