public abstract class AbstractProcessReader
extends java.lang.Object
implements java.lang.Runnable
Process object.| Modifier and Type | Field and Description |
|---|---|
protected java.lang.Process |
m_Process
the process to read from.
|
protected boolean |
m_Stdout
whether to use stdout or stderr.
|
| Constructor and Description |
|---|
AbstractProcessReader(java.lang.Process process,
boolean stdout)
Initializes the reader.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.Process |
getProcess()
Returns the underlying
Process object. |
boolean |
isStdout()
Returns whether the reader is for stdout or stderr.
|
protected abstract void |
process(java.lang.String line)
For processing the line read from stdout/stderr.
|
void |
run()
Reads the data from the process.
|
protected java.lang.Process m_Process
protected boolean m_Stdout
public AbstractProcessReader(java.lang.Process process,
boolean stdout)
process - the process to monitorstdout - whether to read stdout or stderrpublic boolean isStdout()
public java.lang.Process getProcess()
Process object.protected abstract void process(java.lang.String line)
line - the output linepublic void run()
run in interface java.lang.RunnableCopyright © 2018 University of Waikato, Hamilton, NZ. All Rights Reserved.