Externalizable is an interface that enables you to define custom rules and your own mechanism for serialization. Serializable defines standard protocol and provides out of the box serialization capabilities. Externalizable extends Serializable. Implement writeExternal and readExternal methods of the Externalizable interface and create your own contract / protocol for serialization. Saving the state of the […]
Published to Core Java Tutorial on 15/01/2012.
serialVersionUID is used to ensure that during deserialization the same class (that was used during serialize process) is loaded. This is a one line definition to explain why a serialVersionUID is used? Apart from the above definition there are quite a few things to learn from this serialVersionUID. As per javadocs, following is format of […]
Published to Core Java Tutorial on 08/01/2012.
Do you know how to customize the default behaviour of the serialization protocol? Tom Cruise starrer MI4 hits theatres this week in India and we experience unusual media frenzy. In no way this is realted but by impulse I mention about MI4 here. In this article I am going to write on how to customize […]
Published to Core Java Tutorial on 18/12/2011.
My previous article on exploring java serialization is a box office hit. In continuation to that and popular request, I am going to write on how instances are created during serialize and de-serialize process. There is a mystery. If you strongly believe that the constructor of a class is called everytime when an object is […]
Published to Core Java Tutorial on 11/12/2011.
In recent days generalization have become popular in software development. You build a common platform and generate applications out of it to reduce the cost. In such applications an activity that will be frequently performed is serializing java objects to database. There are many fancy tools and framework available to do this. Before using all […]
Published to Core Java Tutorial on 09/01/2010.
Have you ever seen what is inside a serialized object? I will explain you what is java serialization, then provide you with a sample for serialization. Finally most importantly, lets explore what is inside a serialized object and what it means. That is internals of java serialization and how does it works. If you want […]
Published to Core Java Tutorial on 23/11/2009.