• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Zippy

 
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).]
 
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.
 
Who knew that furniture could be so violent? Put this tiny ad out there to see what happens:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic