You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by bo...@apache.org on 2011/11/03 07:32:26 UTC
svn commit: r1196969 - in /commons/proper/compress/trunk: pom.xml
src/changes/changes.xml
src/main/java/org/apache/commons/compress/compressors/xz/package.html
src/site/xdoc/examples.xml src/site/xdoc/index.xml
Author: bodewig
Date: Thu Nov 3 06:32:25 2011
New Revision: 1196969
URL: http://svn.apache.org/viewvc?rev=1196969&view=rev
Log:
documentation for XZ
Added:
commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/compressors/xz/package.html
- copied, changed from r1196949, commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/compressors/gzip/package.html
Modified:
commons/proper/compress/trunk/pom.xml
commons/proper/compress/trunk/src/changes/changes.xml
commons/proper/compress/trunk/src/site/xdoc/examples.xml
commons/proper/compress/trunk/src/site/xdoc/index.xml
Modified: commons/proper/compress/trunk/pom.xml
URL: http://svn.apache.org/viewvc/commons/proper/compress/trunk/pom.xml?rev=1196969&r1=1196968&r2=1196969&view=diff
==============================================================================
--- commons/proper/compress/trunk/pom.xml (original)
+++ commons/proper/compress/trunk/pom.xml Thu Nov 3 06:32:25 2011
@@ -102,6 +102,10 @@
<name>Michael Kuss</name>
<email>mail at michael minus kuss.de</email>
</contributor>
+ <contributor>
+ <name>Lasse Collin</name>
+ <email>lasse.collin@tukaani.org</email>
+ </contributor>
</contributors>
<scm>
Modified: commons/proper/compress/trunk/src/changes/changes.xml
URL: http://svn.apache.org/viewvc/commons/proper/compress/trunk/src/changes/changes.xml?rev=1196969&r1=1196968&r2=1196969&view=diff
==============================================================================
--- commons/proper/compress/trunk/src/changes/changes.xml (original)
+++ commons/proper/compress/trunk/src/changes/changes.xml Thu Nov 3 06:32:25 2011
@@ -46,6 +46,9 @@ The <action> type attribute can be add,u
<body>
<release version="1.4" date="unreleased"
description="Release 1.4">
+ <action issue="COMPRESS-156" type="add" date="2011-11-02">
+ Support for the XZ format has been added.
+ </action>
</release>
<release version="1.3" date="2011-11-01"
description="Release 1.3 - API compatible to 1.2 but requires Java5 at runtime">
Copied: commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/compressors/xz/package.html (from r1196949, commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/compressors/gzip/package.html)
URL: http://svn.apache.org/viewvc/commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/compressors/xz/package.html?p2=commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/compressors/xz/package.html&p1=commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/compressors/gzip/package.html&r1=1196949&r2=1196969&rev=1196969&view=diff
==============================================================================
--- commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/compressors/gzip/package.html (original)
+++ commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/compressors/xz/package.html Thu Nov 3 06:32:25 2011
@@ -19,11 +19,13 @@
-->
<body>
<p>Provides stream classes for compressing and decompressing
- streams using the GZip algorithm.</p>
+ streams using the XZ algorithm.</p>
<p>The classes in this package are wrappers around {@link
- java.util.zip.GZIPInputStream java.util.zip.GZIPInputStream} and
- {@link java.util.zip.GZIPOutputStream
- java.util.zip.GZIPOutputStream}.</p>
+ org.tukaani.xz.XZInputStream org.tukaani.xz.XZInputStream} and
+ {@link org.tukaani.xz.XZOutputStream
+ org.tukaani.xz.XZOutputStream} provided by the public
+ domain <a href="http://tukaani.org/xz/java.html">XZ for Java</a>
+ library.</p>
</body>
</html>
Modified: commons/proper/compress/trunk/src/site/xdoc/examples.xml
URL: http://svn.apache.org/viewvc/commons/proper/compress/trunk/src/site/xdoc/examples.xml?rev=1196969&r1=1196968&r2=1196969&view=diff
==============================================================================
--- commons/proper/compress/trunk/src/site/xdoc/examples.xml (original)
+++ commons/proper/compress/trunk/src/site/xdoc/examples.xml Thu Nov 3 06:32:25 2011
@@ -380,6 +380,30 @@ pIn.close();
]]></source>
</subsection>
+ <subsection name="XZ">
+
+ <p>The implementation of this package is provided by the
+ public domain <a href="http://tukaani.org/xz/java.html">XZ
+ for Java</a> library.</p>
+
+ <p>Uncompressing a given XZ compressed file (you would
+ certainly add exception handling and make sure all streams
+ get closed properly):</p>
+<source><![CDATA[
+FileInputStream fin = new FileInputStream("archive.tar.xz");
+BufferedInputStream in = new BufferedInputStream(fin);
+FileOutputStream out = new FileOutputStream("archive.tar");
+XZCompressorInputStream xzIn = new XZCompressorInputStream(in);
+final byte[] buffer = new byte[buffersize];
+int n = 0;
+while (-1 != (n = xzIn.read(buffer))) {
+ out.write(buffer, 0, n);
+}
+out.close();
+xzIn.close();
+]]></source>
+ </subsection>
+
</section>
</body>
</document>
Modified: commons/proper/compress/trunk/src/site/xdoc/index.xml
URL: http://svn.apache.org/viewvc/commons/proper/compress/trunk/src/site/xdoc/index.xml?rev=1196969&r1=1196968&r2=1196969&view=diff
==============================================================================
--- commons/proper/compress/trunk/src/site/xdoc/index.xml (original)
+++ commons/proper/compress/trunk/src/site/xdoc/index.xml Thu Nov 3 06:32:25 2011
@@ -26,7 +26,7 @@
<section name="Apache Commons Compress™">
<p>
The Apache Commons Compress library defines an API for
- working with ar, cpio, Unix dump, tar, zip, gzip, Pack200 and bzip2 files.
+ working with ar, cpio, Unix dump, tar, zip, gzip, XZ, Pack200 and bzip2 files.
</p>
<p>
The code in this component has many origins:
@@ -61,11 +61,13 @@
by <code>ArchiveEntry</code> instances which in turn
usually correspond to single files or directories.</p>
- <p>Currently the bzip2, Pack200 and gzip formats are
+ <p>Currently the bzip2, Pack200, XZ and gzip formats are
supported as compressors where gzip support is provided by
the <code>java.util.zip</code> package and Pack200 support
- by the <code>java.util.jar</code> package of the Java class
- library.</p>
+ by the <code>java.util.jar</code> package of the Java
+ class library. XZ support is provided by the public
+ domain <a href="http://tukaani.org/xz/java.html">XZ for
+ Java</a> library.</p>
<p>The ar, cpio, dump, tar and zip formats are supported as
archivers where the <a href="zip.html">zip</a>