|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.esri.arcgis.system.ObjectStream
Specialized kind of IStream for objects.
When implementing your own objects, you will sometimes need to provide support for persistence. For example, with a custom feature renderer, persistence enables its settings to be written to an MXD file so that when ArcMap is restarted, the layer having custom rendering will be drawn in the same way as previously drawn. The COM concept of streams provides a way of reading and writing data to the persisted storage.
The ObjectStream is designed 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.
| Constructor Summary | |
ObjectStream()
Constructs a ObjectStream using ArcGIS Engine. |
|
ObjectStream(java.lang.Object obj)
Deprecated. As of ArcGIS 9.2, replaced by normal Java casts. |
|
| Method Summary | |
void |
commit(int grfCommitFlags)
Supported Platforms |
boolean |
equals(java.lang.Object o)
Compare this object with another |
void |
esri_clone(IStream[] ppstm)
|
IDocumentVersion |
getAsIDocumentVersion()
Deprecated. No replacement. The object reference can be directly used where the implemented interface is needed. |
IObjectStream |
getAsIObjectStream()
Deprecated. No replacement. The object reference can be directly used where the implemented interface is needed. |
static java.lang.String |
getClsid()
|
int |
getDocumentVersion()
The version of the document to save. |
IStream |
getStream()
The aggregated stream object. |
java.lang.String |
getVersion()
The software version for the stream. |
int |
hashCode()
the hashcode for this object |
java.lang.Object |
loadObject(GUID riid,
java.lang.Object pUnkOuter)
Load an object from the specified stream. |
void |
lockRegion(_ULARGE_INTEGER libOffset,
_ULARGE_INTEGER cb,
int dwLockType)
Supported Platforms |
void |
remoteCopyTo(IStream pstm,
_ULARGE_INTEGER cb,
_ULARGE_INTEGER[] pcbRead,
_ULARGE_INTEGER[] pcbWritten)
Supported Platforms |
void |
remoteRead(byte[] pv,
int cb,
int[] pcbRead)
Supported Platforms |
void |
remoteSeek(_LARGE_INTEGER dlibMove,
int dwOrigin,
_ULARGE_INTEGER[] plibNewPosition)
Supported Platforms |
void |
remoteWrite(byte[] pv,
int cb,
int[] pcbWritten)
Supported Platforms |
void |
replaceObject(java.lang.Object unknown)
Replaces the current object with the object in the the specified stream. |
void |
revert()
Supported Platforms |
void |
saveObject(java.lang.Object pUnk)
Store an object to the specified stream. |
void |
setDocumentVersion(int docVersion)
The version of the document to save. |
void |
setSize(_ULARGE_INTEGER libNewSize)
|
void |
setStreamByRef(IStream ppStream)
The aggregated stream object. |
void |
setVersion(java.lang.String versionSpecifier)
The software version for the stream. |
void |
stat(tagSTATSTG[] pstatstg,
int grfStatFlag)
Supported Platforms |
void |
unlockRegion(_ULARGE_INTEGER libOffset,
_ULARGE_INTEGER cb,
int dwLockType)
Supported Platforms |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public ObjectStream()
throws java.io.IOException,
java.net.UnknownHostException
java.io.IOException - if there are interop problems
java.net.UnknownHostException - if there are interop problems
public ObjectStream(java.lang.Object obj)
throws java.io.IOException
obj to ObjectStream. ObjectStream theObjectStream = (ObjectStream) obj;
obj - an object returned from ArcGIS Engine or Server
java.io.IOException - if there are interop problems| Method Detail |
public static java.lang.String getClsid()
public IObjectStream getAsIObjectStream()
public IDocumentVersion getAsIDocumentVersion()
public boolean equals(java.lang.Object o)
public int hashCode()
public void setStreamByRef(IStream ppStream)
throws java.io.IOException,
AutomationException
IObjectStream
setStreamByRef in interface IObjectStreamppStream - A reference to a com.esri.arcgis.system.IStream (in)
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.
public IStream getStream()
throws java.io.IOException,
AutomationException
IObjectStream
getStream in interface IObjectStreamjava.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
public void saveObject(java.lang.Object pUnk)
throws java.io.IOException,
AutomationException
IObjectStream
saveObject in interface IObjectStreampUnk - A reference to another Object (IUnknown) (in)
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.
public java.lang.Object loadObject(GUID riid,
java.lang.Object pUnkOuter)
throws java.io.IOException,
AutomationException
IObjectStreamThe 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.
loadObject in interface IObjectStreamriid - A Structure: com.esri.arcgis.support.ms.stdole.GUID (in)pUnkOuter - A reference to another Object (IUnknown) (in)
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.
public void replaceObject(java.lang.Object unknown)
throws java.io.IOException,
AutomationException
IObjectStream
replaceObject in interface IObjectStreamunknown - A reference to another Object (IUnknown) (in)
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.
public void setVersion(java.lang.String versionSpecifier)
throws java.io.IOException,
AutomationException
IObjectStream
setVersion in interface IObjectStreamversionSpecifier - The versionSpecifier (in)
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
public java.lang.String getVersion()
throws java.io.IOException,
AutomationException
IObjectStream
getVersion in interface IObjectStreamAutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.
public void remoteSeek(_LARGE_INTEGER dlibMove,
int dwOrigin,
_ULARGE_INTEGER[] plibNewPosition)
throws java.io.IOException,
AutomationException
IStreamIStream is a Microsoft interface. Please refer to MSDN for information about this interface.
remoteSeek in interface IStreamdlibMove - A Structure: com.esri.arcgis.system._LARGE_INTEGER (in)dwOrigin - The dwOrigin (in)plibNewPosition - A Structure: com.esri.arcgis.system._ULARGE_INTEGER (out: use single element array)
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
public void setSize(_ULARGE_INTEGER libNewSize)
throws java.io.IOException,
AutomationException
setSize in interface IStreamlibNewSize - A Structure: com.esri.arcgis.system._ULARGE_INTEGER (in)
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
public void remoteCopyTo(IStream pstm,
_ULARGE_INTEGER cb,
_ULARGE_INTEGER[] pcbRead,
_ULARGE_INTEGER[] pcbWritten)
throws java.io.IOException,
AutomationException
IStreamIStream is a Microsoft interface. Please refer to MSDN for information about this interface.
remoteCopyTo in interface IStreampstm - A reference to a com.esri.arcgis.system.IStream (in)cb - A Structure: com.esri.arcgis.system._ULARGE_INTEGER (in)pcbRead - A Structure: com.esri.arcgis.system._ULARGE_INTEGER (out: use single element array)pcbWritten - A Structure: com.esri.arcgis.system._ULARGE_INTEGER (out: use single element array)
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.
public void commit(int grfCommitFlags)
throws java.io.IOException,
AutomationException
IStreamIStream is a Microsoft interface. Please refer to MSDN for information about this interface.
commit in interface IStreamgrfCommitFlags - The grfCommitFlags (in)
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.
public void revert()
throws java.io.IOException,
AutomationException
IStreamIStream is a Microsoft interface. Please refer to MSDN for information about this interface.
revert in interface IStreamAutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.
public void lockRegion(_ULARGE_INTEGER libOffset,
_ULARGE_INTEGER cb,
int dwLockType)
throws java.io.IOException,
AutomationException
IStreamIStream is a Microsoft interface. Please refer to MSDN for information about this interface.
lockRegion in interface IStreamlibOffset - A Structure: com.esri.arcgis.system._ULARGE_INTEGER (in)cb - A Structure: com.esri.arcgis.system._ULARGE_INTEGER (in)dwLockType - The dwLockType (in)
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.
public void unlockRegion(_ULARGE_INTEGER libOffset,
_ULARGE_INTEGER cb,
int dwLockType)
throws java.io.IOException,
AutomationException
IStreamIStream is a Microsoft interface. Please refer to MSDN for information about this interface.
unlockRegion in interface IStreamlibOffset - A Structure: com.esri.arcgis.system._ULARGE_INTEGER (in)cb - A Structure: com.esri.arcgis.system._ULARGE_INTEGER (in)dwLockType - The dwLockType (in)
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
public void stat(tagSTATSTG[] pstatstg,
int grfStatFlag)
throws java.io.IOException,
AutomationException
IStreamIStream is a Microsoft interface. Please refer to MSDN for information about this interface.
stat in interface IStreampstatstg - A Structure: com.esri.arcgis.system.tagSTATSTG (out: use single element array)grfStatFlag - The grfStatFlag (in)
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
public void esri_clone(IStream[] ppstm)
throws java.io.IOException,
AutomationException
esri_clone in interface IStreamppstm - A reference to a com.esri.arcgis.system.IStream (out: use single element array)
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
public void remoteRead(byte[] pv,
int cb,
int[] pcbRead)
throws java.io.IOException,
AutomationException
ISequentialStreamISequentialStream is a Microsoft interface. Please refer to MSDN for information about this interface.
remoteRead in interface ISequentialStreampv - An unsigned byte (out: use single element array)cb - The cb (in)pcbRead - The pcbRead (out: use single element array)
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.
public void remoteWrite(byte[] pv,
int cb,
int[] pcbWritten)
throws java.io.IOException,
AutomationException
ISequentialStreamISequentialStream is a Microsoft interface. Please refer to MSDN for information about this interface.
remoteWrite in interface ISequentialStreampv - An unsigned byte (in)cb - The cb (in)pcbWritten - The pcbWritten (out: use single element array)
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.
public void setDocumentVersion(int docVersion)
throws java.io.IOException,
AutomationException
IDocumentVersion
setDocumentVersion in interface IDocumentVersiondocVersion - A com.esri.arcgis.system.esriArcGISVersion constant (in)
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
public int getDocumentVersion()
throws java.io.IOException,
AutomationException
IDocumentVersionDetermines which version an object is persisted. This can be useful when saving an object ObjectStream or MemoryBlobStream and you want the version of that object to be compatible with previous releases of ArcGIS. Not all persistable objects implement IDocumentVersion; you should ensure the object supports this interface before accessing this property.
getDocumentVersion in interface IDocumentVersionAutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||