• 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:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

multiple file export as zip file (using DownloadAction class in struts)

 
Ranch Hand
Posts: 121
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi folks, I have a set of files store in db as blob type , and i need to export all these files as zip file using DownloadAction.

I know how to export each file one by one, i just need to override the DownloadAction.StreamInfo inner class, and returns the input stream of blob file,

but what about zip ? can anyone suggest the way to do this? thanks!
 
Chrix Wu
Ranch Hand
Posts: 121
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
the solution i saw on the web is about packing existing files as zip.

is there a solution that, i can accepts a set of streams ?
 
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Have you tried package java.util.zip ? http://www.exampledepot.com/egs/java.util.zip/CreateZip.html
 
Chrix Wu
Ranch Hand
Posts: 121
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Thai C. Tran wrote:Have you tried package java.util.zip ? http://www.exampledepot.com/egs/java.util.zip/CreateZip.html



Hi, thanks for you reply.

I have read the example, but is that means i need to do following:
1. transforms the blob data in the database to a set of files?
2. then packs the files into zip?

is there a way to avoid creating the files, and creates only the zip file
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic