php.java.bridge
Class Util.Process
java.lang.Object
java.lang.Process
php.java.bridge.Util.Process
- Direct Known Subclasses:
- Util.ProcessWithErrorHandler
- Enclosing class:
- Util
public static class Util.Process
- extends java.lang.Process
Starts a CGI process and returns the process handle.
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
start
public static Util.Process start(java.lang.String[] args,
java.io.File homeDir,
java.util.Map env,
boolean tryOtherLocations,
boolean preferSystemPhp)
throws java.io.IOException
- Starts a CGI process and returns the process handle.
- Parameters:
args - The args array, e.g.: new String[]{null, "-b", ...};. If args is null or if args[0] is null, the function looks for the system property "php.java.bridge.php_exec".homeDir - The home directory. If null, the current working directory is used.env - The CGI environment. If null, Util.DEFAULT_CGI_ENVIRONMENT is used.
- Returns:
- The process handle.
- Throws:
java.io.IOException
java.lang.NullPointerException
java.io.IOException- See Also:
Util.checkCgiBinary(StringBuffer)
getOutputStream
public java.io.OutputStream getOutputStream()
- Specified by:
getOutputStream in class java.lang.Process
getInputStream
public java.io.InputStream getInputStream()
- Specified by:
getInputStream in class java.lang.Process
getErrorStream
public java.io.InputStream getErrorStream()
- Specified by:
getErrorStream in class java.lang.Process
waitFor
public int waitFor()
throws java.lang.InterruptedException
- Specified by:
waitFor in class java.lang.Process
- Throws:
java.lang.InterruptedException
exitValue
public int exitValue()
- Specified by:
exitValue in class java.lang.Process
destroy
public void destroy()
- Specified by:
destroy in class java.lang.Process