@Beta public final class AesZipFileZipEntrySource extends java.lang.Object implements ZipEntrySource
ZipEntrySource
that has encrypted temp files to ensure that sensitive data is not stored in raw format on disk.
(一个示例 ZipEntrySource,它具有加密的临时文件,以确保敏感数据不会以原始格式存储在磁盘上。)
Modifier and Type | Method and Description |
---|---|
void |
close()
Indicates we are done with reading, and resources may be freed
(表示我们已完成阅读,可以释放资源)
|
static AesZipFileZipEntrySource |
createZipEntrySource(java.io.InputStream is) |
java.util.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!
(注意:文件大小四舍五入到下一个密码块大小,所以不要依赖这些自定义加密 zip 文件条目的文件大小!)
|
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 entry)
Returns an InputStream of the decompressed data that makes up the entry
(返回组成条目的解压缩数据的 InputStream)
|
boolean |
isClosed()
Has close been called already?
(close 已经被调用了吗?)
|
public java.util.Enumeration<? extends org.apache.commons.compress.archivers.zip.ZipArchiveEntry> getEntries()
getEntries
in interface
ZipEntrySource
(ZipEntrySource 接口中的 getEntries)
public org.apache.commons.compress.archivers.zip.ZipArchiveEntry getEntry(java.lang.String path)
ZipEntrySource
getEntry
in interface
ZipEntrySource
(ZipEntrySource 接口中的 getEntry)
path
- the path in unix-notation
(path - unix-notation 中的路径)
null
if not found
(如果没有找到该条目或 null)
public java.io.InputStream getInputStream(org.apache.commons.compress.archivers.zip.ZipArchiveEntry entry) throws java.io.IOException
ZipEntrySource
getInputStream
in interface
ZipEntrySource
(ZipEntrySource 接口中的 getInputStream)
java.io.IOException
(java.io.IOException)
public void close() throws java.io.IOException
ZipEntrySource
close
in interface
java.io.Closeable
(在接口 java.io.Closeable 中关闭)
close
in interface
java.lang.AutoCloseable
(在接口 java.lang.AutoCloseable 中关闭)
close
in interface
ZipEntrySource
(在接口 ZipEntrySource 中关闭)
java.io.IOException
(java.io.IOException)
public boolean isClosed()
ZipEntrySource
isClosed
in interface
ZipEntrySource
(isClosed 在接口 ZipEntrySource 中)
public static AesZipFileZipEntrySource createZipEntrySource(java.io.InputStream is) throws java.io.IOException
java.io.IOException
(java.io.IOException)
Copyright 2021 The Apache Software Foundation or its licensors, as applicable.