27

Possible Duplicate:
What is object serialization?

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

2
  • Many questions have already been answered on SO, please use the search - you may find your answer instantly. Commented Apr 14, 2011 at 7:44
  • 1
    FYI, serialization and de-serialization also exists elsewhere, not only in Java ;) Commented Apr 14, 2011 at 7:47

3 Answers 3

26

serialization - Turn data into a stream of bytes

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

Sign up to request clarification or add additional context in comments.

2 Comments

Right, but when you say turn "data" into a "stream of bytes", what is "data"? Since computers represent everything as bytes, isn't "data" also, well, bytes? So you are transforming some bytes to other bytes. It needs more explanation than that.
@RafaelEyng data is not always in a form which can be streamed. e.g. if you have a object which contains a reference, that reference as bytes is of no use if you stream it. instead you have to stream the data referenced.
6

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

1 Comment

The link is not correct I think
3

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.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.