Package org.fife.rsta.ac.js
Class JsHinter.StreamReaderThread
- java.lang.Object
-
- java.lang.Thread
-
- org.fife.rsta.ac.js.JsHinter.StreamReaderThread
-
- All Implemented Interfaces:
java.lang.Runnable
- Enclosing class:
- JsHinter
static class JsHinter.StreamReaderThread extends java.lang.ThreadA thread dedicated to reading either the stdout or stderr stream of an external process. These streams are read in a dedicated thread to ensure they are consumed appropriately to prevent deadlock. This idea was taken from this JavaWorld article.
-
-
Constructor Summary
Constructors Constructor Description StreamReaderThread(java.io.InputStream in)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetStreamOutput()Returns the output read from the stream.voidrun()Continually reads from the output stream until this thread is interrupted.-
Methods inherited from class java.lang.Thread
activeCount, checkAccess, clone, countStackFrames, currentThread, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, onSpinWait, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, suspend, toString, yield
-
-
-
-
Method Detail
-
getStreamOutput
public java.lang.String getStreamOutput()
Returns the output read from the stream.- Returns:
- The stream's output, as a
String.
-
run
public void run()
Continually reads from the output stream until this thread is interrupted.- Specified by:
runin interfacejava.lang.Runnable- Overrides:
runin classjava.lang.Thread
-
-