Package org.openjdk.jmh.util
Class InputStreamDrainer
java.lang.Object
java.lang.Thread
org.openjdk.jmh.util.InputStreamDrainer
- All Implemented Interfaces:
Runnable
Will drain the output stream.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Thread
Thread.Builder, Thread.State, Thread.UncaughtExceptionHandler
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final int
private final InputStream
private final List
<OutputStream> Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
-
Constructor Summary
ConstructorsConstructorDescriptionCreate a drainer which will discard the read lines.InputStreamDrainer
(InputStream in, OutputStream out) Create a drainer that will echo all read lines toout
. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds an output stream to drain the output to.void
run()
Drain the stream.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
-
Field Details
-
BUF_SIZE
private static final int BUF_SIZE- See Also:
-
outs
-
in
-
-
Constructor Details
-
InputStreamDrainer
Create a drainer which will discard the read lines.- Parameters:
in
- The input stream to drain
-
InputStreamDrainer
Create a drainer that will echo all read lines toout
.- Parameters:
in
- The input stream to drainout
- Where to drain the stream into
-
-
Method Details