Package org.apache.poi.openxml4j.util
Class ZipFileZipEntrySource
java.lang.Object
org.apache.poi.openxml4j.util.ZipFileZipEntrySource
- All Implemented Interfaces:
Closeable
,AutoCloseable
,ZipEntrySource
A ZipEntrySource wrapper around a ZipFile.
Should be as low in terms of memory as a
normal ZipFile implementation is.
-
Constructor Summary
Constructors -
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?
-
Constructor Details
-
ZipFileZipEntrySource
-
-
Method Details
-
close
Description copied from interface:ZipEntrySource
Indicates we are done with reading, and resources may be freed- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Specified by:
close
in interfaceZipEntrySource
- Throws:
IOException
-
isClosed
public boolean isClosed()Description copied from interface:ZipEntrySource
Has close been called already?- Specified by:
isClosed
in interfaceZipEntrySource
-
getEntries
Description copied from interface:ZipEntrySource
Returns an Enumeration of all the Entries- Specified by:
getEntries
in interfaceZipEntrySource
-
getInputStream
Description copied from interface:ZipEntrySource
Returns an InputStream of the decompressed data that makes up the entry- Specified by:
getInputStream
in interfaceZipEntrySource
- Throws:
IOException
-
getEntry
Description copied from interface:ZipEntrySource
Return an entry by its path- Specified by:
getEntry
in interfaceZipEntrySource
- Parameters:
path
- the path in unix-notation- Returns:
- the entry or
null
if not found
-