aspose file tools*
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
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
Marshal

Joined: Mar 22, 2005
Posts: 41526
    
  53
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.


Ping & DNS - my free Android networking tools app
Darryl Burke
Bartender

Joined: May 03, 2008
Posts: 4529
    
    5

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.
 
 
subject: Object Serialization Process?