|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IObjectStream
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.
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.
Method Summary | |
---|---|
IStream |
getStream()
The aggregated stream object. |
String |
getVersion()
The software version for the stream. |
Object |
loadObject(GUID riid,
Object pUnkOuter)
Load an object from the specified stream. |
void |
replaceObject(Object unknown)
Replaces the current object with the object in the the specified stream. |
void |
saveObject(Object pUnk)
Store an object to the specified stream. |
void |
setStreamByRef(IStream ppStream)
The aggregated stream object. |
void |
setVersion(String versionSpecifier)
The software version for the stream. |
Methods inherited from interface com.esri.arcgis.system.IStream |
---|
commit, esri_clone, lockRegion, remoteCopyTo, remoteSeek, revert, setSize, stat, unlockRegion |
Methods inherited from interface com.esri.arcgis.system.ISequentialStream |
---|
remoteRead, remoteWrite |
Method Detail |
---|
void setStreamByRef(IStream ppStream) throws IOException, AutomationException
ppStream
- A reference to a com.esri.arcgis.system.IStream (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.IStream getStream() throws IOException, AutomationException
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void saveObject(Object pUnk) throws IOException, AutomationException
pUnk
- A reference to another Object (IUnknown) (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.Object loadObject(GUID riid, Object pUnkOuter) throws IOException, AutomationException
The first parameter of LoadObject is a GUID of an interface ID (most of them could be find under HKEY_CLASSES_ROOT\Interface in the registry), not the object's GUID. The object that gets loaded will QI for this interface and the result is returned with the IUnknown parameter.
riid
- A Structure: com.esri.arcgis.support.ms.stdole.GUID (in)pUnkOuter
- A reference to another Object (IUnknown) (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void replaceObject(Object unknown) throws IOException, AutomationException
unknown
- A reference to another Object (IUnknown) (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void setVersion(String versionSpecifier) throws IOException, AutomationException
versionSpecifier
- The versionSpecifier (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.String getVersion() throws IOException, AutomationException
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |