Package jodd.io
Class StreamGobbler
java.lang.Object
java.lang.Thread
jodd.io.StreamGobbler
- All Implemented Interfaces:
Runnable
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
Thread.Builder, Thread.State, Thread.UncaughtExceptionHandler -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanprotected final InputStreamprotected final Objectprotected final OutputStreamprotected final StringFields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY -
Constructor Summary
ConstructorsConstructorDescriptionStreamGobbler(InputStream is, OutputStream output) StreamGobbler(InputStream is, OutputStream output, String prefix) -
Method Summary
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, isVirtual, join, join, join, join, ofPlatform, ofVirtual, onSpinWait, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, sleep, start, startVirtualThread, stop, suspend, threadId, toString, yield