Win a copy of The Journey To Enterprise Agility this week in the Agile and Other Processes forum! And see the welcome thread for 20% off.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Junilu Lacar
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Ganesh Patekar
  • Tim Moores
  • Pete Letkeman
  • Stephan van Hulst
Bartenders:
  • Carey Brown
  • Tim Holloway
  • Joe Ess

difference between Serializaton and Externalization  RSS feed

 
Ranch Hand
Posts: 129
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In Externalization we can override readExternal() and writeExternal() to control the serialization process
In Serialization we can override readObject() and writeObject() also to control the serialization process...

I am a bit confused between these two...Could any one please let me know what's the actual difference between these two? and which one to use when?

Any help will be highly appreciated?
 
Bartender
Posts: 4519
50
Eclipse IDE Firefox Browser Java MySQL Database VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
See: http://geekexplains.blogspot.com/2008/06/diff-between-externalizable-and.html
 
anish jain
Ranch Hand
Posts: 129
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Could anybody please help me in understanding the difference between serialization and externalization with some Java code?
 
Bartender
Posts: 4181
22
IntelliJ IDE Java Python
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
See this thread, posted just a little while ago:
http://www.coderanch.com/t/526312/java/java/Serialization-Vs-Externalization

In that thread there is a link to a tutorial with code. It is a good place to start learning.
 
anish jain
Ranch Hand
Posts: 129
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Steve Luke wrote:See this thread, posted just a little while ago:
http://www.coderanch.com/t/526312/java/java/Serialization-Vs-Externalization

In that thread there is a link to a tutorial with code. It is a good place to start learning.



As far as I could understand, it is only telling that by using Externalization we can control the process but if i am not wrong then by overriding readObject() and writeObject() in Serializable we can also achieve the same thing as with readExternal() and writeExternal() of Externalizable..


So how do they differ?

Could you please explain me with use of some Java code
 
anish jain
Ranch Hand
Posts: 129
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Carey Brown wrote:See: http://geekexplains.blogspot.com/2008/06/diff-between-externalizable-and.html



As far as I could understand, it is only telling that by using Externalization we can control the process but if i am not wrong then by overriding readObject() and writeObject() in Serializable we can also achieve the same thing as with readExternal() and writeExternal() of Externalizable..


So how do they differ?

Could you please explain me with use of some Java code
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!