You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by dd...@wi.rr.com on 2007/11/19 19:38:11 UTC
VFS - How to create a zip file
Is anyone aware if commons-vfs provides a way to zip up FileObject
objects? 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 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: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org
Re: VFS - How to create a zip file
Posted by Philippe Poulard <ph...@sophia.inria.fr>.
ddelponte@wi.rr.com 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: user-unsubscribe@commons.apache.org
> For additional commands, e-mail: user-help@commons.apache.org
--
Cordialement,
///
(. .)
--------ooO--(_)--Ooo--------
| Philippe Poulard |
-----------------------------
http://reflex.gforge.inria.fr/
Have the RefleX !
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org