ArcObjects Library Reference (System)  

IObjectStream Interface

Provides access to members used to make objects and object references persistant. Use of this interface allows multiple references to the same object to be stored properly.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Description

The IObjectStream interface provides properties and methods to allow you to correctly persist collections of ArcObjects objects in which there may be multiple references to a single object. For example if you persist both a Map and a LegendItem to the same stream, both may have references to a single layer. The ObjectStream ensures that the layer is only written to the persistence stream once. If you persist objects without an ObjectStream, you run the risk that the objects will be incorrectly rehydrated.

See the topics on implementing persistence for more details on implementing persistence on your custom objects with IObjectStream.

Members

Description
Method Clone
Method Commit
Method LoadObject Load an object from the specified stream. The first time an object is encountered, it is loaded from the stream. When subsequent references to the object are loaded, a pointer to the first object is returned.
Method LockRegion
Method RemoteCopyTo
Method RemoteRead
Method RemoteSeek
Method RemoteWrite
Method ReplaceObject Replaces the current object with the object in the the specified stream.
Method Revert
Method SaveObject Store an object to the specified stream. The first time the object is stored, the full object is written to the stream. When the object is subsequently stored, a reference is stored.
Method SetSize
Method Stat
Read/write property Stream The aggregated stream object.
Method UnlockRegion
Read/write property Version The software version for the stream.

Inherited Interfaces

Interfaces Description
IStream
ISequentialStream

CoClasses that implement IObjectStream

CoClasses and Classes Description
ObjectStream Specialized kind of IStream for objects.