commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marian Schedenig <>
Subject Compress: Reading archives within archives
Date Fri, 17 Apr 2009 23:50:52 GMT


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.

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: oversubscribed dynamic bit lengths tree

And the input stream is broken for the archive input stream of the outer

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?


View this message in context:
Sent from the Commons - User mailing list archive at

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message