/** * Returns this file's comment, or null if it doesn't have one. * See {@link ZipOutputStream#setComment}. * * @throws IllegalStateException if this zip file has been closed. * @since 1.7 */ public String getComment() { checkNotClosed(); return comment; }
/** * Returns the number of {@code ZipEntries} in this {@code ZipFile}. * * @return the number of entries in this file. * @throws IllegalStateException if this zip file has been closed. */ public int size() { checkNotClosed(); return entries.size(); }
/** * Returns the zip entry with the given name, or null if there is no such entry. * * @throws IllegalStateException if this zip file has been closed. */ public ZipEntry getEntry(String entryName) { checkNotClosed(); if (entryName == null) { throw new NullPointerException("entryName == null"); } ZipEntry ze = entries.get(entryName); if (ze == null) { ze = entries.get(entryName + "/"); } return ze; }
/** * Returns an enumeration of the entries. The entries are listed in the * order in which they appear in the zip file. * * <p>If you only need to iterate over the entries in a zip file, and don't * need random-access entry lookup by name, you should probably use {@link ZipInputStream} * instead, to avoid paying to construct the in-memory index. * * @throws IllegalStateException if this zip file has been closed. */ public Enumeration<? extends ZipEntry> entries() { checkNotClosed(); final Iterator<ZipEntry> iterator = entries.values().iterator(); return new Enumeration<ZipEntry>() { public boolean hasMoreElements() { checkNotClosed(); return iterator.hasNext(); } public ZipEntry nextElement() { checkNotClosed(); return iterator.next(); } }; }
/** * Returns this file's comment, or null if it doesn't have one. * See {@link ZipOutputStream#setComment}. * * @throws IllegalStateException if this zip file has been closed. * @since 1.7 */ public String getComment() { checkNotClosed(); return comment; }
/** * Returns this file's comment, or null if it doesn't have one. * See {@link ZipOutputStream#setComment}. * * @throws IllegalStateException if this zip file has been closed. * @since 1.7 */ public String getComment() { checkNotClosed(); return comment; }
/** * Returns this file's comment, or null if it doesn't have one. * See {@link ZipOutputStream#setComment}. * * @throws IllegalStateException if this zip file has been closed. * @since 1.7 */ public String getComment() { checkNotClosed(); return comment; }
/** * Returns this file's comment, or null if it doesn't have one. * See {@link ZipOutputStream#setComment}. * * @throws IllegalStateException if this zip file has been closed. * @since 1.7 */ public String getComment() { checkNotClosed(); return comment; }
/** * Returns this file's comment, or null if it doesn't have one. * See {@link ZipOutputStream#setComment}. * * @throws IllegalStateException if this zip file has been closed. * @since 1.7 */ public String getComment() { checkNotClosed(); return comment; }
/** * Returns this file's comment, or null if it doesn't have one. * See {@link ZipOutputStream#setComment}. * * @throws IllegalStateException if this zip file has been closed. * @since 1.7 */ public String getComment() { checkNotClosed(); return comment; }
/** * Returns this file's comment, or null if it doesn't have one. * See {@link ZipOutputStream#setComment}. * * @throws IllegalStateException if this zip file has been closed. * @since 1.7 */ public String getComment() { checkNotClosed(); return comment; }
/** * Returns the number of {@code ZipEntries} in this {@code ZipFile}. * * @return the number of entries in this file. * @throws IllegalStateException if this zip file has been closed. */ public int size() { checkNotClosed(); return entries.size(); }
/** * Returns the number of {@code ZipEntries} in this {@code ZipFile}. * * @return the number of entries in this file. * @throws IllegalStateException if this zip file has been closed. */ public int size() { checkNotClosed(); return entries.size(); }
/** * Returns the number of {@code ZipEntries} in this {@code ZipFile}. * * @return the number of entries in this file. * @throws IllegalStateException if this zip file has been closed. */ public int size() { checkNotClosed(); return entries.size(); }
/** * Returns the number of {@code ZipEntries} in this {@code ZipFile}. * * @return the number of entries in this file. * @throws IllegalStateException if this zip file has been closed. */ public int size() { checkNotClosed(); return entries.size(); }
/** * Returns the number of {@code ZipEntries} in this {@code ZipFile}. * * @return the number of entries in this file. * @throws IllegalStateException if this zip file has been closed. */ public int size() { checkNotClosed(); return entries.size(); }
/** * Returns the number of {@code ZipEntries} in this {@code ZipFile}. * * @return the number of entries in this file. * @throws IllegalStateException if this zip file has been closed. */ public int size() { checkNotClosed(); return entries.size(); }
/** * Returns the number of {@code ZipEntries} in this {@code ZipFile}. * * @return the number of entries in this file. * @throws IllegalStateException if this zip file has been closed. */ public int size() { checkNotClosed(); return entries.size(); }
/** * Returns the zip entry with the given name, or null if there is no such entry. * * @throws IllegalStateException if this zip file has been closed. */ public ZipEntry getEntry(String entryName) { checkNotClosed(); if (entryName == null) { throw new NullPointerException("entryName == null"); } ZipEntry ze = entries.get(entryName); if (ze == null) { ze = entries.get(entryName + "/"); } return ze; }
/** * Returns the zip entry with the given name, or null if there is no such entry. * * @throws IllegalStateException if this zip file has been closed. */ public ZipEntry getEntry(String entryName) { checkNotClosed(); if (entryName == null) { throw new NullPointerException("entryName == null"); } ZipEntry ze = entries.get(entryName); if (ze == null) { ze = entries.get(entryName + "/"); } return ze; }