How can I achieve the following in Apache Commons Exec? (There doesn't seem to be any documentation for this use case).
- Launch a child process.
- Pass the child process a string on its stdin.
- Wait for the child process to terminate.
- Collect the stdout from the child process as a string.