public static int getNumberOfLines ( Reader in ) throws IOException { LineNumberReader lnr = new LineNumberReader ( in ) ; lnr . skip ( Long . MAX_VALUE ) ; in . close ( ) ; return lnr . getLineNumber ( ) ; }
Computes the number of files in the input Reader .