public abstract class ProcessReaderHelper extends AbstractProcessReader
Modifier and Type | Field and Description |
---|---|
protected LineNumberReader |
r
The
Reader from which the output of the process will be read. |
is, log
Constructor and Description |
---|
ProcessReaderHelper() |
Modifier and Type | Method and Description |
---|---|
protected abstract ActiveProcess |
getActiveProcess()
Override to return the
ActiveProcess . |
String |
readLine()
Returns the next line and blocks if a line is not available.
|
protected abstract void |
readProcess()
Responsible for reading the data.
|
void |
run() |
void |
start(InputStream is)
Creates a
LineNumberReader from the InputStream . |
protected LineNumberReader r
Reader
from which the output of the process will be read.public void start(InputStream is)
LineNumberReader
from the InputStream
.start
in class AbstractProcessReader
is
- The input stream from which the output of the process will
be read.protected abstract ActiveProcess getActiveProcess()
ActiveProcess
.public String readLine() throws IOException, InterruptedException
InterruptedException
IOException
- if the source is closed.InterruptedException
- if the thread has been interrupted (this is
normal during shutdown).public void run()
Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.