[kaffe] Misc. serialization patches
Mattias Rehnberg
Mattias.Rehnberg at home.se
Tue Nov 2 10:44:37 PST 2004
Hi,
Refering to the document at the URL below, 'classdata' will be writen on the form 'wrclass objectAnnotation' if it has a write method instead of just 'nowrclass'. Since objectAnnotation is a least an endBlockData byte, you'll get that byte when you try to deserialize the next object in the stream.
I found this when I tried to deserialize a stream of two Vectors written with Sun's Java, the first one deserialized ok, but the second one gave me a null reference.
http://java.sun.com/j2se/1.4.2/docs/guide/serialization/spec/protocol.html
Best Regards,
Mattias
-----Original Message-----
From: Guilhem Lavaux <guilhem at kaffe.org>
To: Mattias Rehnberg <Mattias.Rehnberg at home.se>
Date: Tue, 02 Nov 2004 19:11:49 +0100
Subject: Re: [kaffe] Misc. serialization patches
Mattias Rehnberg wrote:
> Sorry, that file was corrupt even before it was archived. Didn't notice that because the beginning of it was ok.
>
> /Mattias
Thanks. Just one question: I don't remember why we should call
defaultWrite/ReadObject in Vector. The logic behind this call is the
same as if there would not be any write/readObject. BTW, these two
patches concerning the core java library have to go to
classpath at gnu.org. As they are two lined I don't think you'll need
paperwork. ;)
Thanks,
Regards,
Guilhem.
>
> -----Original Message-----
> From: Guilhem Lavaux <guilhem at kaffe.org>
> To: Mattias Rehnberg <Mattias.Rehnberg at home.se>
> Date: Tue, 02 Nov 2004 08:15:18 +0100
> Subject: Re: [kaffe] Misc. serialization patches
>
> Mattias Rehnberg wrote:
>
>>Vector.diff:
>>Adds read- and writeObject functions to java.util.Vector to make it match the serialized form of Sun's class
>>
>>ObjectOutputStream.diff:
>>Moves the assignment of the class handle to after the assignment of class descriptor handle
>>
>>ObjectInputStream.diff:
>>Uses the correct class not just to get the field address (which Noa fixed), but also to check if the field is static or not.
>>
>>/Mattias
>
>
>
> Hi Mattias,
>
> Could you resubmit your patch (in clear form maybe) ? It seems there is
> a problem in the tgz I cannot find the data for ObjectInputStream.diff.
>
> Thanks,
>
> Regards,
>
> Guilhem.
>
>
>
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> kaffe mailing list
> kaffe at kaffe.org
> http://kaffe.org/cgi-bin/mailman/listinfo/kaffe
More information about the kaffe
mailing list