Class ProcessUtil
java.lang.Object
com.sb.jini.ProcessUtil
Utility class for reading output from external processes.
Methods read a process's stdout and stderr and combine them into a single string.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringreadProcessOutput(Process process) Reads the entire output of the given process (stdout and stderr) and returns it as a single string.
-
Constructor Details
-
ProcessUtil
public ProcessUtil()
-
-
Method Details
-
readProcessOutput
Reads the entire output of the given process (stdout and stderr) and returns it as a single string.- Parameters:
process- the process to read from- Returns:
- combined output of the process
- Throws:
IOException- if an I/O error occurs while reading the streams
-