- when learning ObjectInputStream mainly, I don"t understand the process of reading and writing. Object conversion to word energy saving understanding, but how can the conversion of objects into object, ensure the correctness of the data? What are the internal details of the conversion between custom objects and Object?
2. My own thinking: I guess that the .class of each object will be saved in object, and the specific data in the object will be converted according to .class.
this .class is the key to the transformation.
3. After asking: object refers to an instance of this object (class can be thought of as a mold. The example is something produced according to the mold. )
4. Personal understanding of this: that is, an instance reference of this object will be maintained in object, and there is some specific data about this object in the instance. If you need to convert the object from object, create a new object based on the reference of this instance?
5. One last question: if I customize an object and convert it to a reference that maintains an instance of the object in Object,Object, then I start serializing and writing out, is the object still there? If it is not maintained, how can I create an object based on this reference the next time I deserialize?
ps: let"s discuss it. I, rookie, don"t understand a lot of things. Please