Problem
I have an existing zipfile "main.zip". I want to replace a single file in it, "say main.zip/foo."
I am aware of:
http://docs.oracle.com/javase/7/docs/api/java/util/zip/ZipOutputStream.html
However, this does not do what I want, as it creates a new Zip file -- and thus I'd have to add in all the existing entries in main.zip also.
Question:
Is there a way to "replace" a single file within a Zip archive in Java? (Without re-creating a new zip archive and copying over all the old data).