/** * {@inheritDoc} * @throws ArchiveIterationException if it cannot read from the stream (RuntimeException) */ @Override public final boolean hasNext() { if (next == null) { try { next = getNextEntry(); } catch (IOException e) { throw new ArchiveIterationException(e.getMessage(), e); } } return next != null; }
/** * {@inheritDoc} * @throws ArchiveIterationException if it cannot read from the stream (RuntimeException) */ @Override public final boolean hasNext() { if (next == null) { try { next = getNextEntry(); } catch (IOException e) { throw new ArchiveIterationException(e.getMessage(), e); } } return next != null; }
/** * {@inheritDoc} * @throws ArchiveIterationException if it cannot read from the stream (RuntimeException) */ @Override public final T next() { T nextEntry; if (next != null) { nextEntry = next; next = null; } else { try { nextEntry = getNextEntry(); } catch (IOException e) { throw new ArchiveIterationException(e.getMessage(), e); } } if (nextEntry == null) { throw new NoSuchElementException(); } return nextEntry; }
/** * {@inheritDoc} * @throws ArchiveIterationException if it cannot read from the stream (RuntimeException) */ @Override public final T next() { T nextEntry; if (next != null) { nextEntry = next; next = null; } else { try { nextEntry = getNextEntry(); } catch (IOException e) { throw new ArchiveIterationException(e.getMessage(), e); } } if (nextEntry == null) { throw new NoSuchElementException(); } return nextEntry; }