|
- The serialization process uses a unique identification value to keep track of the persisted objects.
- When a Serializable or Externalizable object is saved, its fully qualified class name and the Stream Unique Identifier (SUID) of the class is written out of the stream.
- The SUID is a unique 64 bit hash and is obtained by applying the SHA – 1 message digest algorithm to the serialized class, including its name, field types and method signatures.
-
This steps is important as its prevents the data persisted by one class from being read by another class with the same name.
-
For any class to be able to read successfully from an object stream, it is imperative that its SUID matches the SUID of the serialized data in the stream.
|