• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

Zippy

 
Ranch Hand
Posts: 154
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks, Carl, that is a great help.
 
I am not a spy. Definitely. Definitely not a spy. Not me. No way. But this tiny ad ...
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic