Package org.locationtech.jtstest.util
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:
IOException
InterruptedException
-
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:
IOException
InterruptedException
-
getStdout
-
getStderr
-