Class ProcessCapture
-
- All Implemented Interfaces:
public final class ProcessCaptureAn (almost) drop-in replacement for ProcessBuilder that is able to capture huge outputs to the standard output and standard error streams by redirecting output to temporary files.
-
-
Constructor Summary
Constructors Constructor Description ProcessCapture(File workingDir, CharSequence command)ProcessCapture(CharSequence command, File workingDir, Map<String, String> environment)
-
Method Summary
Modifier and Type Method Description final StringgetStdout()final StringgetStderr()final StringgetCommandLine()final ObjectgetUsedWorkingDir()final IntegergetExitValue()final BooleanisError()final BooleanisSuccess()final StringgetErrorMessage()final ProcessCapturerequireSuccess()Throw an IOException in case exitValue is not 0. -
-
Constructor Detail
-
ProcessCapture
ProcessCapture(File workingDir, CharSequence command)
-
ProcessCapture
ProcessCapture(CharSequence command, File workingDir, Map<String, String> environment)
-
-
Method Detail
-
getCommandLine
final String getCommandLine()
-
getUsedWorkingDir
final Object getUsedWorkingDir()
-
getExitValue
final Integer getExitValue()
-
getErrorMessage
final String getErrorMessage()
-
requireSuccess
final ProcessCapture requireSuccess()
Throw an IOException in case exitValue is not 0.
-
-
-
-