public class ProcessCoordinator extends Object
| Constructor and Description |
|---|
ProcessCoordinator(TestableProcess process)
Initializes the ProcessCoordinator with an instance of
TestableProcess. |
| Modifier and Type | Method and Description |
|---|---|
String |
getStdErr()
Gets the contents of the child process's standard error stream.
|
String |
getStdOut()
Gets the contents of the child process's standard output stream.
|
void |
print(String s)
Writes the specified string to the child process's stdin stream.
|
void |
println(String s)
Writes the specified string to the child process's stdin stream,
followed by a new line.
|
int |
waitFor()
Causes the current thread to wait, if necessary, until the child process
has terminated and both its stdout and stderr streams have been consumed.
|
public ProcessCoordinator(TestableProcess process)
TestableProcess.process - a process which has already been startedpublic void print(String s)
s - The string to write.public void println(String s)
s - The string to write.public int waitFor()
throws InterruptedException
InterruptedException - if the current thread is interrupted by another
thread while it is waiting, then the wait is ended
and an InterruptedException is thrown.public String getStdOut()
public String getStdErr()
Copyright © 2018. All rights reserved.