• Post Reply Bookmark Topic Watch Topic
  • New Topic

Serialization  RSS feed

 
rachna jain
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

While implementing serialization if some attribute is removed from object which is already serialized then will deserialization automatically adjust that.

My understanding

deserialization will return exactly what has been serialized and how we will find out if that is same by serialversion id.

Please confirm my understanding.

Also can we store object in one column of table while other column contain primitves..if yes how?


Thanks
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If the serialized data changes, then the serial version ID should change, and then deserialization using the old class will no longer work. If you want to avoid many of binary serialization's problems, consider having your object follow JavaBean conventions, and use XML serialization using the java.beans.XMLEncoder and XMLDecoder classes.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!