Code example for ZipFile

Methods: close

0
      this.zipArchive = zipFile;
   } 
 
   public void close() throws IOException { 
      if(zipArchive != null) {
         zipArchive.close();
      } 
      zipArchive = null;
   } 
 
   public Enumeration<? extends ZipEntry> getEntries() {
      if (zipArchive == null)
         throw new IllegalStateException("Zip File is closed");
       
      return zipArchive.entries();
   } 
 
   public InputStream getInputStream(ZipEntry entry) throws IOException {
      if (zipArchive == null)
         throw new IllegalStateException("Zip File is closed");