• Post Reply Bookmark Topic Watch Topic
  • New Topic

What and why can't be serialized?  RSS feed

 
Guennadiy VANIN
Ranch Hand
Posts: 898
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

From �Java Programming Language� SL-275. Sun microsystems. Revision C.1, Sept. 1999, p.14((Stream I/O and Files))-25
_______________________________________
�Some object classes are not serializable because the data they represent are constantly changing; for ex., java.io.FileInputStream and java.lang.Thread�.

Everything in this world is changeable, and this phrase causes two my questions:

  1. why cannot I save the state of the object at the moment of serialization?
  2. what does Sun means by constancy of objects in case when objects are serializable?

 
Valentin Crettaz
Gold Digger
Sheriff
Posts: 7610
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The Java tutorial gives a fairly good explanation of why it is not advised to serialize everything... Read it, it's worth it.

HIH
------------------
Valentin Crettaz
Sun Certified Programmer for Java 2 Platform

[This message has been edited by Valentin Crettaz (edited November 08, 2001).]
 
Guennadiy VANIN
Ranch Hand
Posts: 898
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Valentin,
I did not ask abt advisability but about theoretical possibility/hindrance to do so. The question is only about absolute impossibility and why?
The given in citation examples do not convince me either.
[This message has been edited by G Vanin (edited November 09, 2001).]
 
Guennadiy VANIN
Ranch Hand
Posts: 898
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So, does anybody knows?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!