• Post Reply Bookmark Topic Watch Topic
  • New Topic

what is externalization?  RSS feed

 
kiran madhan
Ranch Hand
Posts: 34
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I know somewhat about serialization....but what is externalization ...can anybody give nice example...?
 
Stephan van Hulst
Saloon Keeper
Posts: 7993
143
  • Likes 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In Java, a class that is Externalizable has more control over how it is serialized. The serialization mechanism normally determines its own format when it serializes an object, but an object that is Externalizable defines a custom format by manually manipulating the output.


Now, let's make Book Externalizable:

We now have much more control over what data we write and how we write it. The downside is that our members can no longer be final, and we needed to add a no-arg public constructor.
 
kiran madhan
Ranch Hand
Posts: 34
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks a lot for your huge coding explanation...!
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!