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
Which is the default http method for an action method?
When using razor views, do you have to take any special steps to protect your asp.net mvc application from cross site scripting (xss) attacks?
How does the .net framework 3.0 relate to windows vista?
What is entitytypes? : Entity framework
what is deferred loading(lazy loading)?
what is use of entity container?
what is ssdl?
Explain how to use multiple submit buttons in ASP.Net MVC?
What are the new features 3.5 framework against with the tool?
Mention what is the difference between “ActionResult” and “ViewResult” ?
Can you explain renderbody and renderpage in asp.net mvc?
How to change the action name in mvc?
What is disconnected scenario? : Entity framework
How the ‘page lifecycle’ of ASP.Net MVC does works?
What is action methods in web api?