类 WeakZipFileFactory.WeakZipFile

  • 封闭类:
    WeakZipFileFactory

    public class WeakZipFileFactory.WeakZipFile
    extends java.lang.Object
    This class wraps a ZipFile to making it possible to weakly close it; this means the underlying zip file will be automatically reopened on demand if anyone tries to use it.
    • 方法概要

      所有方法 实例方法 具体方法 
      修饰符和类型 方法 说明
      void close()
      This method permanently closes the zip file.
      java.util.Enumeration<java.util.zip.ZipEntry> entries()
      Returns an enumeration of zip entries from the zip file.
      java.util.zip.ZipEntry getEntry​(java.lang.String name)
      Returns the specified entry from the zip file.
      java.io.InputStream getInputStream​(java.util.zip.ZipEntry ze)
      Returns an input stream for the specified zip entry.
      • 从类继承的方法 java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 方法详细资料

      • getEntry

        public java.util.zip.ZipEntry getEntry​(java.lang.String name)
        Returns the specified entry from the zip file.
        参数:
        name - the name of the entry to return.
        返回:
        the zip entry associated with the specified name or null if it does not exist.
      • entries

        public java.util.Enumeration<java.util.zip.ZipEntry> entries()
        Returns an enumeration of zip entries from the zip file.
        返回:
        an enumeration of zip entries.
      • getInputStream

        public java.io.InputStream getInputStream​(java.util.zip.ZipEntry ze)
                                           throws java.io.IOException
        Returns an input stream for the specified zip entry.
        参数:
        ze - the zip entry whose input stream is to be retrieved.
        返回:
        an input stream to the zip entry.
        抛出:
        java.io.IOException - if the input stream cannot be opened.
      • close

        public void close()
                   throws java.io.IOException
        This method permanently closes the zip file.
        抛出:
        java.io.IOException - if any error occurs while trying to close the zip file.