protected String getNextLine ( ) throws IOException { if ( isClosed ( ) ) { hasNext = false ; return null ; } if ( ! this . linesSkiped ) { for ( int i = 0 ; i < skipLines ; i ++ ) { lineReader . readLine ( ) ; linesRead ++ ; } this . linesSkiped = true ; } String nextLine = lineReader . readLine ( ) ; if ( nextLine == null ) { hasNext = false ; } else { linesRead ++ ; } return hasNext ? nextLine : null ; }
Reads the next line from the file .