Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

What is deserialization and how do we do deserialization?

Answer Posted / javamasque

Deserialization is a process of retrieving object from byte stream. We have to fallow below steps for de-serialization
1. The object to be serialized need to implement java.io.Serializable interface.
2. It will use Java’s default serialization mechanism.
3. Generate serial version id for that serializable object.
4. Only default constructor is applicable to all class hierarchy (from child to all super classes if any). It is necessary at deserialization otherwise throw InvalidClassException.
5. Generate serial version UID for all super classes in hierarchy (all super classes if any) otherwise the properties of all its super classes will be assigned to its default value during deserializtion.
6. ObjectInputStream is used to read [readObject()] object.
7. FileInputStream is used to read from flat file.
8. The flat file extension should be (<file-name>.ser)

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is toarray method in java?

1169


Why are getters and setters used?

1105


Can you add null to a list java?

1112


Which is better 64 bit or 32 bit?

987


I want my class to be developed in such a way that no other class (even derived class) can create its objects. How can I do so?

1032


if u open login & logout ,how can udisplay the timelogin & logout members ?

2323


What are different types of expressions?

1197


How java enabled high performance?

1094


How do you convert int to char in java?

1126


What is the exact difference in between Unicast and Multicast object? Where will it be used?

1109


What is a treeset class?

1063


Is null or empty java?

1036


What do you know about java?

1014


What is a parameter example?

1031


What is the purpose of the system class in java programming?

1189