Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2010-11-20
1
Medium Priority
?
1,599 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 2000 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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
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…
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
Suggested Courses

972 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