public class JseProcess extends Object
| 构造器和说明 |
|---|
JseProcess(String[] cmd,
InputStream stdin,
OutputStream stdout,
OutputStream stderr)
Construct a process around a command, with specified streams to redirect input and output to.
|
JseProcess(String cmd,
InputStream stdin,
OutputStream stdout,
OutputStream stderr)
Construct a process around a command, with specified streams to redirect input and output to.
|
public JseProcess(String[] cmd, InputStream stdin, OutputStream stdout, OutputStream stderr) throws IOException
cmd - The command to execute, including arguments, if anystdin - Optional InputStream to read from as process input, or null if input is not needed.stdout - Optional OutputStream to copy process output to, or null if output is ignored.stderr - Optinoal OutputStream to copy process stderr output to, or null if output is ignored.IOException - If the system process could not be created.Processpublic JseProcess(String cmd, InputStream stdin, OutputStream stdout, OutputStream stderr) throws IOException
cmd - The command to execute, including arguments, if anystdin - Optional InputStream to read from as process input, or null if input is not needed.stdout - Optional OutputStream to copy process output to, or null if output is ignored.stderr - Optinoal OutputStream to copy process stderr output to, or null if output is ignored.IOException - If the system process could not be created.Processpublic int exitValue()
public int waitFor()
throws InterruptedException
InterruptedExceptionCopyright © 2020. All rights reserved.