|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sourceforge.fluxion.spi.utils.ProcessRunner
public class ProcessRunner
A utility class that simplifies the process of delegating to external processes and waiting for the output. By instantiating a new ProcessRunner and sending it the command you wish to execute in the current runtime environment, calling classes will acquire a string array that contains the lines output by the native process.
Constructor Summary | |
---|---|
ProcessRunner()
|
Method Summary | |
---|---|
void |
redirectStderr(boolean redirect)
Whether or not to redirect the standard error stream of the native process to standard out. |
java.lang.String[] |
runCommmand(java.lang.String command)
Execute the string as a native system process. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ProcessRunner()
Method Detail |
---|
public void redirectStderr(boolean redirect)
redirect
- true redirects stdout to stderrpublic java.lang.String[] runCommmand(java.lang.String command) throws java.io.IOException
String[]
.
command
- The command to be executed. Should be appropriate for the
OS
java.io.IOException
- if the process exited with an error exit code, or there
was a problem executing the process
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |