java servlet: generate zip file from BLOBs

Posted by Zack on Stack Overflow See other posts from Stack Overflow or by Zack
Published on 2009-07-15T20:00:27Z Indexed on 2010/05/13 20:04 UTC
Read the original article Hit count: 224

Filed under:
|
|
|

I'm trying to zip a large number of pdf files (stored as BLOBs in the DB) and then return the zip as an attachment to the user.

What's the best way to do this without running into memory issues?

Another note: I actually need to merge some PDFs prior to adding them to the ZipOutputStream. Therefore, a couple PDFs will need to be stored in memory at a time.

I assume it would be best to then store them as temporary files on the server before zipping them all?

© Stack Overflow or respective owner

Related posts about java

Related posts about servlets