Solved

I am trying to understand the private void readObjectNoData() customizable method in Serialization

Posted on 2010-11-20
1
1,454 Views
Last Modified: 2013-11-24
Can someone direct me to a working example of how this gets used.
I am still unsure exactly how this works supposedly if the super class of a class was not stored in the ObjectOutputStream and upon readObject() execuiting  somehow this kicks in either within the class being deserialized and/or its super class?

An example would really make this a lot clearer. Does anyone have such a sample source code file?
0
Comment
Question by:Robert Silver
1 Comment
 
LVL 92

Accepted Solution

by:
objects earned 500 total points
ID: 34181671
hard to give an example. Its to handle deserializing an object where the a superclass has been added since it was serialized. By default it will initialize the fields to default values. readObjectNoData() provides a hook to override this behaviour

http://www.informit.com/articles/article.aspx?p=417997&seqNum=8
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
The viewer will learn how to implement Singleton Design Pattern in Java.

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now