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/14 03:11:47 UTC
svn commit: r753583 -
/commons/sandbox/compress/trunk/src/main/java/org/apache/commons/compress/archivers/ArchiveStreamFactory.java
Author: sebb
Date: Sat Mar 14 02:11:46 2009
New Revision: 753583
URL: http://svn.apache.org/viewvc?rev=753583&view=rev
Log:
Javadoc
Modified:
commons/sandbox/compress/trunk/src/main/java/org/apache/commons/compress/archivers/ArchiveStreamFactory.java
Modified: commons/sandbox/compress/trunk/src/main/java/org/apache/commons/compress/archivers/ArchiveStreamFactory.java
URL: http://svn.apache.org/viewvc/commons/sandbox/compress/trunk/src/main/java/org/apache/commons/compress/archivers/ArchiveStreamFactory.java?rev=753583&r1=753582&r2=753583&view=diff
==============================================================================
--- commons/sandbox/compress/trunk/src/main/java/org/apache/commons/compress/archivers/ArchiveStreamFactory.java (original)
+++ commons/sandbox/compress/trunk/src/main/java/org/apache/commons/compress/archivers/ArchiveStreamFactory.java Sat Mar 14 02:11:46 2009
@@ -44,6 +44,15 @@
*/
public class ArchiveStreamFactory {
+ /**
+ * Create an archive input stream from an archiver name and an input stream.
+ *
+ * @param archiverName the archive name, i.e. "ar", "zip", "tar", "jar" or "cpio"
+ * @param in the input stream
+ * @return the archive input stream
+ * @throws ArchiveException
+ * @throws IllegalArgumentException if the archiver name is null or not known
+ */
public ArchiveInputStream createArchiveInputStream(
final String archiverName, final InputStream in)
throws ArchiveException {
@@ -65,6 +74,15 @@
throw new ArchiveException("Archiver: " + archiverName + " not found.");
}
+ /**
+ * Create an archive output stream from an archiver name and an input stream.
+ *
+ * @param archiverName the archive name, i.e. "ar", "zip", "tar", "jar" or "cpio"
+ * @param out the output stream
+ * @return the archive output stream
+ * @throws ArchiveException
+ * @throws IllegalArgumentException if the archiver name is null or not known
+ */
public ArchiveOutputStream createArchiveOutputStream(
final String archiverName, final OutputStream out)
throws ArchiveException {
@@ -87,6 +105,15 @@
throw new ArchiveException("Archiver: " + archiverName + " not found.");
}
+ /**
+ * Create an archive input stream from an input stream, autodetecting
+ * the archive type from the first few bytes of the stream.
+ *
+ * @param in the input stream
+ * @return the archive input stream
+ * @throws ArchiveException
+ * @throws IllegalArgumentException if the archiver name is null or not known
+ */
public ArchiveInputStream createArchiveInputStream(final InputStream in)
throws ArchiveException {
if (in == null) {
@@ -122,6 +149,6 @@
}
throw new ArchiveException(
- "No Archiver not found for this stream signature");
+ "No Archiver found for the stream signature");
}
}