|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.lang.Thread
jodd.io.StreamGobbler
public class StreamGobbler
Consumes a stream.
For any Process, the input and error streams must read even
if the data written to these streams is not used by the application.
The generally accepted solution for this problem is a stream gobbler thread
that does nothing but consume data from an input stream until stopped.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class java.lang.Thread |
|---|
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler |
| Field Summary | |
|---|---|
protected java.io.InputStream |
is
|
protected java.io.OutputStream |
os
|
protected java.lang.String |
type
|
| Fields inherited from class java.lang.Thread |
|---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
| Constructor Summary | |
|---|---|
StreamGobbler(java.io.InputStream is)
|
|
StreamGobbler(java.io.InputStream is,
java.io.OutputStream output)
|
|
StreamGobbler(java.io.InputStream is,
java.lang.String type)
|
|
StreamGobbler(java.io.InputStream is,
java.lang.String type,
java.io.OutputStream output)
|
|
| Method Summary | |
|---|---|
void |
run()
|
| 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 |
| Field Detail |
|---|
protected final java.io.InputStream is
protected final java.lang.String type
protected final java.io.OutputStream os
| Constructor Detail |
|---|
public StreamGobbler(java.io.InputStream is,
java.lang.String type)
public StreamGobbler(java.io.InputStream is)
public StreamGobbler(java.io.InputStream is,
java.io.OutputStream output)
public StreamGobbler(java.io.InputStream is,
java.lang.String type,
java.io.OutputStream output)
| Method Detail |
|---|
public void run()
run in interface java.lang.Runnablerun in class java.lang.Thread
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||