Meaningless Drivel is fun!*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes serialization Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "serialization" Watch "serialization" New topic
Author

serialization

Venkat Ramsimha
Ranch Hand

Joined: Dec 28, 2004
Posts: 127
serialization saves an object so that it can be reanimated later by deserializing it back to full objectness.

what actually is serialization and what is its functionality

thanks
venkat
Alex Belisle Turcot
Ranch Hand

Joined: Apr 26, 2005
Posts: 516
Hi,

you pretty much said what is was for in your post.
I used it for a program where we had to save the state, the position of the windows, everything.

You want to be able to write the whole content of objects and be able to re-create them at another time (maybe in the lifetime of the program, or maybe for next time you run it). You can serialize the objects into a file and read the file later on to deserialize the data into objects.

Also, you could use Serialize to pass objects through a socket. On the other side of the socket, they would received serialized objects (It might not be the best idea because then your server and client an coupled together.)
I'm not no sure about this one, what would be the best thing to do.

Maybe someone else can give his opinion, I would very much like to know myself.

Just so you understand, a poor alternative of Serializing would be to manually write every field into a file, and later on read every field and re-create the object and set every field.

Can anyone please confirm what I said about serializing...

Thanks,
Alex
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: serialization