com.esri.arcgis.geometry
Class IESRIShapeProxy

java.lang.Object
  extended by com.esri.arcgis.interop.Dispatch
      extended by com.esri.arcgis.geometry.IESRIShapeProxy
All Implemented Interfaces:
IESRIShape, Externalizable, Serializable
Direct Known Subclasses:
IESRIShape2Proxy

public class IESRIShapeProxy
extends com.esri.arcgis.interop.Dispatch
implements IESRIShape, Serializable

Provides access to members that Import/Export ArcObjects geometries to ESRI shapefile format.

Superseded By

IESRIShape2

Remarks

Shape modifiers are used in certain methods of this interface. For instance they are used to define which geometry attributes to allow when exporting or importing a geometry.

Product Availability

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

See Also:
Serialized Form

Field Summary
 boolean noncastable
           
 
Fields inherited from class com.esri.arcgis.interop.Dispatch
DISPATCH_METHOD, DISPATCH_PROPERTYGET, DISPATCH_PROPERTYPUT, DISPATCH_PROPERTYPUTREF, objRef
 
Constructor Summary
  IESRIShapeProxy()
           
  IESRIShapeProxy(Object obj)
           
protected IESRIShapeProxy(Object obj, String iid)
           
 
Method Summary
 void addListener(String iidStr, Object theListener, Object theSource)
           
 void attachToESRIShape(int[] byteCountInOut, byte[] byteBuffer)
          Takes ownership of the input ESRI shapefile format buffer.
 void exportToESRIShape(int[] byteCountInOut, byte[] byteBuffer)
          Writes an ESRI shapefile formatted version of this geometry to the specified buffer.
 void exportToESRIShapeEx(int modifiersToAllow, boolean useArcViewNaNs, int[] byteCountInOut, byte[] byteBuffer)
          Writes an ESRI shapefile formatted version of this geometry to the specified buffer.
 int getESRIShapeSize()
          The size of the buffer, in bytes, that will be required to hold the ESRI shapefile formatted version of the geometry.
 int getESRIShapeSizeEx(int modifiersToAllow)
          The size of the buffer (in bytes) that will be required to hold the ESRI shapefile version of the geometry.
 void getModifierOffset(int modifierType, int[] offset)
          Finds out the byte offsets within a shape buffer at which an exported attribute can be found.
 void importFromESRIShape(int[] byteCountInOut, byte[] byteBuffer)
          Defines this geometry from the input ESRI shapefile formatted buffer.
 void nonTrustedImportFromESRIShape(int[] byteCountInOut, byte[] byteBuffer)
          Defines this geometry from the contents of the input ESRI shapefile formatted buffer.
 void queryESRIShapeType(int basicShapeType, int[] shapeModifiers)
          Returns the basic type and modifiers (combination of esriShapeModifiers) that define the geometry's shape type, as it was last exported.
 void removeListener(String iidStr, Object theListener)
           
 
Methods inherited from class com.esri.arcgis.interop.Dispatch
bindUsingMoniker, constructVtblPosTable, convertToNative, cookieForListener, createDispatch, createObjrefMonikerDisplayName, equals, getActiveObject, getActiveObject, getDefaultProperty, getDispatchIdOfName, getLastErrorCode, getMtsObjectContext, getObjRef, getPropertyByName, getPropertyByName, getVtblPos, hashCode, initDispatch, invoke, invokeMethodByName, invokeMethodByName, invokeMethodByName, invokePropertyGetByName, invokePropertyPutByName, invokePropertyPutByRefByName, isNativeMode, isObjRef, optimizedVtblInvoke, queryInterface, readExternal, release, setNativeMode, setPropertyByName, toString, vtblInvoke, writeExternal
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

noncastable

public boolean noncastable
Constructor Detail

IESRIShapeProxy

public IESRIShapeProxy()

IESRIShapeProxy

public IESRIShapeProxy(Object obj)
                throws IOException
Throws:
IOException

IESRIShapeProxy

protected IESRIShapeProxy(Object obj,
                          String iid)
                   throws IOException
Throws:
IOException
Method Detail

addListener

public void addListener(String iidStr,
                        Object theListener,
                        Object theSource)
                 throws IOException
Overrides:
addListener in class com.esri.arcgis.interop.Dispatch
Throws:
IOException

removeListener

public void removeListener(String iidStr,
                           Object theListener)
                    throws IOException
Overrides:
removeListener in class com.esri.arcgis.interop.Dispatch
Throws:
IOException

queryESRIShapeType

