public class ProcessOutputHandler
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
ProcessOutputHandler.ProcessAbnormalExitException |
Constructor and Description |
---|
ProcessOutputHandler() |
ProcessOutputHandler(java.lang.Process p) |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
exec(java.lang.String[] command)
Returns the output of the given command as a String.
|
static java.lang.String |
exec(java.lang.String[] command,
java.lang.String[] environment)
Returns the output of the given command as a String.
|
static java.lang.String |
exec(java.lang.String[] command,
java.lang.String[] environment,
java.io.File dir)
Returns the output of the given command as a String.
|
java.lang.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(java.lang.Process p) |
void |
waitFor() |
public ProcessOutputHandler()
public ProcessOutputHandler(java.lang.Process p)
public java.lang.String getError()
public void setProcess(java.lang.Process p)
protected void handleOutput(byte[] buf, int count)
protected void handleError(byte[] buf, int count)
public void waitFor() throws java.lang.InterruptedException
java.lang.InterruptedException
public static java.lang.String exec(java.lang.String[] command) throws java.io.IOException
java.io.IOException
public static java.lang.String exec(java.lang.String[] command, java.lang.String[] environment) throws java.io.IOException
java.io.IOException
public static java.lang.String exec(java.lang.String[] command, java.lang.String[] environment, java.io.File dir) throws java.io.IOException
java.io.IOException
Abbot is hosted on