Why would I want to implement Externalizable instead of Serializable?

Andre van Dalen

By implementing Externalizable yourself you can win performance at the cost of flexibility and extra code to maintain. If you implement Externalizable yourself you stream the data directly without the need for reflection which is used in the case of Serializable.

See http://developer.java.sun.com/developer/TechTips/2000/tt0425.html for an example.

0 Comments  (click to add your comment)
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

About | Sitemap | Contact