What is serialization ?

Answer Posted / nithya.r

serialization is the process of converting an object into a
sequence of bits so that it can be stored on a storage
medium (such as a file, or a memory buffer) or transmitted
across a network connection link. When the resulting series
of bits is reread according to the serialization format, it
can be used to create a semantically identical clone of the
original object. For many complex objects, such as those
that make extensive use of references this process is not
straightforward.
Serialization is a mechanism by which you can save the
state of an object by converting it to a byte stream.
Two types:
1.Binary Serializable
2.XML Serializable
Methods:
The serializable interface is an empty interface,
it does not contain any methods. So we do not implement any
methods.
Use:
Whenever an object is to be sent over the network,
objects need to be serialized. Moreover if the state of an
object is to be saved, objects need to be serilazed.
Externalizable:
Externalizable is an interface which contains two
methods readExternal and writeExternal. These methods give
you a control over the serialization mechanism. Thus if
your class implements this interface, you can customize the
serialization process by implementing these methods.

Is This Answer Correct ?    23 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what is csdl?

584


What is partialview in asp.net mvc?

593


What is stateless model?

510


Why we need a separate mobile project template, while we can render our web application in mobile ?

586


What is the advantage of using asp.net routing?

593






How does work clr?

529


Explain what platforms does the .net framework run on?

546


What is clr? How does work clr & wht is work of clr?

555


Possible ways to prevent xss attacks on mvc application?

571


What are sections?

571


What is entity client data provider? : Entity framework

541


What are the new enhancements done in default project template of asp.net mvc 4?

578


What are differences between entity framework and l2s? : Entity framework

645


Explain the methods used to render the views in mvc?

547


What is tempdata?

611