commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Commons Wiki] Trivial Update of "ExtractAndDecompressGzipFiles" by KenTanaka
Date Thu, 08 Nov 2007 20:39:48 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Commons Wiki" for change notification.

The following page has been changed by KenTanaka:
http://wiki.apache.org/jakarta-commons/ExtractAndDecompressGzipFiles

------------------------------------------------------------------------------
  For this example the sample {{{archive.tar}}} is located in the {{{/extra/data/tryVfs}}}
directory. You can see that hardcoded in the java example below. The {{{content.txt}}} and
{{{non-gzip.txt}}} files will be extracted into the same location.
  
  = Key Concept =
- An essential ingredient for this "recipe" is the '''name''' argument for the {{{FileSystemManager.resolveFile(String
name)}}} method. This is present around lines 99-100 in the ExtractFromGzipInTar.java code
listing below. The important work of connecting to the content.txt file inside the content.txt.gz
file inside the archive.tar file is performed by
+ An essential ingredient for this "recipe" is the '''name''' argument for the {{{FileSystemManager.resolveFile(String
name)}}} method. This is present around lines defining and using `String gzName`, line numbers
99-100 in the ExtractFromGzipInTar.java code listing below. The important work of connecting
to the content.txt file inside the content.txt.gz file inside the archive.tar file is performed
by
  {{{
  FileSystemManager fsManager = VFS.getManager();
  FileObject file = fsManager.resolveFile( "gz:tar:file:///extra/data/tryVfs/archive.tar!/tardir/content.txt.gz!content.txt"
);

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


Mime
View raw message