United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
JDK-4419591 : ZipFile class does not understand compression method that WinZIP can process.

Details
Type:
Bug
Submit Date:
2001-02-27
Status:
Open
Updated Date:
2009-06-03
Project Name:
JDK
Resolved Date:
Component:
core-libs
OS:
windows_2000
Sub-Component:
java.util.jar
CPU:
x86
Priority:
P4
Resolution:
Unresolved
Affected Versions:
1.3.0
Targeted Versions:

Related Reports

Sub Tasks

Description

Name: boT120536			Date: 02/27/2001


C:\WINNT>java -version
java version "1.3.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0-C)
Java HotSpot(TM) Client VM (build 1.3.0-C, mixed mode)

The class ZipFile is not able to open a 'zip' file that WinZIP can successfully
process.

Here is the URL to the sample zip file I am attempting to unzip.

http://www.tsnhorse.com/samples/evd0619i.zip

I downloaded this file to my local temp directory, then attempted to open it
with the code:

	private void unzipFile(String filename) {
		try {
			ZipFile z = new ZipFile(filename);
		}
		catch (Exception e) {
			e.printStackTrace();
		}

This code produces the stack trace:

java.util.zip.ZipException: invalid CEN header (bad compression method)

	at java.util.zip.ZipFile.<init>(ZipFile.java:110)

Using WinZIP, I can open and extract the zip file contents.  If I then re-
create the zip file using WinZIP, the above code completes without generating
an exception.
(Review ID: 117713) 
======================================================================

                                    

Comments
EVALUATION

The zip file has the compression method "6 - The file is Imploded" which is not supported by existing jar/zip implementation.
                                     
2009-06-03



Hardware and Software, Engineered to Work Together