commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Philippe Poulard <>
Subject Re: VFS - How to create a zip file
Date Tue, 20 Nov 2007 12:04:52 GMT a écrit :
> Is anyone aware if commons-vfs provides a way to zip up FileObject
> objects?  

I'm not sure but VFS doesn't have means to create zip files ; it can 
just be used to read it

I have been unable to find documentation.  I am currently
> using code (very incomplete listing below) like the following to zip up
> files:
> ZipOutputStream out = new ZipOutputStream(new FileOutputStream(tempFile));

the same, but instead of creating your ZipOutputStream from a 
FileOutputStream, create it from the output stream of your VFS file 
object (that could be ftp, smb, etc)

> The problem with this more "standard" approach is that I am unable to
> write my output stream directly to anything other than the local file
> system.  I would like the option to write zipped files directly to an
> ftp, smb, etc. file system, thereby avoiding using the extra disk space
> on the local pc where the application is being run.
> Any help/insight is greatly appreciated.
> Thanks,
> Dean
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:


              (. .)
|      Philippe Poulard       |
        Have the RefleX !

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message