|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectabbot.util.ProcessOutputHandler
public class ProcessOutputHandler
Provides handling of process output/error streams.
| Nested Class Summary | |
|---|---|
static class |
ProcessOutputHandler.ProcessAbnormalExitException
|
| Constructor Summary | |
|---|---|
ProcessOutputHandler()
|
|
ProcessOutputHandler(Process p)
|
|
| Method Summary | |
|---|---|
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()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ProcessOutputHandler()
public ProcessOutputHandler(Process p)
| Method Detail |
|---|
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
InterruptedException
public static String exec(String[] command)
throws IOException
IOException
public static String exec(String[] command,
String[] environment)
throws IOException
IOException
public static String exec(String[] command,
String[] environment,
File dir)
throws IOException
IOException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||