public class StreamGobbler
extends java.lang.Thread
implements java.io.Closeable
Constructor and Description |
---|
StreamGobbler(java.io.InputStream stream,
java.io.OutputStream out,
org.slf4j.Logger log) |
StreamGobbler(java.io.InputStream stream,
java.io.PrintStream out,
org.slf4j.Logger log) |
Modifier and Type | Method and Description |
---|---|
void |
blockUntilFinished()
convenience -- equivalent to calling join()
|
void |
close() |
boolean |
isFinished()
convenience -- similar to !Thread.isAlive()
|
void |
onChar(int c) |
void |
onClose() |
void |
onLine(java.lang.String line) |
void |
run() |
StreamGobbler |
setLogPrefix(java.lang.String prefix) |
StreamGobbler |
setPrefix(java.lang.String prefix) |
StreamGobbler |
setPrintPrefix(java.lang.String prefix) |
void |
shutdown()
Deprecated.
|
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
public StreamGobbler(java.io.InputStream stream, java.io.OutputStream out, org.slf4j.Logger log)
public StreamGobbler(java.io.InputStream stream, java.io.PrintStream out, org.slf4j.Logger log)
public void close()
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
@Deprecated public void shutdown()
public StreamGobbler setPrefix(java.lang.String prefix)
public StreamGobbler setPrintPrefix(java.lang.String prefix)
public StreamGobbler setLogPrefix(java.lang.String prefix)
public void run()
run
in interface java.lang.Runnable
run
in class java.lang.Thread
public void onChar(int c)
public void onLine(java.lang.String line)
public void onClose()
public void blockUntilFinished() throws java.lang.InterruptedException
java.lang.InterruptedException
public boolean isFinished()