Java 2 SDK for Solaris Developer's Guide

Serialization Incompatibilities

Because of rare and infrequent problems with the format for Externalizable objects, it was necessary to make an incompatible change in Java 2 SDK for Solaris. A JDK 1.1.5 (or earlier) program throws a StreamCorruptedException when it tries to read an Externalizable object generated in Java 2 SDK for Solaris format. Programs based on JDK software version JDK 1.1.6 or later do not have this problem.

However, a new Java 2 SDK for Solaris API supports backward compatibility. To write streams in the old format, before doing any writes, call


ObjectOutputStream.useProtocolVersion(PROTOCOL_VERSION_1)