commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject svn commit: r1170668 - in /commons/proper/compress/trunk/src: changes/changes.xml site/xdoc/examples.xml site/xdoc/index.xml site/xdoc/pack200.xml
Date Wed, 14 Sep 2011 15:03:35 GMT
Author: bodewig
Date: Wed Sep 14 15:03:35 2011
New Revision: 1170668

URL: http://svn.apache.org/viewvc?rev=1170668&view=rev
Log:
obviously incomplete documentation for pack200 streams.  COMPRESS-142

Added:
    commons/proper/compress/trunk/src/site/xdoc/pack200.xml   (with props)
Modified:
    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/src/changes/changes.xml
URL: http://svn.apache.org/viewvc/commons/proper/compress/trunk/src/changes/changes.xml?rev=1170668&r1=1170667&r2=1170668&view=diff
==============================================================================
--- commons/proper/compress/trunk/src/changes/changes.xml (original)
+++ commons/proper/compress/trunk/src/changes/changes.xml Wed Sep 14 15:03:35 2011
@@ -46,6 +46,9 @@ The <action> type attribute can be add,u
   <body>
     <release version="1.3" date="unreleased"
              description="Release 1.3 - API compatible to 1.2 but requires Java5 at runtime">
+      <action issue="COMPRESS-142" type="add" date="2011-09-14">
+        Support for the Pack200 format has been added.
+      </action> 
       <action issue="COMPRESS-132" type="add" date="2011-08-17">
         Read-only support for the format used by the Unix dump(8) tool
         has been added.

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=1170668&r1=1170667&r2=1170668&view=diff
==============================================================================
--- commons/proper/compress/trunk/src/site/xdoc/examples.xml (original)
+++ commons/proper/compress/trunk/src/site/xdoc/examples.xml Wed Sep 14 15:03:35 2011
@@ -353,6 +353,33 @@ gzIn.close();
 ]]></source>
       </subsection>
 
+      <subsection name="Pack200">
+
+        <p>The Pack200 package has a <a href="pack200.html">dedicated
+          documentation page</a>.</p>
+
+        <p>The implementation of this package is provided by
+          the <code>java.util.zip</code> package of the Java class
+          library.</p>
+
+        <p>Uncompressing a given pack200 compressed file (you would
+          certainly add exception handling and make sure all streams
+          get closed properly):</p>
+<source><![CDATA[
+FileInputStream fin = new FileInputStream("archive.pack");
+BufferedInputStream in = new BufferedInputStream(fin);
+FileOutputStream out = new FileOutputStream("archive.jar");
+Pack200CompressorInputStream pIn = new Pack200CompressorInputStream(in);
+final byte[] buffer = new byte[buffersize];
+int n = 0;
+while (-1 != (n = pIn.read(buffer))) {
+    out.write(buffer, 0, n);
+}
+out.close();
+pIn.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=1170668&r1=1170667&r2=1170668&view=diff
==============================================================================
--- commons/proper/compress/trunk/src/site/xdoc/index.xml (original)
+++ commons/proper/compress/trunk/src/site/xdoc/index.xml Wed Sep 14 15:03:35 2011
@@ -26,7 +26,7 @@
         <section name="Apache Commons Compress&#x2122;">
             <p>
                 The Apache Commons Compress library defines an API for
-                working with ar, cpio, Unix dump, tar, zip, gzip and bzip2 files.
+                working with ar, cpio, Unix dump, tar, zip, gzip, Pack200 and bzip2 files.
             </p>
             <p>
                 The code in this component has many origins:
@@ -51,8 +51,7 @@
             </subsection>
         </section>
         <section name="Documentation">
-          <p>Commons Compress 1.2 requires Java 1.4 or later and will
-            be the last version that doesn't require Java 5.</p>
+          <p>Commons Compress 1.3 requires Java 5.</p>
           
           <p>The compress component is split into <em>compressors</em>
and
             <em>archivers</em>.  While <em>compressors</em>
@@ -62,9 +61,10 @@
             by <code>ArchiveEntry</code> instances which in turn
             usually correspond to single files or directories.</p>
 
-          <p>Currently the bzip2 and gzip formats are supported as
-            compressors where gzip support is provided by
-            the <code>java.util.zip</code> package of the Java class
+          <p>Currently the bzip2, Pack200 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>
 
           <p>The ar, cpio, dump, tar and zip formats are supported as

Added: commons/proper/compress/trunk/src/site/xdoc/pack200.xml
URL: http://svn.apache.org/viewvc/commons/proper/compress/trunk/src/site/xdoc/pack200.xml?rev=1170668&view=auto
==============================================================================
--- commons/proper/compress/trunk/src/site/xdoc/pack200.xml (added)
+++ commons/proper/compress/trunk/src/site/xdoc/pack200.xml Wed Sep 14 15:03:35 2011
@@ -0,0 +1,27 @@
+<?xml version="1.0"?>
+<!--
+
+   Licensed to the Apache Software Foundation (ASF) under one or more
+   contributor license agreements.  See the NOTICE file distributed with
+   this work for additional information regarding copyright ownership.
+   The ASF licenses this file to You under the Apache License, Version 2.0
+   (the "License"); you may not use this file except in compliance with
+   the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+
+-->
+<document>
+  <properties>
+    <title>Commons Compress Pack200 Package</title>
+    <author email="dev@commons.apache.org">Commons Documentation Team</author>
+  </properties>
+  <body>
+  </body>
+</document>
\ No newline at end of file

Propchange: commons/proper/compress/trunk/src/site/xdoc/pack200.xml
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message