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: [email protected]
For additional commands, e-mail: [email protected]