Thread.State, Thread.UncaughtExceptionHandler
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
Constructor and Description |
---|
InputStreamDrainer(InputStream in)
Create a drainer which will discard the read lines.
|
InputStreamDrainer(InputStream in,
OutputStream out)
Create a drainer that will echo all read lines to
out . |
Modifier and Type | Method and Description |
---|---|
void |
addOutputStream(OutputStream out)
Adds an output stream to drain the output to.
|
void |
run()
Drain the stream.
|
activeCount, checkAccess, clone, 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 InputStreamDrainer(InputStream in)
in
- The input stream to drainpublic InputStreamDrainer(InputStream in, OutputStream out)
out
.in
- The input stream to drainout
- Where to drain the stream intopublic void addOutputStream(OutputStream out)
out
- The output streamCopyright © 2012–2020 Oracle. All rights reserved.