public class DefaultProcess extends Object implements TestableProcess
| Constructor and Description |
|---|
DefaultProcess(Process process) |
| Modifier and Type | Method and Description |
|---|---|
InputStream |
getErrorStream()
Gets the error stream of the subprocess.
|
InputStream |
getInputStream()
Gets the input stream of the subprocess.
|
OutputStream |
getOutputStream()
Gets the output stream of the subprocess.
|
int |
waitFor()
causes the current thread to wait, if necessary, until the
process represented by this
TestableProcess object has
terminated. |
public DefaultProcess(Process process)
public InputStream getErrorStream()
TestableProcessTestableProcess object.
Implementation note: It is a good idea for the input stream to be buffered.
getErrorStream in interface TestableProcesspublic InputStream getInputStream()
TestableProcessTestableProcess object.
Implementation note: It is a good idea for the input stream to be buffered.
getInputStream in interface TestableProcesspublic OutputStream getOutputStream()
TestableProcessTestableProcess object.
Implementation note: It is a good idea for the output stream to be buffered.
getOutputStream in interface TestableProcesspublic int waitFor()
throws InterruptedException
TestableProcessTestableProcess object has
terminated. This method returns
immediately if the subprocess has already terminated. If the
subprocess has not yet terminated, the calling thread will be
blocked until the subprocess exits.waitFor in interface TestableProcess0 indicates normal termination.InterruptedException - if the current thread is
interrupted by another
thread while it is waiting, then the wait is ended and
an InterruptedException is thrown.Copyright © 2018. All rights reserved.