Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

What is the Stream Unique IDentifier (SUID) that is written out as part of the serial stream?

0
Posted

What is the Stream Unique IDentifier (SUID) that is written out as part of the serial stream?

0

Location: http://www.jguru.com/faq/view.jsp?EID=5060 Created: Jan 15, 2000 Author: Govind Seshadri (http://www.jguru.com/guru/viewbio.jsp?EID=14) The serialization process uses a unique identification value to keep track of the persisted objects. When a Serializable or Externalizable object is saved, it’s fully-qualified class name and the Stream Unique IDentifier (SUID) of the class is written out to 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 step is important as it 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.

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123