question: private int countLines ( Process process ) throws IOException { logErrors ( process ) ; InputStream in = process . getInputStream ( ) ; BufferedReader reader = new BufferedReader ( new InputStreamReader ( in ) ) ; int count = 0 ; while ( reader . readLine ( ) != null ) { count ++ ; } return count ; }
target:  Counts lines of input from the given process. Equivalent to "wc -l".