aspose file tools*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Serialization and Externalization 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 and Externalization" Watch "Serialization and Externalization" New topic
Author

Serialization and Externalization

Madhawi Maurya
Ranch Hand

Joined: Aug 22, 2007
Posts: 42
what is the use and difference between Serialization and Externalization?


SCJP1.5 with 90%
Phal Ach
Ranch Hand

Joined: May 09, 2008
Posts: 54
Serialization is a process of saving objects state into sequence of bytes and sending that object through the stream. So that it can be reused as it is later.

Externalization is the process used mainly during internationalizing your program. Here some fixed values are stored in some text like files called property files. This is used to simplyfy your program by removing String literals and keep them in property file.
Krishna Srinivasan
Ranch Hand

Joined: Jul 28, 2003
Posts: 1844

http://java.sun.com/developer/TechTips/2000/tt0425.html


Krishna Srinivasan
Spring Tutorials, OCAJP Mock Questions, 400+ OCPJP Mock Questions
satishkumar janakiraman
Ranch Hand

Joined: May 03, 2004
Posts: 334
Originally posted by Phalguni Bhatt:
Serialization is a process of saving objects state into sequence of bytes and sending that object through the stream. So that it can be reused as it is later.

Externalization is the process used mainly during internationalizing your program. Here some fixed values are stored in some text like files called property files. This is used to simplyfy your program by removing String literals and keep them in property file.



Not exactly correct. Externalization is not used for internalization. Externalization is also a serialization technique which gives you more control in the serialization process. You can serialize the required attributes not all attributes in a class.
akhilesh pandey
Greenhorn

Joined: Jun 03, 2008
Posts: 17
Yes Satish,
I think you are right.Externalization is basically used to give modification to the serialized objects like..compressing them,encoding,encrypting etc.....
Dinesh Tahiliani
Ranch Hand

Joined: Aug 06, 2007
Posts: 486
Is Externalization is similar to desaeralizing the object??


Thanks<br />Dinesh
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41869
    
  63
Is Externalization is similar to deserializing the object?


Externalization and serialization mean the same thing. The difference between the Serializable and Externalizable interfaces is described in the article Krishna linked to.


Ping & DNS - my free Android networking tools app
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Serialization and Externalization