public void queryESRIShapeType(int basicShapeType,
                               int[] shapeModifiers)
                        throws IOException,
                               AutomationException
Returns the basic type and modifiers (combination of esriShapeModifiers) that define the geometry's shape type, as it was last exported.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
queryESRIShapeType in interface IESRIShape
Parameters:
basicShapeType - A com.esri.arcgis.geometry.esriShapeType constant (in)
shapeModifiers - The shapeModifiers (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getESRIShapeSize

public int getESRIShapeSize()
                     throws IOException,
                            AutomationException
The size of the buffer, in bytes, that will be required to hold the ESRI shapefile formatted version of the geometry. The value may exceed the minimum required size.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getESRIShapeSize in interface IESRIShape
Returns:
The cBytes
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getESRIShapeSizeEx

public int getESRIShapeSizeEx(int modifiersToAllow)
                       throws IOException,
                              AutomationException
The size of the buffer (in bytes) that will be required to hold the ESRI shapefile version of the geometry. Only attributes specified by modifiers to allow will be exported. The value may exceed the minimum required size. ModifiersToAllow is a combination of e?O??&

Product Availability

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

Specified by:
getESRIShapeSizeEx in interface IESRIShape
Parameters:
modifiersToAllow - The modifiersToAllow (in)
Returns:
The cBytes
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

importFromESRIShape

public void importFromESRIShape(int[] byteCountInOut,
                                byte[] byteBuffer)
                         throws IOException,
                                AutomationException
Defines this geometry from the input ESRI shapefile formatted buffer. Assumes the buffer describes a topologically correct geometry. Returns the exact number of bytes read from the buffer.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
importFromESRIShape in interface IESRIShape
Parameters:
byteCountInOut - The byteCountInOut (in/out: use single element array)
byteBuffer - An unsigned byte (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

nonTrustedImportFromESRIShape

public void nonTrustedImportFromESRIShape(int[] byteCountInOut,
                                          byte[] byteBuffer)
                                   throws IOException,
                                          AutomationException
Defines this geometry from the contents of the input ESRI shapefile formatted buffer. Does not assume that the buffer describes a topological correct geometry. Returns the exact number of bytes read from the buffer.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
nonTrustedImportFromESRIShape in interface IESRIShape
Parameters:
byteCountInOut - The byteCountInOut (in/out: use single element array)
byteBuffer - An unsigned byte (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

attachToESRIShape

public void attachToESRIShape(int[] byteCountInOut,
                              byte[] byteBuffer)
                       throws IOException,
                              AutomationException
Takes ownership of the input ESRI shapefile format buffer. The geometry must be deleted, set to empty, edited, or imported from/attached to a different buffer before the buffer can be re-used.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
attachToESRIShape in interface IESRIShape
Parameters:
byteCountInOut - The byteCountInOut (in/out: use single element array)
byteBuffer - An unsigned byte (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

exportToESRIShape

public void exportToESRIShape(int[] byteCountInOut,
                              byte[] byteBuffer)
                       throws IOException,
                              AutomationException
Writes an ESRI shapefile formatted version of this geometry to the specified buffer. Returns the exact number of bytes written to the buffer.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
exportToESRIShape in interface IESRIShape
Parameters:
byteCountInOut - The byteCountInOut (in/out: use single element array)
byteBuffer - An unsigned byte (out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

exportToESRIShapeEx

public void exportToESRIShapeEx(int modifiersToAllow,
                                boolean useArcViewNaNs,
                                int[] byteCountInOut,
                                byte[] byteBuffer)
                         throws IOException,
                                AutomationException
Writes an ESRI shapefile formatted version of this geometry to the specified buffer. Only exports attributes specified by modifiersToAllow (combination of esriShapeExportFlags values.). Returns the exact number of bytes written to the buffer.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
exportToESRIShapeEx in interface IESRIShape
Parameters:
modifiersToAllow - The modifiersToAllow (in)
useArcViewNaNs - The useArcViewNaNs (in)
byteCountInOut - The byteCountInOut (in/out: use single element array)
byteBuffer - An unsigned byte (out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getModifierOffset

public void getModifierOffset(int modifierType,
                              int[] offset)
                       throws IOException,
                              AutomationException
Finds out the byte offsets within a shape buffer at which an exported attribute can be found. Only works if the shape hasn't changed since the last call to ExportToESRIShape or ExportToESRIShapeEx.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getModifierOffset in interface IESRIShape
Parameters:
modifierType - A com.esri.arcgis.geometry.esriShapeModifiers constant (in)
offset - The offset (out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.