View RSS Feed

Recent Blogs Posts

  1. Serialization

    by , 03-09-2012 at 07:50 PM
    If the interface is being implemented by the Singleton class ( when serialization and deserialization of singleton takes place more than one time) then number of Singleton instances will be created. For avoiding this, implement the readResolve method.
    Java Code:
    	public class Singleton implements Serializable {
    		// This method is called immediately after an object of this class is deserialized.
    		// This method returns the singleton instance.
    Singleton Pattern
  2. Serialization

    by , 01-08-2012 at 12:33 PM
    Reading or writing an object is called serialization. It saves an object sate which can be restored at a later stage. Implement the interface to make a class serializable. This interface is also called marker interface. It supports object persistence to a file.

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


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

    by , 11-08-2011 at 07:04 PM (My Java Tips)
    Serialization is the process of saving the state of an object onto any storage medium. Storage medium can be a file or a memory buffer. Then you can transmit it across a network, either in binary form, or in some human-readable text format such as XML. The object in the form of bytes or any other format can be recreated to its internal state easily. The process of serializing an object is also called Marshalling an object. Extracting a data structure from a series of bytes, is Deserialization ...
    Java SE