View RSS Feed

Java Basic

Serialization

Rate this Entry
by , 01-08-2012 at 11:33 AM (1421 Views)
Reading or writing an object is called serialization. It saves an object sate which can be restored at a later stage. Implement the java.io.Serializable interface to make a class serializable. This interface is also called marker interface. It supports object persistence to a file.

Name:  56.JPG
Views: 950
Size:  19.3 KB

Serialization


If you do not want to serialize an object then mark it as transient. Serialization can affect performance in following ways:

Depends on reflection.
Has an incredibly verbose data format.
Is very easy to send surplus data.

If you want to send an object over network or want to save its state to a file then use it otherwise do not use it as it has performance issues.

Submit "Serialization" to Facebook Submit "Serialization" to Digg Submit "Serialization" to del.icio.us Submit "Serialization" to StumbleUpon Submit "Serialization" to Google

Categories
Serialization

Comments