• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

externalization in java

anish jain
Ranch Hand
Posts: 129
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Scenario 1 :
I read that if we want to save some part of an object manually then we can override two methods i.e. writeObject(ObjectOutputStream) and readObject(ObjectInputStream)..and explicitly add the field manuaaly to ObjectOutputStream and default serialization process can go ob by invoking defaultWriteObject?()..

Scenario 2 :
somewhere I read abt Externalizable interface which has two method writeExternal() and readexternal() and can be used to control the serialization process..

Now, I m confused between the above two scenarios...Is both the scenarios same?

will be thankful for any help.....
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic