|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectbe.destin.util.RunCommand
public class RunCommand
Allows to run synchronously external programs or operating system commands scripts, providing an input (as a string) and receiving output and errors (also as strings). Has been proven rather robust: execution of GraphWiz, batch files with FTP transfer...
| Constructor Summary | |
|---|---|
RunCommand(java.lang.String directory,
java.lang.String[] commandSegments,
java.lang.String[] envp)
Prepares a command line to be executed. |
|
| Method Summary | |
|---|---|
static void |
closeAble(java.io.Closeable toClose,
java.lang.String mess)
|
java.lang.String |
getErrors()
System.err() from executed command. |
int |
getExitValue()
Exit code. |
java.lang.String |
getInput()
|
java.lang.String |
getOutput()
System.out() from executed command. |
long |
getSequence()
sequence: rank of the last execution. |
void |
run()
Execute the command line and wait for its completion. |
void |
setExitValue(int exitValue)
No foreseen use. |
void |
setInput(java.lang.String input)
Input for executed command. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RunCommand(java.lang.String directory,
java.lang.String[] commandSegments,
java.lang.String[] envp)
directory - Default directory when executingcommandSegments - Individual segments of the command line to be executed.envp - Environment variables (Each string in the format KEY=VALUE)| Method Detail |
|---|
public static void closeAble(java.io.Closeable toClose,
java.lang.String mess)
public void run()
run in interface java.lang.RunnableRunnable.run()public long getSequence()
public java.lang.String getErrors()
public java.lang.String getOutput()
public java.lang.String getInput()
public void setInput(java.lang.String input)
input - String provided as the stdin: for the command to be executedpublic int getExitValue()
public void setExitValue(int exitValue)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||