File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

creating a zip file

 
praveen shinde
Ranch Hand
Posts: 63
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Rancher
Pie
Posts: 42966
73
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Instead of writing to a ByteArrayOutputStream the code should write to a FileOutputStream.
 
praveen shinde
Ranch Hand
Posts: 63
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi Ulf Dittmer,
Ok, I will try that out.
Thanks & regards,
Praveen
 
praveen shinde
Ranch Hand
Posts: 63
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic