title: How to unzip a Zip file which contains Images without dropping any image in android?
body: <p>I am working on unzip the zip file which contains Images only here below my code is given. </p>
  
  <pre><code>public void unZipImages(String zipFile, String outputFolder) {
  
    byte[] buffer = new byte[2048];
  
    try {
  
     // create output directory is not exists    
    File folder = new File(Environment.getExternalStorageDirectory()
       + "/final_unzip_data/" + AppConstants.ManufacturerCode
       + "/Catalog/" + "");    if (!folder.exists()) {
      folder.mkdir();    }
  
     // get the zip file content   
      ZipInputStream zis = new ZipInputStream(
       new FileInputStream(zipFile));    // get the zipped file list entry    ZipEntry ze = zis.getNextEntry();
  
     while (ze != null) {
  
      String fileName = ze.getName();
      if (fileName.contains("\\")) {
       fileName = fileName.replace("\\", "/");
      }
      File newFile = new File(outputFolder + File.separator
        + fileName);
  
      System.out.println("file unzip : " + newFile.getAbsoluteFile());
  
      new File(newFile.getParent()).mkdirs();
  
      FileOutputStream fos = new FileOutputStream(newFile);
  
      int len;
      while ((len = zis.read(buffer)) &gt; 0) {
       fos.write(buffer, 0, len);
      }
  
      fos.close();
      ze = zis.getNextEntry();    }
  
     zis.closeEntry();    zis.close();
  
     System.out.println("Done");
  
    } catch (IOException ex) {    ex.printStackTrace();   }  }
  </code></pre>
  
  <p>But I don't know what the error is occurring to unzip the file some images are dropping. I have searched many types of codes for unzip but nothing worked.</p>