Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Best way to delete a ZipEntry in a ZipFile  RSS feed

 
Spencer Lee
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello, I'm attempting to create a set of methods that allow you to edit a ZipFile by adding ZipEntry objects and deleting ZipEntry objects.

But the only way I can think of removing an entry is by opening a ZipInputStream to read the zip file and then writing the entries and lines of interest, while skipping the to-be-removed ZipEntry and its lines, to another ZipOutputStream.

Is there a better way to do this?

Thanks,
Spencer
 
Spencer Lee
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

For anyone interested... I found this article on the web...

http://www.javaworld.com/javaworld/jw-07-2000/jw-0728-toolbox.html
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!