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.

Whats the difference between the SUID (Stream Unique IDentifier) and the private static member serialVersionUID?

0
Posted

Whats the difference between the SUID (Stream Unique IDentifier) and the private static member serialVersionUID?

0

Location: http://www.jguru.com/faq/view.jsp?EID=236482 Created: Oct 25, 2000 Modified: 2000-10-25 11:19:34.19 Author: Tim Rohaly (http://www.jguru.com/guru/viewbio.jsp?EID=10) Question originally posed by Declan Shanaghy (http://www.jguru.com/guru/viewbio.jsp?EID=109967 The SUID is one of a number of things that the serialization protocol writes to the stream in addition to the serialized object (other things include a magic number and the fully- qualified class name of the object). SUID is not the same as the static variable serialVersionUID, although SUID is computed using that field, if it exists. In psuedocode, if (serialVersionUID is defined) then SUID is set equal to serialVersionUID else SUID is computed algoritmically Because serialVersionUID is a static member, it is not written to the stream as part of the serialized object. Instead, serialization uses the serialVersionUID to compute the SUID. The SUID is then sent to the stream as part of the stream protocol, not as part of

What is your question?

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

Experts123