/** * Gets the next available batch item or null if no more are available * * @return the next available batch item * @throws IOException if an I/O error occurs while getting the next item from the batch file. */ @Override public BatchItem getNextItem() throws IOException { if (curItem >= items.size()) { return null; } else { String line = items.get(curItem++); return new BatchItem(BatchFile.getFilename(line), BatchFile.getReference(line)); } }