public class TimedProcess extends Object implements Runnable
Constructor and Description |
---|
TimedProcess(Process p)
Class constructor.
|
TimedProcess(Process p,
boolean HANDLE_OUTPUT,
boolean SHOW_OUTPUT)
Class constructor.
|
Modifier and Type | Method and Description |
---|---|
String |
getOutput()
Get the process output (stdout and stderr).
|
static String |
handleProcessOutput(Process process,
boolean SHOW_OUTPUT)
Handle the output of a process.
|
void |
run()
The starting point for the thread that will monitor the process.
|
boolean |
waitFor(int n)
Wait a specified number of milli-seconds for a process to complete.
|
public TimedProcess(Process p)
p
- the process to monitorpublic TimedProcess(Process p, boolean HANDLE_OUTPUT, boolean SHOW_OUTPUT)
p
- the process to monitorHANDLE_OUTPUT
- true if the process output should be handledSHOW_OUTPUT
- true if the process output should be shownpublic String getOutput()
public void run()
public boolean waitFor(int n)
n
- the number of milli-seconds to wait forCopyright © 2015. All rights reserved.