public class Process
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static int |
execute(java.lang.String command,
byte[] stdin,
java.io.OutputStream os,
java.lang.String[] env)
Starts an external program (process) passing the specified input to the program and fills an OutputStream with
the programs output.
|
static int |
execute(java.lang.String command,
byte[] stdin,
java.io.OutputStream os,
java.lang.String[] env,
long timeout)
Starts an external program (process) passing the specified input to the program and fills an OutputStream with
the programs output.
|
static int |
execute(java.lang.String command,
java.io.InputStream stdin,
java.io.OutputStream os,
java.lang.String[] env,
long timeout)
Starts an external program (process) passing the specified input to the program and fills an OutputStream with
the programs output.
|
static int |
execute(java.lang.String command,
java.io.InputStream stdin,
java.io.OutputStream os,
java.lang.String[] env,
long timeout,
java.io.File dir)
Starts an external program (process) passing the specified input to the program and fills an OutputStream with
the programs output.
|
public static int execute(java.lang.String command, byte[] stdin, java.io.OutputStream os, java.lang.String[] env) throws java.io.IOException
command
- the complete command line to executestdin
- data to fill the programs stdin, or nullos
- an output stream which receives the programs outputenv
- an environment or nulljava.io.IOException
- if an i/o error occurspublic static int execute(java.lang.String command, byte[] stdin, java.io.OutputStream os, java.lang.String[] env, long timeout) throws java.io.IOException
command
- the complete command line to executestdin
- data to fill the programs stdin, or nullos
- an output stream which receives the programs outputenv
- an environment or nulltimeout
- a timeout value in msjava.io.IOException
- if an i/o error occurspublic static int execute(java.lang.String command, java.io.InputStream stdin, java.io.OutputStream os, java.lang.String[] env, long timeout) throws java.io.IOException
command
- the complete command line to executestdin
- data to fill the programs stdin, or nullos
- an output stream which receives the programs outputenv
- an environment or nulltimeout
- a timeout value in msjava.io.IOException
- if an i/o error occurspublic static int execute(java.lang.String command, java.io.InputStream stdin, java.io.OutputStream os, java.lang.String[] env, long timeout, java.io.File dir) throws java.io.IOException
command
- the complete command line to executestdin
- data to fill the programs stdin, or nullos
- an output stream which receives the programs outputenv
- an environment or nulltimeout
- a timeout value in msdir
- a File object defining the current dir for the processjava.io.IOException
- if an i/o error occurs