Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Who are writeReplace, readResolve ?  RSS feed

 
Costa lamona
Ranch Hand
Posts: 102
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
writeReplace, readResolve,

1- I don't know If I understand those well
Why I need an another instance of a class while another instance of the same class is being read or writen, Why I don't just use a new instance, or clonning ?

2- Why I need the public readExternal while I have private readObject ?

give me an example for 1 & 2, please.

3- Explain how serialization Process is done internally ?

Thanks
 
Ernest Friedman-Hill
author and iconoclast
Sheriff
Posts: 24217
38
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
These are big questions, and it takes a big document to answer them. No need to repeat that information here.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!