Saturday 15 February 2014

java - How does serialization work for data structures -


How does serialization work for data structures like a marking tree and a list of links?

Due to why I get this suspicion, the indicator stores the memory address of the node. And on serialization after deserialization, there is no guarantee that they will be loaded in the same memory place. Also, if the serial data is sent to another system on a network, the same problem arises.

How does it work (if all this works)?

Java does not have an indicator in a variable in a reference data Basically, this means that you treat variables like you'll treat real data , and Java takes care of "indicator logic" for you (Contrary, say, C , In which you should

When a class is serial, all the information present in its context - that is, its all member variables - Together with it you can consider that each reference is being expanded into a copy of the actual data referenced.

In a language that does Indicators are included (for example, C), serialization / deserialization methods that store and unpack pointsers instead of data; Each indicator reference will actually give you an arbitrary signal in your deserialized data. O. (IE, the serialization / deaserization will be wrong.)

No comments:

Post a Comment