In an effort to help you get the most from our forums, we've compiled a list of tips for asking questions here. You can find the list in our FAQ section here. In particular please see: Carefully Choose One Forum/
Think of serialization any time you want to send an object over some path that isn't a real method call. As mentioned before you can send that byte stream to another computer over the network whether RMI, raw sockets or JMS, write it to a file or a database, or whatever you need.
Java's "serialize" operation generates a special Java format, but we use the word "serialize" to talk about converting your object to and from XML or CSV or delimited strings or any other format.
A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
The real use of serialization is whenver you are transfering some data on the n/w. Lets say that there is an application that works with Mobile and server . The mobile phone acts as the client for such application. Now in this case if the mobile/user request some data from the server on the device , then the data that is sent from the server must be in the exact order as it was on the server . Thus to achieve this goal serialization is required.
Serialization is a very important concept. This proves a bliss in java when we are transferring data over network. Object serialization helps us when we need to transfer a file to a remote location. A serialize object is converted to a Byte Stream say a ByteArray then the recieving end converts the byte array to an object by deserializing the same.
So, just curious, what happens if an object (MyNeatClass version 1.0) is serialized and then before deserialized, someone installs a newer version of the class (MyNeatClass version 1.1) on the system? How does deserialization handle that? Thanks.
Joined: Dec 31, 2004
Well, Chris, what happens may depend on several things.