public int getNextFiles ( final File [ ] files , final int batchSize ) throws IOException { int c = 0 ; while ( c < batchSize ) { File file = getNextFile ( ) ; if ( file == null ) break ; files [ c ++ ] = file ; } return c ; }
Gets the next files up to batchSize .