commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Torelli (JIRA)" <>
Subject [jira] Commented: (COMPRESS-91) jar recognition is curently impossible.
Date Wed, 25 Aug 2010 18:40:20 GMT


Torelli commented on COMPRESS-91:

No matter to know the extension, jar or zip, if it's a simple archive.

Currently the commons compress is not able to see the differences between  zip and jar. .jar
contains less informations for each entry. For exemple
it doesn't have the size before compression, you have to unzip to know that. An usual zip
entry contains the size before compression for each entry.

Another clue is that an usual zip contains an entry for each folder.
For exemple, if the archive contains file with the path "xx/yy/zz.txt", the entries are "xx",
then "xx/yy" and finaly "xx/yy/zz.txt".
A .jar (done with the java tools) contains only "xx/yy/zz.txt", not the folder.

If the compressed file is zipped AND the first entry is META-INF/MANIFEST.MF, the file is
probably a java application, an applet or a middlet.
In that case, the extension must be .jar and it's not a good idea to modify the archive.

> jar recognition is curently impossible.
> ---------------------------------------
>                 Key: COMPRESS-91
>                 URL:
>             Project: Commons Compress
>          Issue Type: Bug
>    Affects Versions: 1.0
>         Environment: W2K and unbuntu JRE1.4 to 1.6.
>            Reporter: Torelli
>            Priority: Minor
> In ArchiveStreamFactory.createArchiveInputStream(final InputStream in),
> JarArchiveInputStream must be before ZipArchiveInputStream
> and a positive jar identification have to be confirmed by the first file entry (META-INF/MANIFEST.MF).
> Regards.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message