aspose file tools*
The moose likes Java in General and the fly likes creating a zip file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "creating a zip file" Watch "creating a zip file" New topic
Author

creating a zip file

praveen shinde
Ranch Hand

Joined: Jun 03, 2009
Posts: 63
Hello friends,
I am creating a zip file from a string.In the code below zipOS is creating a zip file with an entry of rama.txt. But I am not understanding how to give a name to the resulting zip file. Any help is most welcome.

Thanks





Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 39535
    
  27
Instead of writing to a ByteArrayOutputStream the code should write to a FileOutputStream.


Ping & DNS - updated with new look and Ping home screen widget
praveen shinde
Ranch Hand

Joined: Jun 03, 2009
Posts: 63
hi Ulf Dittmer,
Ok, I will try that out.
Thanks & regards,
Praveen
praveen shinde
Ranch Hand

Joined: Jun 03, 2009
Posts: 63
Thanks Dittmer,
I am getting the zip file (with a name which I am giving in the code).

Regards,
Praveen.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: creating a zip file
 
Similar Threads
Document doc => xml => blob at mySQL
ZipOutputStream
Windows XP Compressed Folders doesn't recognize my Java-created zip file
How to zip the contents inside a directory
Sending ZIP file over httpResponse