private void walkInternal(Iterable<T> archiveFile) throws IOException { for (T entry : archiveFile) { checkIfCancelled(entry); handleEntry(entry); } }
/** * Walks the Iterable archive. * @param iterable an iterable archive. * @throws IOException if the the archive source could not be read */ protected final void walk(Iterable<T> iterable) throws IOException { try { walkInternal(iterable); } catch (CancelException cancel) { handleCancelled(cancel); } }
/** * Handles a cancelled walk. * @param entry the entry that would be processed next * @throws IOException if the archive source could not be read. */ private void checkIfCancelled(T entry) throws IOException { if (isCancelled()) { throw new CancelException("Cancelled on entry [" + entry + "]"); } }
/** * Handles a cancelled walk. * @param entry the entry that would be processed next * @throws IOException if the archive source could not be read. */ private void checkIfCancelled(T entry) throws IOException { if (isCancelled()) { throw new CancelException("Cancelled on entry [" + entry + "]"); } }
/** * Walks the Iterable archive. * @param iterable an iterable archive. * @throws IOException if the the archive source could not be read */ protected final void walk(Iterable<T> iterable) throws IOException { try { walkInternal(iterable); } catch (CancelException cancel) { handleCancelled(cancel); } }
private void walkInternal(Iterable<T> archiveFile) throws IOException { for (T entry : archiveFile) { checkIfCancelled(entry); handleEntry(entry); } }