com.esri.arcgis.system
Interface IPersistVariant

All Superinterfaces:
Serializable
All Known Implementing Classes:
ImageServerLayer

public interface IPersistVariant
extends Serializable

Provides access to members used for storage of an object through VARIANTs.

Description

The IPersistVariant interface should be implemented by classes which need to be persistable. This interface was specifically designed for use by programmers who don’t use Visual C++, or C++ development environments.

The stream passed to the IPersistVariant interface is a specialist stream class which implements IVariantStream. Using this interface, any value type, or any COM object can be written to a stream. This stream class is internal to ArcObjects.

See the topics on implementing persistence for more details.

Product Availability

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


Method Summary
 IUID getID()
          The ID of the object.
 void load(IVariantStream stream)
          Loads the object properties from the stream.
 void save(IVariantStream stream)
          Saves the object properties to the stream.
 

Method Detail

getID

IUID getID()
           throws IOException,
                  AutomationException
The ID of the object.

Description

Returns a UID or a the fully-qualified class name of your class.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Returns:
A reference to a com.esri.arcgis.system.IUID
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

load

void load(IVariantStream stream)
          throws IOException,
                 AutomationException
Loads the object properties from the stream.

Description

The Load method must read the data from the stream in the same order the data was written to the stream in the Save method.

Streams are sequential; you must ensure that your data is saved and loaded in the correct order, so that the correct data is written to the correct member.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Parameters:
stream - A reference to a com.esri.arcgis.system.IVariantStream (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

save

void save(IVariantStream stream)
          throws IOException,
                 AutomationException
Saves the object properties to the stream.

Description

The Load method must read the data from the stream in the same order the data was written to the stream in the Save method.

Streams are sequential; you mut ensure that your data is saved and loaded in the correct order, so that the correct data is written to the correct member.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Parameters:
stream - A reference to a com.esri.arcgis.system.IVariantStream (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.