public class StreamPumper extends Thread
| Modifier and Type | Class and Description |
|---|---|
static interface |
StreamPumper.LineConsumer
提供一个函数来使用从流中读取的行.
|
Thread.State, Thread.UncaughtExceptionHandlerMAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY| Constructor and Description |
|---|
StreamPumper(InputStream stream,
StreamPumper.LineConsumer consumer)
为指定的流创建一个新的pumper.
|
| Modifier and Type | Method and Description |
|---|---|
StreamPumper.LineConsumer |
getConsumer()
获取从输入流读取的行的使用者.
|
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(InputStream stream, StreamPumper.LineConsumer consumer)
stream - 要从中读取的输入流.consumer - 从输入流读取行的使用者.public StreamPumper.LineConsumer getConsumer()
Copyright © 2019. All rights reserved.