Java Serialization: Class 1


Table Of Contents:


1) Introduction
2) Object Graphs in serialization
3) Customized Serialization
4) Serialization with respect to inheritence
5) Externalization
6) Serial versionUID


1) INTRODUCTION:

Serialization:
a) The process of writing State of an Object to a file is called Serialization. But strictly speaking it is the process of converting an Object from java supported form to either File supported form or Network supported form.

b)
By using FileOutputStream and ObjectOutputStream Classes we can achieve Serialization.



De-Serialization:
a) The Process of reading state of an Object from a File is called DeSerialization. But Strictly Speaking it is the process of converting an Object from either File or Network Supported Form into Java Supoorted form

b) By using FileInputStream and ObjectInputStream Classes we can achieve.



Conclusion:
Serialization: saving state of an object to a file but above defination is strictly defined and use it.

Deserialization: reading state of an object from a file.


How to implement Serialiaztion:
steps:
a) create a file outputstream. If we have binary form of object.

b) if we want to save object directly to .ser file then Create Object outputStream.

                                                                                                                                                 Next Class

Share on Google Plus

About Unknown

This is a short description in the author block about the author. You edit it by entering text in the "Biographical Info" field in the user admin panel.

0 comments:

Post a Comment