/** * Moves the pointer of the stream to the next {@link ArchiveEntry} and returns it. * * @return the next archive entry. * @throws IOException propagated I/O exception */ public ArchiveEntry getNextEntry() throws IOException { currentEntry = createNextEntry(); return currentEntry; }
private void assertState() { if (stream.isClosed()) { throw new IllegalStateException("Stream has already been closed"); } if (this != stream.getCurrentEntry()) { throw new IllegalStateException("Illegal stream pointer"); } }
@Override public void close() throws IOException { super.close(); stream.close(); }
ArchiveEntry entry; String firstEntryName = null; while ((entry = archiveStream.getNextEntry()) != null && firstEntryName == null) { if (entry.isDirectory()) { firstEntryName = entry.getName();
@Override public void close() throws IOException { super.close(); stream.close(); }
private void assertState() { if (stream.isClosed()) { throw new IllegalStateException("Stream has already been closed"); } if (this != stream.getCurrentEntry()) { throw new IllegalStateException("Illegal stream pointer"); } }
/** * Moves the pointer of the stream to the next {@link ArchiveEntry} and returns it. * * @return the next archive entry. * @throws IOException propagated I/O exception */ public ArchiveEntry getNextEntry() throws IOException { currentEntry = createNextEntry(); return currentEntry; }