Package org.apache.poi.openxml4j.util
Interface ZipEntrySource
-
- All Superinterfaces:
AutoCloseable,Closeable
- All Known Implementing Classes:
AesZipFileZipEntrySource,ZipFileZipEntrySource,ZipInputStreamZipEntrySource
public interface ZipEntrySource extends Closeable
An Interface to make getting the different bits of a Zip File easy. Allows you to get at the ZipEntries, without needing to worry about ZipFile vs ZipInputStream being annoyingly very different.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidclose()Indicates we are done with reading, and resources may be freedEnumeration<? extends org.apache.commons.compress.archivers.zip.ZipArchiveEntry>getEntries()Returns an Enumeration of all the Entriesorg.apache.commons.compress.archivers.zip.ZipArchiveEntrygetEntry(String path)Return an entry by its pathInputStreamgetInputStream(org.apache.commons.compress.archivers.zip.ZipArchiveEntry entry)Returns an InputStream of the decompressed data that makes up the entrybooleanisClosed()Has close been called already?
-
-
-
Method Detail
-
getEntries
Enumeration<? extends org.apache.commons.compress.archivers.zip.ZipArchiveEntry> getEntries()
Returns an Enumeration of all the Entries
-
getEntry
org.apache.commons.compress.archivers.zip.ZipArchiveEntry getEntry(String path)
Return an entry by its path- Parameters:
path- the path in unix-notation- Returns:
- the entry or
nullif not found - Since:
- POI 4.0.0
-
getInputStream
InputStream getInputStream(org.apache.commons.compress.archivers.zip.ZipArchiveEntry entry) throws IOException
Returns an InputStream of the decompressed data that makes up the entry- Throws:
IOException
-
close
void close() throws IOExceptionIndicates we are done with reading, and resources may be freed- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
isClosed
boolean isClosed()
Has close been called already?
-
-