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 intexec()intexec(int p_iTimeout)StringgetStdErr()Get the error output of the child process.StringgetStdOut()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:
IOExceptionInterruptedException
-
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:
IOExceptionInterruptedException
-
getStdOut
public String getStdOut()
Get the standard output of the child process.- Returns:
- The stdout output of the child process, or
nullif 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
nullif there was no such output.
-
-