Package org.aesh.terminal.utils
Class ExecHelper
java.lang.Object
org.aesh.terminal.utils.ExecHelper
Helper methods for capturing an external process output.
- Author:
- Guillaume Nodet
-
Method Summary
Modifier and TypeMethodDescriptionstatic StringWait for a process to complete and capture its output.
-
Method Details
-
waitAndCapture
Wait for a process to complete and capture its output. Both stdout and stderr are captured and returned as a single string.- Parameters:
p- the process to wait for- Returns:
- the combined output of stdout and stderr
- Throws:
IOException- if an I/O error occursInterruptedException- if the thread is interrupted while waiting
-