I am trying to unzip a password protected zip file using zip4j library for android. But it is giving Unsupported Compression Type exception. I have searched a lot but could not find any reason or solution for it.
So my questions are:
- Why i am getting this exception?
How to solve this problem? Should i use any other library?
try { File src = new File("/sdcard/" + filename); ZipFile zipFile = new ZipFile(src); if (zipFile.isEncrypted()) { zipFile.setPassword("mypassword"); } File destFile=new File ("/sdcard/tests_images_Xdata"); if(!destFile.isDirectory()){ destFile.mkdir(); String dest = new String("/sdcard/tests_images_Xdata"); zipFile.extractAll(dest); } } catch (ZipException e) { e.printStackTrace(); }