Java Serialization

Recent Articles

Externalizable vs Serializable

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 in Java Serialization

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.

Customize Default Serialization Protocol

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.

Object Construction in Serialization

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.

Serialize / De-Serialize Java Object From Database

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.

Java Serialization

Have you ever seen what is inside a serialized object? I will explain to you what is java serialization, then provide you with a sample for serialization. Finally, most importantly, let us explore what is inside a serialized object and what it means. That is internals of Java serialization and how does it works. If […]
Published to Core Java Tutorial on 23/11/2009.