Return-Path: Delivered-To: apmail-commons-user-archive@www.apache.org Received: (qmail 16980 invoked from network); 17 Apr 2009 23:51:23 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 17 Apr 2009 23:51:23 -0000 Received: (qmail 23002 invoked by uid 500); 17 Apr 2009 23:51:22 -0000 Delivered-To: apmail-commons-user-archive@commons.apache.org Received: (qmail 22895 invoked by uid 500); 17 Apr 2009 23:51:21 -0000 Mailing-List: contact user-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Commons Users List" Delivered-To: mailing list user@commons.apache.org Received: (qmail 22885 invoked by uid 99); 17 Apr 2009 23:51:21 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 17 Apr 2009 23:51:21 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of lists@nabble.com designates 216.139.236.158 as permitted sender) Received: from [216.139.236.158] (HELO kuber.nabble.com) (216.139.236.158) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 17 Apr 2009 23:51:13 +0000 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1Luxpc-0005mJ-Ri for user@commons.apache.org; Fri, 17 Apr 2009 16:50:52 -0700 Message-ID: <23107917.post@talk.nabble.com> Date: Fri, 17 Apr 2009 16:50:52 -0700 (PDT) From: Marian Schedenig To: user@commons.apache.org Subject: Compress: Reading archives within archives MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: msched@gmx.net X-Virus-Checked: Checked by ClamAV on apache.org Hi! I'm using Commons Compress to generate a list of all file names within an archive. This should also parse archive file within the archive to get a list of all files. However, I can't quite read the inner archive. For the outer archive, I have a file input stream "in", possibly a compressor input stream "cin", and an archive input stream "ain". Now whenever the next archive entry from ain turns out to be an archive file, I have to do create a new (possibly) compressor input stream and (definitely) archive input stream for the sub archive. Depending on which input stream I pass to the factory, I get two different errors: 1) Pass archive input stream "ain" to the factory: java.lang.IllegalArgumentException: Mark is not supported. at org.apache.commons.compress.archivers.ArchiveStreamFactory.createArchiveInputStream(ArchiveStreamFactory.java:152) 2) Pass file input stream "in" to the factory: This actually manages to get the file name, size and modification date of the first file within the sub archive (at least for ZIP files). However, I then get this exception: java.util.zip.ZipException: oversubscribed dynamic bit lengths tree at org.apache.commons.compress.archivers.zip.ZipArchiveInputStream.read(ZipArchiveInputStream.java:236) And the input stream is broken for the archive input stream of the outer archive. Am I doing something wrong? Is this a bug? Or is it at this time simply not possible to create archive input streams from "live" archive input streams without first decompressing the inner archive to a temp file? Thx, Marian. -- View this message in context: http://www.nabble.com/Compress%3A-Reading-archives-within-archives-tp23107917p23107917.html Sent from the Commons - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@commons.apache.org For additional commands, e-mail: user-help@commons.apache.org