Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2010-11-20
1
Medium Priority
?
1,570 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Build and deliver software with DevOps

A digital transformation requires faster time to market, shorter software development lifecycles, and the ability to adapt rapidly to changing customer demands. DevOps provides the solution.

Question has a verified solution.

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

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ā€¦
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilationā€¦
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.
Suggested Courses

722 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