Thursday, May 29, 2008

Java Externalizable

Background
  • Interface: java.io.Externalizable
  • Super Interface: Serializable
  • Used to control how you want to do serialization (read/write)
  • Scenario: Some of the fields may not worthy of writing, or the format needs to be changed etc.
  • transient keyword simply instructs JVM not to read/write a variable, one at a time.
  • With Externalization, you can control all variables in one place.
  • During de-externalization, the default constructor will be called. Then readExternal(...) will be called.
Java Methods
  • readExternal(ObjectInput in)
  • writeExternal(ObjectOutput output)
Link
  1. http://articles.techrepublic.com.com/5100-10878_11-6159276.html

3 comments:

Java Thinking... said...

Hello !

Could you please tell me about Externalizable....

Java Thinking... said...

Hello !

Could you please tell me about Externalizable....

Java Thinking... said...

Hi
I gone throw blog.that was quit great..

With regards
abhi