classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Question about ObjectOutputStream-Implementation


From: Linuxhippy
Subject: Question about ObjectOutputStream-Implementation
Date: Fri, 25 Mar 2005 21:45:16 +0100
User-agent: Mozilla Thunderbird 1.0 (X11/20041206)

Hi there!

I am working on implementing the writeUnshared(Object) method in ObjectOutputStream, however the comment-quality is so weak (there aren't simply any) and my java-knowledge is weak too, so I only have weak understanding of that wonderful code ;-)

I am especially focused on the following lines:
[code]
realOutput.writeByte(TC_OBJECT);
writeObject(osc);

if (replaceDone)
assignNewHandle(replacedObject);
else
assignNewHandle(obj);
[/code]

When are these methods called?
I was able to remove the handle-assigning all over the place, till this code-segment. If I commented out the if(replaceDon)-part I got ClassCast-Exceptions at deserialization-time.

Any help would be really welcome!

Thank you in advance, lg Clemens




reply via email to

[Prev in Thread] Current Thread [Next in Thread]