An ObjectOutput (henceforth 'out') preceeds objects it writes with a format id. The companion FormatIdInputStream (henceforth 'in') uses these format ids in parsing the stored data. The stream can be thought of as containing a sequence of (formatId,object) pairs interspersed with other data. The assumption is that out.writeObject() produces these pairs and in.readObject() uses the format ids to construct objects from the pairs that out.writeObject produced. The description below describes each supported pair and how in.readObject() processes it.
Note 1: The FormatIdInputStream uses Monitor.newInstanceFromIdentifier(format id) to get the class.
Note 2: An object may support more than one of the following interfaces Storable, Formatable, Serializable. In this case out.writeObject use the first of these interfaces which the object supports (based on the order listed here) to determine how to write the object.
|
|
|
|
|
|