Package de.uplanet.util
Class CScriptWrapper
- java.lang.Object
-
- de.uplanet.util.CScriptWrapper
-
@Scriptable public final class CScriptWrapper extends Object
Wrap cscript child processes. Note: this class is not thread-safe.
-
-
Constructor Summary
Constructors Constructor Description CScriptWrapper(String... p_params)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
exec()
int
exec(int p_iTimeout)
String
getStdErr()
Get the error output of the child process.String
getStdOut()
Get the standard output of the child process.
-
-
-
Constructor Detail
-
CScriptWrapper
public CScriptWrapper(String... p_params)
-
-
Method Detail
-
exec
public int exec() throws IOException, InterruptedException
- Returns:
- The exit code of the child process.
- Throws:
IOException
InterruptedException
-
exec
public int exec(int p_iTimeout) throws IOException, InterruptedException
- Parameters:
p_iTimeout
- the timeout (in seconds!).- Returns:
- The exit code of the child process.
- Throws:
IOException
InterruptedException
-
getStdOut
public String getStdOut()
Get the standard output of the child process.- Returns:
- The stdout output of the child process, or
null
if there was no such output.
-
getStdErr
public String getStdErr()
Get the error output of the child process.- Returns:
- The stderr output of the child process, or
null
if there was no such output.
-
-