Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is Serialization and Deserialization conceptually? [duplicate]

Possible Duplicate:
What is object serialization?

Want to get idea behind the serialization and de-serialization of object.A simple example would be appreciated.

like image 318
Vral Avatar asked Apr 14 '11 07:04

Vral


People also ask

What is serialization and deserialization conceptually?

Serialization is a mechanism of converting the state of an object into a byte stream. Deserialization is the reverse process where the byte stream is used to recreate the actual Java object in memory. This mechanism is used to persist the object. The byte stream created is platform independent.

Which methods are used during serialization and deserialization process?

For serializing the object, we call the writeObject() method of ObjectOutputStream class, and for deserialization we call the readObject() method of ObjectInputStream class. We must have to implement the Serializable interface for serializing the object.

What is serialization and deserialization in machine learning?

Serialization refers to the process of converting a data object (e.g., Python objects, Tensorflow models) into a format that allows us to store or transmit the data and then recreate the object when needed using the reverse process of deserialization.

What is serialization with example?

In computing, serialization (US and Oxford spelling) or serialisation (UK spelling) is the process of translating a data structure or object state into a format that can be stored (for example, in a file or memory data buffer) or transmitted (for example, over a computer network) and reconstructed later (possibly in a ...


3 Answers

serialization - Turn data into a stream of bytes

deserialization - Turn a stream of bytes back into a copy of the original object.

like image 146
Peter Lawrey Avatar answered Oct 03 '22 11:10

Peter Lawrey


The objects created in java exists only while Java Virtual Machine is running...

Serialization - saving the created objects in the sequence of bytes...

Deserialization - Retrieving those saved bytes into the form of original object..

This article helps you to understand more... serialization

like image 25
Abhilash Avatar answered Oct 03 '22 10:10

Abhilash


Serialisation is the process of turning an object into a series of bytes for transferring or storing. Deserialization those same bytes and turns them back into objects.

like image 35
Jeff Foster Avatar answered Oct 03 '22 11:10

Jeff Foster