Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.klavergne.process
Class SmartProcess.StreamReader  view SmartProcess.StreamReader download SmartProcess.StreamReader.java

java.lang.Object
  extended byjava.lang.Thread
      extended bycom.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 Class Summary
 
Nested classes inherited from class java.lang.Thread
java.lang.Thread.UncaughtExceptionHandler
 
Field Summary
private  java.lang.StringBuffer data
          A StringBuffer that holds the contents of the stream.
private  java.io.BufferedReader inputReader
          The Reader that this StreamReader will read from.
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
SmartProcess.StreamReader(java.io.InputStream inputStream)
          Creates a new SreamReader object using the given InputStream.
 
Method Summary
 java.lang.String flushStream()
          Returns the contents of the stream and flushes it.
 java.lang.String getStream(boolean flush)
          Returns the contents of the stream.
 void run()
          Executes the reader thread.
 
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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

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.

Constructor Detail

SmartProcess.StreamReader

public SmartProcess.StreamReader(java.io.InputStream inputStream)
Creates a new SreamReader object using the given InputStream.

Method Detail

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.