What is an object graph?
ยท When used in connection with serialization, an object graph is a tree structure rooted at the object you have written to the ObjectOutputStream. The branches and leaves of the tree are all the objects, which are reachable by following references from the root object. This structure is maintained by the ObjectOutputStream in order to ensure that the complete reachable state of the given object is serialized and to handle cyclic dependencies. The graph is computed on the fly, during the serialization process. A side-effect of maintaining this graph is that an object which has already been written to the stream will not be written again – it will be replaced by an object stream identifier, simply a number used to point at the previously object.
Related Questions
- I see the graph, but the people are larger that they should be, the text is upside down and the text is only on the back side of the person object. What is wrong?
- What does the graph of image distance and object distance show with lenses?
- How to draw acceleration versus velocity graph when an object is falling?