Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Adding files to existing zip archive  RSS feed

 
Zargham Khan
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hullo
I want to add a file to already existing zip archive but it always replaces the files in zip with new ones. I am opening file stream as appendable but stil it is not working. I am using the following code
 
Idly Vada
Ranch Hand
Posts: 135
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The built-in Java archive classes contain no support for modifying an existing archive. They only let you build one from scratch. To modify an archive, you must copy it to another archive, performing the modifications along the way.
For more info:
http://www.javaworld.com/javaworld/jw-10-2000/jw-1027-toolbox.html
I think this will solve ur problem.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!