public class ZipInputStreamZipEntrySource extends java.lang.Object implements ZipEntrySource
close()
as soon as you're
done, to free up that memory!Constructor and Description |
---|
ZipInputStreamZipEntrySource(ZipArchiveThresholdInputStream inp)
Reads all the entries from the ZipInputStream
into memory, and don't close (since POI 4.0.1) the source stream.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Indicates we are done with reading, and
resources may be freed
|
java.util.Enumeration<? extends org.apache.commons.compress.archivers.zip.ZipArchiveEntry> |
getEntries()
Returns an Enumeration of all the Entries
|
org.apache.commons.compress.archivers.zip.ZipArchiveEntry |
getEntry(java.lang.String path)
Return an entry by its path
|
java.io.InputStream |
getInputStream(org.apache.commons.compress.archivers.zip.ZipArchiveEntry zipEntry)
Returns an InputStream of the decompressed
data that makes up the entry
|
boolean |
isClosed()
Has close been called already?
|
public ZipInputStreamZipEntrySource(ZipArchiveThresholdInputStream inp) throws java.io.IOException
java.io.IOException
public java.util.Enumeration<? extends org.apache.commons.compress.archivers.zip.ZipArchiveEntry> getEntries()
ZipEntrySource
getEntries
in interface ZipEntrySource
public java.io.InputStream getInputStream(org.apache.commons.compress.archivers.zip.ZipArchiveEntry zipEntry)
ZipEntrySource
getInputStream
in interface ZipEntrySource
public void close() throws java.io.IOException
ZipEntrySource
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
close
in interface ZipEntrySource
java.io.IOException
public boolean isClosed()
ZipEntrySource
isClosed
in interface ZipEntrySource
public org.apache.commons.compress.archivers.zip.ZipArchiveEntry getEntry(java.lang.String path)
ZipEntrySource
getEntry
in interface ZipEntrySource
path
- the path in unix-notationnull
if not foundCopyright 2020 The Apache Software Foundation or its licensors, as applicable.