You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by se...@apache.org on 2009/03/28 04:31:43 UTC

svn commit: r759426 - /commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/ArchiveInputStream.java

Author: sebb
Date: Sat Mar 28 03:31:42 2009
New Revision: 759426

URL: http://svn.apache.org/viewvc?rev=759426&view=rev
Log:
Javadoc

Modified:
    commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/ArchiveInputStream.java

Modified: commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/ArchiveInputStream.java
URL: http://svn.apache.org/viewvc/commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/ArchiveInputStream.java?rev=759426&r1=759425&r2=759426&view=diff
==============================================================================
--- commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/ArchiveInputStream.java (original)
+++ commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/ArchiveInputStream.java Sat Mar 28 03:31:42 2009
@@ -21,6 +21,21 @@
 import java.io.IOException;
 import java.io.InputStream;
 
+/**
+ * Archive input streams are expected to override the<br/>
+ * {@link #read()} and {@link #read(byte[] b, int off, int len)} <br/>
+ * methods so that reading from the stream generates EOF for the end of
+ * data in each entry as well as at the end of the file proper. The
+ * {@link #getNextEntry()} method is used to reset the input stream
+ * ready for reading the data from the next entry.
+ * <p>
+ * The input stream classes must also implement a method with the signature:
+ * <pre>
+ * public static boolean matches(byte[] signature, int length)
+ * </pre>
+ * which is used by the {@link ArchiveStreamFactory} to autodetect
+ * the archive type from the first few bytes of a stream. 
+ */
 public abstract class ArchiveInputStream extends InputStream {
 
     /**