|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectproper.io.Shell
public class Shell
This class is a wrapper around a Process-Instance and makes it easy to get the last command and its error or execption or output.
Constructor Summary | |
---|---|
Shell()
initializes |
|
Shell(java.lang.String cmd)
executes the given command |
|
Shell(java.lang.String cmd,
boolean wait)
executes the given command |
Method Summary | |
---|---|
int |
execute(java.lang.String cmd)
executes the given command |
int |
execute(java.lang.String cmd,
boolean wait)
executes the given command |
java.lang.String |
lastCommand()
returns the last executed command |
java.lang.Exception |
lastException()
returns the Exception (if any exists) from the last execute |
java.lang.String |
lastStderr()
returns the output on error out from the last execute |
java.lang.String |
lastStdout()
returns the output on standard out of the last execute |
static void |
main(java.lang.String[] args)
for testing purposes only |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Shell()
public Shell(java.lang.String cmd)
cmd
- the command to executepublic Shell(java.lang.String cmd, boolean wait)
cmd
- the command to executewait
- whether to wait or notMethod Detail |
---|
public int execute(java.lang.String cmd)
cmd
- the command to execute
public int execute(java.lang.String cmd, boolean wait)
cmd
- the command to executewait
- wait for process to finish
public java.lang.String lastStdout()
public java.lang.String lastStderr()
public java.lang.String lastCommand()
public java.lang.Exception lastException()
public static void main(java.lang.String[] args)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |