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 Details

    • CScriptWrapper

      public CScriptWrapper(String... p_params)
  • Method Details

    • 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.