File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/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
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: 41509
    
  53
Instead of writing to a ByteArrayOutputStream the code should write to a FileOutputStream.


Ping & DNS - my free Android networking tools app
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