Repository: commons-compress
Updated Branches:
  refs/heads/master 735ba6de4 -> fe5ffa67b


Document new service loader feature.

Project: http://git-wip-us.apache.org/repos/asf/commons-compress/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-compress/commit/fe5ffa67
Tree: http://git-wip-us.apache.org/repos/asf/commons-compress/tree/fe5ffa67
Diff: http://git-wip-us.apache.org/repos/asf/commons-compress/diff/fe5ffa67

Branch: refs/heads/master
Commit: fe5ffa67bc928a0b1915fa78bfe9acce5c8cd707
Parents: 735ba6d
Author: Gary Gregory <ggreg...@apache.org>
Authored: Thu Dec 8 22:57:50 2016 -0800
Committer: Gary Gregory <ggreg...@apache.org>
Committed: Thu Dec 8 22:57:50 2016 -0800

----------------------------------------------------------------------
 src/site/xdoc/examples.xml | 47 +++++++++++++++++++++++++++++++++++++++++
 src/site/xdoc/index.xml    |  3 ++-
 2 files changed, 49 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-compress/blob/fe5ffa67/src/site/xdoc/examples.xml
----------------------------------------------------------------------
diff --git a/src/site/xdoc/examples.xml b/src/site/xdoc/examples.xml
index c894d36..ade831c 100644
--- a/src/site/xdoc/examples.xml
+++ b/src/site/xdoc/examples.xml
@@ -682,6 +682,53 @@ zIn.close();
 
       </subsection>
 
+    <subsection name="Extending Commons Compress">
+    
+        <p>
+          Starting in release 1.13, it is now possible to add Compressor- and 
ArchiverStream implementations using the 
+          Java's <a 
href="https://docs.oracle.com/javase/7/docs/api/java/util/ServiceLoader.html";>ServiceLoader</a>
 
+          mechanism.
+        </p>
+    </subsection>
+    
+    <subsection name="Extending Commons Compress Compressors">
+    
+        <p>
+          To provide your own compressor, you must make available on the 
classpath a file called 
+          
<code>META-INF/services/org.apache.commons.compress.compressors.CompressorStreamProvider</code>.
+        </p>
+        <p>
+          This file MUST contain one full-qualified class name per line.
+        </p>
+        <p>
+          For example:
+        </p>
+        
<pre>org.apache.commons.compress.compressors.TestCompressorStreamProvider</pre>
+        <p>
+          This class MUST implement the Commons Compress interface 
+          <a 
href="apidocs/org/apache/commons/compress/compressors/CompressorStreamProvider.html">org.apache.commons.compress.compressors.CompressorStreamProvider</a>.
+        </p>
+    </subsection>
+    
+    <subsection name="Extending Commons Compress Archivers">
+
+        <p>
+          To provide your own compressor, you must make available on the 
classpath a file called 
+          
<code>META-INF/services/org.apache.commons.compress.archivers.ArchiveStreamProvider</code>.
+        </p>
+        <p>
+          This file MUST contain one full-qualified class name per line.
+        </p>
+        <p>
+          For example:
+        </p>
+        
<pre>org.apache.commons.compress.archivers.TestArchiveStreamProvider</pre>
+        <p>
+          This class MUST implement the Commons Compress interface 
+          <a 
href="apidocs/org/apache/commons/compress/archivers/ArchiveStreamProvider.html">org.apache.commons.compress.archivers.ArchiveStreamProvider</a>.
+        </p>
+    </subsection>
+    
     </section>
   </body>
 </document>

http://git-wip-us.apache.org/repos/asf/commons-compress/blob/fe5ffa67/src/site/xdoc/index.xml
----------------------------------------------------------------------
diff --git a/src/site/xdoc/index.xml b/src/site/xdoc/index.xml
index d78b80d..124dba1 100644
--- a/src/site/xdoc/index.xml
+++ b/src/site/xdoc/index.xml
@@ -68,7 +68,8 @@
               represented by <code>File</code>s.</li>
               <li>It is now possible to add Compressor- and
               ArchiverStream implementations using the JDK's
-              ServiceLoader mechanism.</li>
+              ServiceLoader mechanism. Please see 
+              <a href="examples.html#Extending_Commons_Compress">Extending 
Commons Compress</a>.</li>
               <li>Added support for writing the legacy LZMA format as
               compressor stream and inside 7z archives - this requires
               XZ for Java 1.6.</li>

Reply via email to