question: public static void process ( Process p , LineConsumer stdout ) throws IOException { try ( BufferedReader inputReader = new BufferedReader ( new InputStreamReader ( p . getInputStream ( ) ) ) ) { String line ; while ( ( line = inputReader . readLine ( ) ) != null ) { stdout . writeLine ( line ) ; } } }
target:  Writes stdout of the process to consumer.<br> Supposes that stderr of the process is redirected to stdout.