[Kaffe] another ZipOutputStream patch

Moses DeJong dejong at cs.umn.edu
Tue Feb 16 17:15:47 PST 1999


On Tue, 16 Feb 1999, Archie Cobbs wrote:

> Moses DeJong writes:
> > > Are you sure this is correct? I.e., it's not just that the JDK
> > > is setting the flag to a value that happens to equal the value
> > > of ze.method? Do you have conclusive documentation and/or code
> > > that this is based on?
> > > 
> > > Just double checking...
> > 
> > There really is nothing in the docs about this. I am just using
> > a couple of programs to dump an example stream and then compare
> > the stream (the Zip file) that is generated by Kaffe and the JDK.
> 
> Probably the most 'correct' thing to do then is to grab the zip
> sources and reverse engineer what they do. A cursory glance seems
> to point at the file "zipup.c", which writes out zip info...
> 
> Anyway, here's the URL to the sources:
> 
>   ftp://ftp.cdrom.com/pub/infozip/src/zip22.tar.gz



I have been looking at the src and I remembered another problem
that I saw in the Kaffe source. The ZipEntry.time member was not
getting written out by Kaffe. Instead four (byte) 0's were getting
written to the stream. I tried to change the code so that the
time int would get written after setting the value with
ZipEntry.setTime(). Looking at the Zip 2.2 src code it seems
like a number called "dos" time is getting written to the file.
So I guess the problem is that the ZipOutputStream needs to run
this dostime method before actually writing the time to the stream.
That seem fine, but what I do not understand is what value will be
returned by a call to ZipEntry.getTime() after the data has been
read or written to the stream. The JDK docs do not say anything
about it so I would assume that the value returned would be in
"java" time and not this "dos" time thingy. Anyone agree or disagree?

mo




More information about the kaffe mailing list