message from the forums but I could not reply to it because it is too
old. However I had a copule of questions.
1. Where is the documentation for Custom Serialization that Miguel
referred to in the post?
2. Do I have an option to implement just the method I need e.g. for my
use case, I just want to customize the instantiation of the object to
initialize some static variable that depends on the values of certain
instance variables?
3. Can I call default serialization methods where I dont wish to write
code for serializing/deserializing every field/member in the object.
For instance in Java, if you have an object you wish to customize
serialize (if only slightly), you implement the method readObject as
follows
private void readObject(java.io.ObjectInputStream stream) throws
IOException, ClassNotFoundException {
//Set some transient of static member varialble to value you
wish
MyClass.mystaticVariable = 1;
//then call the default serializer to do the rest instead of
having to write the code for all member varialbles
stream.defaultReadObject();
}
Thanks Miquel or Anyone who wishes to weigh in.
Melody