Return-Path: Delivered-To: apmail-commons-commits-archive@minotaur.apache.org Received: (qmail 3991 invoked from network); 14 Mar 2009 02:12:11 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 14 Mar 2009 02:12:11 -0000 Received: (qmail 94021 invoked by uid 500); 14 Mar 2009 02:12:10 -0000 Delivered-To: apmail-commons-commits-archive@commons.apache.org Received: (qmail 93969 invoked by uid 500); 14 Mar 2009 02:12:10 -0000 Mailing-List: contact commits-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@commons.apache.org Delivered-To: mailing list commits@commons.apache.org Received: (qmail 93960 invoked by uid 99); 14 Mar 2009 02:12:10 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 13 Mar 2009 19:12:10 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 14 Mar 2009 02:12:08 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 9F6FC238898B; Sat, 14 Mar 2009 02:11:47 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r753583 - /commons/sandbox/compress/trunk/src/main/java/org/apache/commons/compress/archivers/ArchiveStreamFactory.java Date: Sat, 14 Mar 2009 02:11:47 -0000 To: commits@commons.apache.org From: sebb@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20090314021147.9F6FC238898B@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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"); } }