• Post Reply Bookmark Topic Watch Topic
  • New Topic

Externalizable interface  RSS feed

 
ragi singh
Ranch Hand
Posts: 198
Oracle Suse
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all ,

Can anyone explain externizable interface in java
 
Seetharaman Venkatasamy
Ranch Hand
Posts: 5575
Eclipse IDE Java Windows XP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
when you need a custom serialization, then you can go for Externalizable. however still you can do the custom serialization with serializable interface by defining readObject and writeObject.

The diference is that, Externalizable is not a marker interface .more over,In Serializable interface implementation, state of super classes are automatically taken care by the default implementation whereas in case of Externalizable interface the implementing class needs to handle everything on its own as there is no default implementation in this case.

*implements Externalizable* may tell a user that there is no default serialization implementation.
 
ragi singh
Ranch Hand
Posts: 198
Oracle Suse
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you please explain it with the help of an example
 
Goerch Mosi
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello ragi,
as I was a little bit uncertain about externalizable myself I googled for it and found this little but helpfull example.
 
Seetharaman Venkatasamy
Ranch Hand
Posts: 5575
Eclipse IDE Java Windows XP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to JavaRanch Goerch Mosi
 
Goerch Mosi
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Seetharaman Venkatasamy wrote:Welcome ...


Thank you Seetharaman.
 
Bert Bates
author
Sheriff
Posts: 8954
17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is a good Java topic, but it's not on the exam.

hth,

Bert
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!