O'Reilly logo

Component Development for the Java™ Platform by Stuart Dabbs Halloway

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

4.4. Matching Streams with Classes

Serialization may involve loading classes if the instance being deserialized is of a type not already present in the virtual machine. The design for how classes are loaded is simple. The common case works without any special effort on the part of the programmer; the current class loader is simply asked to load the class whose name matches the class name in the serialization stream.

When deserialization triggers class loading, there are two problem cases to worry about. When the runtime attempts to load a class to deserialize an object, it might find a different version of the class than the one that serialized the object, or it might not find the class at all. This section will cover the former problem; the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required