How to Unzip a zip file using file listener.
Hi team, I have a requirement to unzip a file which has been picked up by file listener. I tried the zip file data to be stored at temp location and to unzip then in service file using "file at a time". I have used following code to write data at particular temp location . Where Test here in below code is parse segment data, find it in attachment. try{ byte[] out=new byte[1024*1024]; out=tools.getPrimaryPage().getString("Test").getBytes(); //byte[] out = Base64Util.decodeToByteArray(Base64Util.encode(tools.getPrimaryPage().getString("Test"))); oLog.error(tools.getPrimaryPage().getString("Test")); java.io.File file = new java.io.File(DelFile); java.io.DataOutputStream dos = new java.io.DataOutputStream(new java.io.FileOutputStream(file)); dos.write(out); dos.flush(); dos.close(); } catch (Exception ex) { // }. And it is only working for very small text files if present in zip. but not for other types the files are not getting opened in temp location zip. please suggest on this Thanks, Suresh
***Moderator Edit: Vidyaranjan | Updated Categories***