de.uplanet.util
Class CScriptWrapper

java.lang.Object
  extended by de.uplanet.util.CScriptWrapper

@Scriptable
public final class CScriptWrapper
extends java.lang.Object

Wrap cscript child processes. Note: this class is not thread-safe.

Version:
$Revision: 77171 $

Constructor Summary
CScriptWrapper(java.lang.String... p_params)
           
 
Method Summary
 int exec()
           
 int exec(int p_iTimeout)
           
 java.lang.String getStdErr()
          Get the error output of the child process.
 java.lang.String getStdOut()
          Get the standard output of the child process.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CScriptWrapper

public CScriptWrapper(java.lang.String... p_params)
Method Detail

exec

public int exec()
         throws java.io.IOException,
                java.lang.InterruptedException
Returns:
The exit code of the child process.
Throws:
java.io.IOException
java.lang.InterruptedException

exec

public int exec(int p_iTimeout)
         throws java.io.IOException,
                java.lang.InterruptedException
Parameters:
p_iTimeout - the timeout (in seconds!).
Returns:
The exit code of the child process.
Throws:
java.io.IOException
java.lang.InterruptedException

getStdOut

public java.lang.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 java.lang.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.


Last updated: 2011-08-11 10-04
Copyright © 2000-2011 United Planet. All Rights Reserved.