Add a folder having files into a zip file using JAVA -


I am using java.util.zip API of Java to add files and folders to a zip file, But when I delete more than one file in the same folder, what is the old content in any way can I add the file to the zip file without modifying the existing contents in the folder? Please help it, this is important!

This is my sample code:

  ZipOutputStream zip = null; FileOutputStream fileRiter = null; FileWriter = New File Optical Stream (destZipFile); Zip = new zip output font (file author); Zip.putNextEntry (new zipentry (desktop file); Zip.write (content); Zip.flush (); Zip.close ();  

If you want to add a new file to an existing zip file, you must first Unzip everything, then add all files and zip again.

Look for samples.


Comments

Popular posts from this blog

sql - dynamically varied number of conditions in the 'where' statement using LINQ -

asp.net mvc - Dynamically Generated Ajax.BeginForm -

Debug on symbian -