java.lang.Object
java.lang.Thread
com.klavergne.process.SmartProcess.StreamReader
- All Implemented Interfaces:
- java.lang.Runnable
- Enclosing class:
- SmartProcess
- private class SmartProcess.StreamReader
- extends java.lang.Thread
This class handles reading the standard out and standard error streams.
| Nested classes inherited from class java.lang.Thread |
java.lang.Thread.UncaughtExceptionHandler |
| Methods inherited from class java.lang.Thread |
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, 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 |
inputReader
private java.io.BufferedReader inputReader
- The Reader that this StreamReader will read from.
data
private java.lang.StringBuffer data
- A StringBuffer that holds the contents of the stream.
SmartProcess.StreamReader
public SmartProcess.StreamReader(java.io.InputStream inputStream)
- Creates a new SreamReader object using the given InputStream.
getStream
public java.lang.String getStream(boolean flush)
- Returns the contents of the stream.
run
public void run()
- Executes the reader thread.
flushStream
public java.lang.String flushStream()
- Returns the contents of the stream and flushes it.