I got to know from the
ObjectOutputStream docs, that while writing the object to the file, the default serialization mechanism for an object writes the class of the object, the class signature, and the values of all non-transient and non-static fields. I have an issue where the class name has been changed after writing the object to the file and when I use the below code to read the values, its throwing a classNotFound exception. I would like to know if there is a way, I can handle this exception, i.e once it comes to the exception block, can I replace the classname in the object that is being read to the new class name and make it work ?
Any help on this is much appreciated. Thanks in Advance