public class ProcessOutputHandler extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
ProcessOutputHandler.ProcessAbnormalExitException |
| Constructor and Description |
|---|
ProcessOutputHandler() |
ProcessOutputHandler(Process p) |
| Modifier and Type | Method and Description |
|---|---|
static String |
exec(String[] command)
Returns the output of the given command as a String.
|
static String |
exec(String[] command,
String[] environment)
Returns the output of the given command as a String.
|
static String |
exec(String[] command,
String[] environment,
File dir)
Returns the output of the given command as a String.
|
String |
getError() |
protected void |
handleError(byte[] buf,
int count)
Override this method to handle stderr output.
|
protected void |
handleOutput(byte[] buf,
int count)
Override this method to handle stdout output.
|
void |
setProcess(Process p) |
void |
waitFor() |
public ProcessOutputHandler()
public ProcessOutputHandler(Process p)
public String getError()
public void setProcess(Process p)
protected void handleOutput(byte[] buf,
int count)
protected void handleError(byte[] buf,
int count)
public void waitFor()
throws InterruptedException
InterruptedExceptionpublic static String exec(String[] command) throws IOException
IOExceptionpublic static String exec(String[] command, String[] environment) throws IOException
IOExceptionpublic static String exec(String[] command, String[] environment, File dir) throws IOException
IOException
Abbot is hosted on