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

Zippy  RSS feed

 
Grant Crofton
Ranch Hand
Posts: 154
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi.
I'm trying to compress a file, but no book I've got says anything about it, and I couldn't see much in the sun tutorials, etc.
Looking through the API, it seems like I should be using stuff in java.util.zip, but I don't know ehat to use, eg what is the best Zip format.
I tried this:

but when I run it I get an IOException from the 'zout.write()' line. I'm guessing I'm just not using the right streams / using them in the right way.
Does anyone know anything about this, or where I can find out?
Thanks.
[This message has been edited by Carl Trusiak (edited November 17, 2000).]
[This message has been edited by Carl Trusiak (edited November 17, 2000).]
 
Carl Trusiak
Sheriff
Posts: 3341
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here is a quick example that archives all the log files out of a specific diretory.

Hope this help
 
Grant Crofton
Ranch Hand
Posts: 154
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks, Carl, that is a great help.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!