bug in ZipOutputStream

Gerhard Paulus gpaulus at stud.uni-frankfurt.de
Sun Jan 17 05:00:09 PST 1999

it seems that ZipOutputStream defaults to method STORED which is
different from Sun's implememtation. When I added setMethod() DBZip went

FileOutputStream fos= new FileOutputStream(fileName) ;
ZipOutputStream zos=new ZipOutputStream(new BufferedOutputStream(fos));
zos.setMethod(ZipOutputStream.DEFLATED) ;  // default in Sun's JDK

But the resulting jar file is in a format which is not compatible with
Sun's format. jar -xvf filename can't extract it. This works fine if
DBZip is used on Win32 JDK.

But it seems the whole java.util.zip implementation in Kaffe is
practically useless (unless I'm doing something terribly wrong). Please
find attached DBInstall.java which is basically the counterpart for

	kaffe -ms 20m  DBInstall <someCompressedJar>

It works fine on Win32 JDK and extracts all files in a standard jar file
(a la jar -cvf filename) and compiles the .java files in the
subdirectories. With Kaffe it simply doesn't work.

I also tested things with GZIPOutputStream and GZIPInputStream and found
them useless as well. Even if the respective programs run they produce
corrupted data for files larger 6 KB and are not compatible with Sun's
implementations. If somebody is interested I can provide that code as
-------------- next part --------------
A non-text attachment was scrubbed...
Name: DBInstall.java
Type: application/x-unknown-content-type-java_auto_file
Size: 6527 bytes
Desc: not available
Url : http://kaffe.org/pipermail/kaffe/attachments/19990117/bb921e7b/attachment-0003.bin 

More information about the kaffe mailing list