Solved

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

Posted on 2010-11-20
1
1,476 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

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Python Assistance 7 73
unix in java example 9 53
Responding to Java JComponent extended classes's resize event 4 52
JList custom Cell Renderer refresh 15 53
Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
I had a project requirement for a displaying a user workbench .This workbench would consist multiple data grids .In each grid the user will be able to see a large number of data. These data grids should allow the user to 1. Sort 2. Export the …
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.

895 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

17 Experts available now in Live!

Get 1:1 Help Now