This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
Please refer example on page 467 of Kathy Seirra and Bert Bates SCJP 6 Book. following is a part of the code from the example on the aforementioned page.
My question is that when we are serializing the dog object the serialization system calls the callback private writeObject method and passed it the ObjectOutputStream. but when we did os.writeInt(theCollar.getCollarSize()); how did it know which Dog's object Collar we are talking about, because we are not passing any dog reference explicitly or implicitly. ???
Even though this objective is removed from the exam, object serialization and deserialization are very useful in Java remote method invokcation (RMI).
When a client passes an object to a server over the network, the object has to be serialized. When the server receives it, it has to deserialize it.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com