Package org.apache.poi.poifs.crypt.temp
Class AesZipFileZipEntrySource
java.lang.Object
org.apache.poi.poifs.crypt.temp.AesZipFileZipEntrySource
- All Implemented Interfaces:
Closeable
,AutoCloseable
,ZipEntrySource
An example
ZipEntrySource
that has encrypted temp files to ensure that
sensitive data is not stored in raw format on disk.-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Indicates we are done with reading, and resources may be freedstatic AesZipFileZipEntrySource
Enumeration
<? extends org.apache.commons.compress.archivers.zip.ZipArchiveEntry> Note: the file sizes are rounded up to the next cipher block size, so don't rely on file sizes of these custom encrypted zip file entries!org.apache.commons.compress.archivers.zip.ZipArchiveEntry
Return an entry by its pathgetInputStream
(org.apache.commons.compress.archivers.zip.ZipArchiveEntry entry) Returns an InputStream of the decompressed data that makes up the entryboolean
isClosed()
Has close been called already?
-
Method Details
-
getEntries
public Enumeration<? extends org.apache.commons.compress.archivers.zip.ZipArchiveEntry> getEntries()Note: the file sizes are rounded up to the next cipher block size, so don't rely on file sizes of these custom encrypted zip file entries!- Specified by:
getEntries
in interfaceZipEntrySource
-
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
-
getInputStream
public InputStream getInputStream(org.apache.commons.compress.archivers.zip.ZipArchiveEntry entry) throws IOException Description copied from interface:ZipEntrySource
Returns an InputStream of the decompressed data that makes up the entry- Specified by:
getInputStream
in interfaceZipEntrySource
- Throws:
IOException
-
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
-
createZipEntrySource
- Throws:
IOException
-