| Author |
Serialization details reqd.
|
Kunaal A Trehan
Ranch Hand
Joined: Feb 04, 2004
Posts: 63
|
|
Hi All, 1.Consider a case where we are serializing an object on one machine and transporting to some other machine.On the other side besides class files,what all information do we need? 2.Another case lets suppose we are serializing an object and transporting to some other machine.But there class file does not conatin one method which that serialized object has.So in this case some exception wud be thrown.But will that exception wud be thrown when method call is invoked or when object is recreated. Rgds Kunal
|
 |
William Brogden
Author and all-around good cowpoke
Rancher
Joined: Mar 22, 2000
Posts: 12268
|
|
1. The class files for all of the objects serialized - the serialVersionUID in each must match that in the machine that wrote the object. 2. If the serialVersionUID's don't match you get an immediate InvalidClassException. If you force the serialVersionUIDs to match you would get another exception when the method was invoked. See the discussion of java.io.Serializable in the JavaDocs Bill
|
Java Resources at www.wbrogden.com
|
 |
 |
|
|
subject: Serialization details reqd.
|
|
|