Class CommandRunner
java.lang.Object
org.locationtech.jtstest.util.CommandRunner
Runs an OS command, capturing stdout and stderr
- Author:
- Martin Davis
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
CommandRunner
public CommandRunner()
-
-
Method Details
-
exec
- Throws:
IOExceptionInterruptedException
-
exec
Executes a command and returns the contents of stdout as a string. The command should be a single line, otherwise things seem to hang.- Parameters:
cmd- command to execute (should be a single line)stdin-- Returns:
- text of stdout
- Throws:
IOExceptionInterruptedException
-
getStdout
-
getStderr
-