See which of your colleagues or former colleagues are already on Java Link: Check out the Contact Finder
News »Browse Articles » The Java serialization algorithm revealed
0
Vote Vote

The Java serialization algorithm revealed

Views 3 Views    Comments 0 Comments    Share Share    Posted 21-10-2009  

Serialization is the process of saving an object`s state to a sequence of bytes; deserialization is the process of rebuilding those bytes into a live object. The Java Serialization API provides a standard mechanism for developers to handle object serialization. In this tip, you will see how to serialize an object, and why serialization is sometimes necessary. You`ll learn about the serialization algorithm used in Java, and see an example that illustrates the serialized format of an object. By the time you`re done, you should have a solid knowledge of how the serialization algorithm works and what entities are serialized as part of the object at a low level.
Why is serialization required?

In today`s world, a typical enterprise application will have multiple components and will be distributed across various systems and networks. In Java, everything is represented as objects; if two Java components want to communicate with each other, there needs be a mechanism to exchange data. One way to achieve this is to define your own protocol and transfer an object. This means that the receiving end must know the protocol used by the sender to re-create the object, which would make it very difficult to talk to third-party components. Hence, there needs to be a generic and efficient protocol to transfer the object between components. Serialization is defined for this purpose, and Java components use this protocol to transfer objects.
............

Source:
http://www.javaworld.com/community/node/2915
0
Vote  Vote
Enter your comment:
No Comments For This News

Search News

What's the News?

Post a link to something interesting from another site, or submit your own original writing for the Java community to read.

Most Popular News

Most Recent User Submitted News