Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

making zip file at runtime

 
Kavita Ghia
Ranch Hand
Posts: 91
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Friends,
I have two files one is with extension ".exe" and other is with extension ".txt" i.e
1) file1.exe
2) file2.txt
I want to make this file into zip format. This will be achieve during run-time.I have written one "Servlet" in which i'm using ZipEntry class.But i'm unable to do so.
Thanks in advance,
Kavita.

 
Frank Carver
Sheriff
Posts: 6920
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You say you are unable to use the ZipEntry class - why not? what is wrong?
 
Carl Trusiak
Sheriff
Posts: 3341
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here is a class that I use to zip all the log files in a directory

hope this helps
 
Kavita Ghia
Ranch Hand
Posts: 91
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Carl your code has helped.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic