It's not a secret anymore!*
The moose likes I/O and Streams and the fly likes Is Serialization like taking a picture of memory cells content? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Java » I/O and Streams
Bookmark "Is Serialization like taking a picture of memory cells content?" Watch "Is Serialization like taking a picture of memory cells content?" New topic
Author

Is Serialization like taking a picture of memory cells content?

Majid Al-Fifi
Ranch Hand

Joined: Aug 22, 2006
Posts: 45
Hi all,

By saving an object to a file and looking to binary data in that file, it seems like it is the same as the data in the heap.

can I say that data in this file is a copy of the binary data representing my objects and relationships between them in the memory?

to what extent am I right?

Thanks,
Majid


SCJP1.4, SCWCD1.4
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24183
    
  34

Not at all. The serialization data format is not a dump of the heap. You can learn about the format here.


[Jess in Action][AskingGoodQuestions]
Rahul Bhattacharjee
Ranch Hand

Joined: Nov 29, 2005
Posts: 2308
Serialization doesnot copy the object byte by byte from heap to file.Rather it copies enough information from the object that would be required to reconstruct the object again from the file.


Rahul Bhattacharjee
LinkedIn - Blog
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Is Serialization like taking a picture of memory cells content?