This week's book giveaway is in the OCAJP 8 forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line!
See this thread for details.
The moose likes I/O and Streams and the fly likes Object Serialization Process? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Java » I/O and Streams
Bookmark "Object Serialization Process?" Watch "Object Serialization Process?" New topic
Author

Object Serialization Process?

scott miles
Ranch Hand

Joined: Jun 16, 2011
Posts: 70
Object serialization is the process of saving an object's state to a sequence of bytes.
Does it saves only the instance variable or also the object methods(like getter and setter methods) ?
Once we we write the object to outputstream or some text file how does it get transmitted over network?
Do we write the object in a text file right?
Ulf Dittmer
Rancher

Joined: Mar 22, 2005
Posts: 42958
    
  73
Serialization is just about data, not methods. Also, static data is not included, since that is class behavior, not object behavior.

Whether it's a text file or a binary file depends on the method of serialization. In the Java world, most commonly it refers to binary serialization using the Object[In|Out]putStream classes. But if the objects conform to the JavaBeans standard, it's also possible to use the XML[En|De]coder classes, which produce a textual representation in XML.
Darryl Burke
Bartender

Joined: May 03, 2008
Posts: 5045
    
  10

Hi scott and welcome to the Ranch! We don't have too many rules here, but we do ask that you BeForthrightWhenCrossPostingToOtherSites
http://forums.oracle.com/forums/thread.jspa?threadID=2239994


luck, db
There are no new questions, but there may be new answers.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Object Serialization Process?
 
It's not a secret anymore!