Keith Ching wrote: > I have a List of File objects. what is the best way to zip them all > together and download it?
I assume that you want to this with a plugin. I think the best way is to create a new File (net.sf.basedb.core.File) object and then use java.util.zip.ZipOutputStream for writing to the new file. > Is there a way to get the Httpresponse object from inside a plugin? Not really, since plugins are executed in the background or maybe even on a different server. In the the upcoming 2.2 release we have added the interface net.sf.basedb.core.plugin.ImmediateDownloadExporter that more or less makes it possible for a plugin to send the output to the HTTP response. Look at the source code some of the existing export plugins (for example HelpExporter) to see how to use it. > If > the files are really large, > would it better to write the outputstream to the local filesystem and > have the user find and download > the archive from inside their home dir? Maybe. I don't think a zip stream needs much memory or uses very much CPU. The main problem is probably slow network connections. If you use the net.sf.basedb.core.plugin.AbstractExportPlugin as a base class it can help you with supporting both immediate download and saving to the file system. > > is there a nice File.Action.addZip ? No. /Nicklas ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ The BASE general discussion mailing list basedb-users@lists.sourceforge.net unsubscribe: send a mail with subject "unsubscribe" to [EMAIL PROTECTED]