answersLogoWhite

0

Primary purpose of java serialization is to write an object into a stream, so that it can be transported through a network and that object can be rebuilt again. When there are two different parties involved, you need a protocol to rebuild the exact same object again. Java serialization API just provides you that. Other ways you can leverage the feature of serialization is, you can use it to perform a deep copy.

Why I used 'primary purpose' in the above definition is, sometimes people use java serialization as a replacement for database. Just a placeholder where you can persist an object across sessions. This is not the primary purpose of java serialization. Sometimes, people say that java serialization is used for storing (to preserve the state) an object and retrieving it. They use it synonymously with database. This is a wrong perception for serialization.

User Avatar

Wiki User

13y ago

What else can I help you with?

Related Questions

Can you serialize the ArrayList class in Java?

The ArrayList class itself is serializable and will serialize if it contains only serializable objects.If, however, you add non-serializable objects into the list then it will not serialize, but will throw a NotSerializableException.


What is exteranalizable in java?

Externalizable interface is a subclass of Serializable. Java provides Externalizable interface so as to give you more control over what is being serialized and what is not. Using this interface, you can Serialize only the fields of the class you want serialize and ignore the rest. This interface defines 2 methods: readExternal() and writeExternal() and you have to implement these methods in the class that will be serialized. In these methods you'll have to write code that reads/writes only the values of the attributes you are interested in. Programs that perform serialization and deserialization have to write and read these attributes in the same sequence


What is the meaning of the word GUI in java?

Graphical User Interface http://en.wikipedia.org/wiki/Graphical_user_interface (there is no special meaning in Java, "GUI" is universally used)


What is literal in java programming?

Literal in java are L, F, null, true, false These act as keyword(have special meaning in java) but these does'nt comes under the category of Java Keyword.


What is the meaning of a method in Java programming?

a method is a variable


What are some nicknames for coffee?

* Joe * java * 'bucket of mud' ... meaning cup of coffee


What is the meaning of the 2 in j2ee?

Java 2 Platform Enterprise Edition. The 2 means that it is Java number 2.


What does the abbreviation JAVA stand for?

The name Java is not an acronym. The Development Team of Java has just chosen this name. The name Java specifically doesn't have any meaning rather it refers to the hot, aromatic drink COFFEE.


What is the meaning of deplyoment IN JAVA?

Deployment is the process of copying the compiled Java classes to a server or client. Once deployed, the server is able to run those classes (as in Java servlets), or serve those files to clients (as in Java applets), or be executed as programs (as in Java desktop applications).


What is the meaning of stand alone apps in java?

They stand alone. Forever alone.


What is the exact meaning of rich java client platform?

A Rich Java Client Platform i.e. Rich Client Platform (RCP) is a specialized computer program anticipated for the creation of Java applications built on the Eclipse architecture.


Where is the engine serial number on a 1962 Ford Thunderbird?

Ford did not serialize the engine blocks or heads.