You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Ryan McKinley <ry...@gmail.com> on 2012/12/20 07:30:36 UTC

[compress] uncompress utility?

I'm looking at options for how to take an archive file (zip,gz,tar,etc) and
extract it to the file system.  (like running unzip file.zip -d folder)

I see org.apache.commons.compress.archivers.Lister, but I don't see any
obvious (general) way to write this to disk.

Any suggestions for how to best approach this?  The application needs to be
cross platform and many systems will not have reasonable system tools to
rely on.

Thanks
Ryan

Re: [compress] uncompress utility?

Posted by Stefan Bodewig <bo...@apache.org>.
On 2012-12-20, Ryan McKinley wrote:

> I'm looking at options for how to take an archive file (zip,gz,tar,etc) and
> extract it to the file system.  (like running unzip file.zip -d folder)

> I see org.apache.commons.compress.archivers.Lister, but I don't see any
> obvious (general) way to write this to disk.

Compress currently views itself as library to build tools like the one
you describe.  Lister really isn't much more than a POC.

It schould be fairly easy to grab some code from Compress' unit tests
and docs to put together a generic uncompressor.

A more complex example might be the Compress Antlib which provides Ant
tasks based on Commons Compress (for creating and extracting archives)
http://svn.apache.org/repos/asf/ant/antlibs/compress/trunk/

Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Re: [compress] uncompress utility?

Posted by James Carman <ja...@carmanconsulting.com>.
You could perhaps use Commons VFS.  It supports all the file types you
mention and gives you a common API to deal with.

On Thu, Dec 20, 2012 at 1:30 AM, Ryan McKinley <ry...@gmail.com> wrote:
> I'm looking at options for how to take an archive file (zip,gz,tar,etc) and
> extract it to the file system.  (like running unzip file.zip -d folder)
>
> I see org.apache.commons.compress.archivers.Lister, but I don't see any
> obvious (general) way to write this to disk.
>
> Any suggestions for how to best approach this?  The application needs to be
> cross platform and many systems will not have reasonable system tools to
> rely on.
>
> Thanks
> Ryan

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org