How has Serialization changed in the Java 2 SE SDK, v1.3?

Tim Rohaly

Serialization has improved in three key ways:

  1. Speed of reading and writing serialized objects was improved up to 40%. This also dramatically improves RMI performance.
  2. Limit of 64K on the size of strings has been removed. This entailed changes in the serialization protocol. Older versions of the Java SDK still can't read these long Strings, and will generate a java.io.StreamCorruptedExceptio if they encounter this new protocol.
  3. More specific information is reported when an exception occurs during deserialization. This is important for RMI because code movement and dynamic class loading are particularly hard to debug unless specific error messages are generated.