public class StreamPumper
extends java.lang.Thread
| Modifier and Type | Class and Description |
|---|---|
static interface |
StreamPumper.LineConsumer
Provides a function to consume a line read from a stream.
|
| Constructor and Description |
|---|
StreamPumper(@NonNull java.io.InputStream stream,
@NonNull StreamPumper.LineConsumer consumer)
Creates a new pumper for the specified stream.
|
| Modifier and Type | Method and Description |
|---|---|
@NonNull StreamPumper.LineConsumer |
getConsumer()
Gets the consumer of lines read from the input stream.
|
void |
run() |
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, yieldpublic StreamPumper(@NonNull java.io.InputStream stream,
@NonNull StreamPumper.LineConsumer consumer)
stream - The input stream to read from.consumer - The consumer of lines read from the input stream.public @NonNull StreamPumper.LineConsumer getConsumer()
public void run()
run in interface java.lang.Runnablerun in class java.lang.ThreadCopyright © 2022 - present; JODConverter. All rights reserved.