public class ZipFileZipEntrySource extends java.lang.Object implements ZipEntrySource
Constructor and Description |
---|
ZipFileZipEntrySource(org.apache.commons.compress.archivers.zip.ZipFile zipFile) |
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 entry)
Returns an InputStream of the decompressed data that makes up the entry
(返回组成条目的解压缩数据的 InputStream)
|
boolean |
isClosed()
Has close been called already?
(close 已经被调用了吗?)
|
public ZipFileZipEntrySource(org.apache.commons.compress.archivers.zip.ZipFile zipFile)
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 java.util.Enumeration<? extends org.apache.commons.compress.archivers.zip.ZipArchiveEntry> getEntries()
ZipEntrySource
getEntries
in interface
ZipEntrySource
(ZipEntrySource 接口中的 getEntries)
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 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)
Copyright 2021 The Apache Software Foundation or its licensors, as applicable.