public class Command extends Object
Modifier and Type | Class and Description |
---|---|
class |
Command.Output |
Modifier and Type | Method and Description |
---|---|
boolean |
expect(String expected) |
boolean |
expectError(String expected) |
String |
getCommand() |
Command.Output |
getError() |
PrintWriter |
getInput() |
Command.Output |
getOutput() |
String |
getResult() |
void |
start() |
void |
waitFor() |
void |
write(String str) |
void |
writeln(String str) |
public Command(String cmd)
public String getCommand()
public void start() throws IOException
IOException
public PrintWriter getInput()
public void write(String str)
public void writeln(String str)
public Command.Output getOutput()
public boolean expect(String expected) throws InterruptedException
InterruptedException
public Command.Output getError()
public boolean expectError(String expected) throws InterruptedException
InterruptedException
public String getResult()
public void waitFor() throws InterruptedException
InterruptedException