Package org.apache.poi.openxml4j.util
Interface ZipEntrySource
- All Superinterfaces:
AutoCloseable
,Closeable
- All Known Implementing Classes:
AesZipFileZipEntrySource
,ZipFileZipEntrySource
,ZipInputStreamZipEntrySource
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
Modifier and TypeMethodDescriptionvoid
close()
Indicates we are done with reading, and resources may be freedEnumeration
<? extends ZipArchiveEntry> Returns an Enumeration of all the EntriesReturn an entry by its pathgetInputStream
(ZipArchiveEntry entry) Returns an InputStream of the decompressed data that makes up the entryboolean
isClosed()
Has close been called already?
-
Method Details
-
getEntries
Enumeration<? extends ZipArchiveEntry> getEntries()Returns an Enumeration of all the Entries -
getEntry
Return an entry by its path- Parameters:
path
- the path in unix-notation- Returns:
- the entry or
null
if not found - Since:
- POI 4.0.0
-
getInputStream
Returns an InputStream of the decompressed data that makes up the entry- Throws:
IOException
-
close
Indicates we are done with reading, and resources may be freed- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Throws:
IOException
-
isClosed
boolean isClosed()Has close been called already?
-