Hi,
When a object is getting serialized(since it implements serializable) it can now make in to a BLOB and write in to a secondary storage or can be sent through network.
Mean while what about the private data????
Whether it is also getting serialized thern it will cause the violation of data abstraction in OOPS
If so why sun specification is like this???
Give me exact reason
In waiting foru ur reply
MaRu.
Discussions
Web tier: servlets, JSP, Web frameworks: what about private data after getteng serialized......??????
-
what about private data after getteng serialized......?????? (1 messages)
- Posted by: Maruthi Ram
- Posted on: March 16 2004 00:27 EST
Threaded Messages (1)
- RE: what about private data after getteng serialized......?????? by JT Wenting on March 16 2004 10:02 EST
-
RE: what about private data after getteng serialized......??????[ Go to top ]
- Posted by: JT Wenting
- Posted on: March 16 2004 10:02 EST
- in response to Maruthi Ram
Serializing private data is certainly NOT in violation of OO principles.
After deserialization it won't magically become available without the accessors...
And you can of course always implement writeObject and readObject to force the fields not to be written out.