com.esri.arcgis.system
Interface IAMFWriter

All Superinterfaces:
Serializable
All Known Implementing Classes:
AMFWriter

public interface IAMFWriter
extends Serializable

Provides access to members that control the sequential writing of AMF.

Product Availability

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


Method Summary
 void endAMF3Array()
          Finishes writing an array.
 void endAMF3Object()
          Finishes writing object.
 void endAMF3ObjectTraits()
          Call this method to finish writing object traits and switch to writing members.
 void getCopy(IAMFWriter[] ppOutWriter)
          Clones IAMFWriter.
 IStream getStream()
          Obtains underlying stream.
 void startAMF3Array(int denseCount, int[] obj_ref)
          Starts writing of array.
 void startAMF3CustomObject(String classname, int[] obj_ref)
          Starst writing a custom object.
 void startAMF3Object(int traits_ref, int[] obj_ref)
          Starts writing an object, sends traits by reference.
 void startAMF3ObjectWithTraits(String classname, int memberCount, boolean dynamic, int[] traits_ref, int[] obj_ref)
          Start writing an object with traits.
 void writeAMF3_UTF8(String value, int[] string_ref)
          This method is required if you want to write member names in traits.
 void writeAMF3_UTF8Ref(int string_ref)
          This method is required if you want to write member names in traits by reference.
 void writeAMF3ArrayDenseMarker()
          Switches from writing of associative portion of an array to dense portion.
 void writeAMF3ArrayRef(int obj_ref)
          Writes an array by reference.
 void writeAMF3Bool(boolean value)
          Writes boolean value.
 void writeAMF3ByteArray(byte[] ppArray, int[] obj_ref)
          Writes byte array.
 void writeAMF3ByteArrayRef(int obj_ref)
          Writes byte array by reference.
 void writeAMF3Date(Date value, boolean asJsonNumber, int[] obj_ref)
          Writes date.
 void writeAMF3DateRef(int obj_ref)
          Writes date by reference.
 void writeAMF3Double(double value)
          Writes double (64-bit) value.
 void writeAMF3Int(int value)
          Writes integer (32-bit) value.
 void writeAMF3Null()
          Writes null value.
 void writeAMF3ObjectRef(int obj_ref)
          Writes object by reference.
 void writeAMF3String(String value, int[] string_ref)
          Writes string value.
 void writeAMF3StringRef(int string_ref)
          Writes string value by reference.
 void writeAMF3Undefined()
          Writes undefined value.
 void writeAMF3Variant(Object value, int[] value_ref)
          Writes value types (excluding array and object), may return string or object reference index.
 void writeAMF3Xml(String value, int[] obj_ref)
          Writes XML.
 void writeAMF3XmlDoc(String value, int[] obj_ref)
          Writes XML document.
 void writeAMF3XmlDocRef(int obj_ref)
          Writes XML document by reference.
 void writeAMF3XmlRef(int obj_ref)
          Writes XML by reference.
 void writeTo(IStream outputStream)
          Specifies output AMF stream.
 void writeU16(short b)
          Writes short integer.
 void writeU32(int b)
          Writes an integer.
 void writeU8(byte b)
          Writes a byte.
 void writeUTF8(String value)
          This method is used to write AMF0 strings.
 

Method Detail

writeTo

void writeTo(IStream outputStream)
             throws IOException,
                    AutomationException
Specifies output AMF stream.

Product Availability

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

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

getStream

IStream getStream()
                  throws IOException,
                         AutomationException
Obtains underlying stream.

Product Availability

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

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

writeAMF3Undefined

void writeAMF3Undefined()
                        throws IOException,
                               AutomationException
Writes undefined value.

Product Availability

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

Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

writeAMF3Null

void writeAMF3Null()
                   throws IOException,
                          AutomationException
Writes null value.

Product Availability

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

Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

writeAMF3Bool

void writeAMF3Bool(boolean value)
                   throws IOException,
                          AutomationException
Writes boolean value.

Product Availability

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

Parameters:
value - The value (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

writeAMF3Int

void writeAMF3Int(int value)
                  throws IOException,
                         AutomationException
Writes integer (32-bit) value.

Product Availability

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

Parameters:
value - The value (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

writeAMF3Double

void writeAMF3Double(double value)
                     throws IOException,
                            AutomationException
Writes double (64-bit) value.

Product Availability

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

Parameters:
value - The value (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

writeAMF3String

void writeAMF3String(String value,
                     int[] string_ref)
                     throws IOException,
                            AutomationException
Writes string value. Returns string reference index.

Product Availability

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

Parameters:
value - The value (in)
string_ref - The string_ref (out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

writeAMF3StringRef

void writeAMF3StringRef(int string_ref)
                        throws IOException,
                               AutomationException
Writes string value by reference.

Product Availability

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

Parameters:
string_ref - The string_ref (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

writeAMF3XmlDoc

void writeAMF3XmlDoc(String value,
                     int[] obj_ref)
                     throws IOException,
                            AutomationException
Writes XML document. Returns object reference index.

Product Availability

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

Parameters:
value - The value (in)
obj_ref - The obj_ref (out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

writeAMF3XmlDocRef

void writeAMF3XmlDocRef(int obj_ref)
                        throws IOException,
                               AutomationException
Writes XML document by reference.

Product Availability

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

Parameters:
obj_ref - The obj_ref (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

writeAMF3Xml

void writeAMF3Xml(String value,
                  int[] obj_ref)
                  throws IOException,
                         AutomationException
Writes XML. Returns object reference index.

Product Availability

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

Parameters:
value - The value (in)
obj_ref - The obj_ref (out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

writeAMF3XmlRef

void writeAMF3XmlRef(int obj_ref)
                     throws IOException,
                            AutomationException
Writes XML by reference.

Product Availability

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

Parameters:
obj_ref - The obj_ref (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

writeAMF3Date

void writeAMF3Date(Date value,
                   boolean asJsonNumber,
                   int[] obj_ref)
                   throws IOException,
                          AutomationException
Writes date. Returns object reference index.

Product Availability

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

Parameters:
value - The value (in)
asJsonNumber - The asJsonNumber (in)
obj_ref - The obj_ref (out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

writeAMF3DateRef

void writeAMF3DateRef(int obj_ref)
                      throws IOException,
                             AutomationException
Writes date by reference. Important: do not use this method if you send dates as JSON numbers, references will be incorrect.

Product Availability

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

Parameters:
obj_ref - The obj_ref (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

writeAMF3ByteArray

void writeAMF3ByteArray(byte[] ppArray,
                        int[] obj_ref)
                        throws IOException,
                               AutomationException
Writes byte array. Returns object reference index. Note that this is not an AMF3 array but another type - AMF3 byte array.

Product Availability

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

Parameters:
ppArray - An unsigned byte (in)
obj_ref - The obj_ref (out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

writeAMF3ByteArrayRef

void writeAMF3ByteArrayRef(int obj_ref)
                           throws IOException,
                                  AutomationException
Writes byte array by reference. Note that this is not an AMF3 array but another type - AMF3 byte array.

Product Availability

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

Parameters:
obj_ref - The obj_ref (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

writeAMF3Variant

void writeAMF3Variant(Object value,
                      int[] value_ref)
                      throws IOException,
                             AutomationException
Writes value types (excluding array and object), may return string or object reference index. If reference is not applicable, value_ref is set to -1.

Product Availability

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

Parameters:
value - A Variant (in)
value_ref - The value_ref (out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

startAMF3Array

void startAMF3Array(int denseCount,
                    int[] obj_ref)
                    throws IOException,
                           AutomationException
Starts writing of array. Returns object reference index.

Product Availability

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

Parameters:
denseCount - The denseCount (in)
obj_ref - The obj_ref (out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

writeAMF3ArrayDenseMarker

void writeAMF3ArrayDenseMarker()
                               throws IOException,
                                      AutomationException
Switches from writing of associative portion of an array to dense portion.

Product Availability

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

Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

endAMF3Array

void endAMF3Array()
                  throws IOException,
                         AutomationException
Finishes writing an array.

Product Availability

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

Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

writeAMF3ArrayRef

void writeAMF3ArrayRef(int obj_ref)
                       throws IOException,
                              AutomationException
Writes an array by reference.

Product Availability

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

Parameters:
obj_ref - The obj_ref (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

startAMF3CustomObject

void startAMF3CustomObject(String classname,
                           int[] obj_ref)
                           throws IOException,
                                  AutomationException
Starst writing a custom object. Contents of this kind of objects are user-defined.

Product Availability

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

Parameters:
classname - The classname (in)
obj_ref - The obj_ref (out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

startAMF3Object

void startAMF3Object(int traits_ref,
                     int[] obj_ref)
                     throws IOException,
                            AutomationException
Starts writing an object, sends traits by reference. Returns object reference index.

Product Availability

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

Parameters:
traits_ref - The traits_ref (in)
obj_ref - The obj_ref (out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

startAMF3ObjectWithTraits

void startAMF3ObjectWithTraits(String classname,
                               int memberCount,
                               boolean dynamic,
                               int[] traits_ref,
                               int[] obj_ref)
                               throws IOException,
                                      AutomationException
Start writing an object with traits. Returns trait reference index end object reference index.

Product Availability

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

Parameters:
classname - The classname (in)
memberCount - The memberCount (in)
dynamic - The dynamic (in)
traits_ref - The traits_ref (out: use single element array)
obj_ref - The obj_ref (out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

endAMF3ObjectTraits

void endAMF3ObjectTraits()
                         throws IOException,
                                AutomationException
Call this method to finish writing object traits and switch to writing members.

Product Availability

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

Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

endAMF3Object

void endAMF3Object()
                   throws IOException,
                          AutomationException
Finishes writing object.

Product Availability

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

Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

writeAMF3ObjectRef

void writeAMF3ObjectRef(int obj_ref)
                        throws IOException,
                               AutomationException
Writes object by reference.

Product Availability

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

Parameters:
obj_ref - The obj_ref (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

writeAMF3_UTF8

void writeAMF3_UTF8(String value,
                    int[] string_ref)
                    throws IOException,
                           AutomationException
This method is required if you want to write member names in traits.

Product Availability

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

Parameters:
value - The value (in)
string_ref - The string_ref (out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

writeAMF3_UTF8Ref

void writeAMF3_UTF8Ref(int string_ref)
                       throws IOException,
                              AutomationException
This method is required if you want to write member names in traits by reference.

Product Availability

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

Parameters:
string_ref - The string_ref (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

writeU8

void writeU8(byte b)
             throws IOException,
                    AutomationException
Writes a byte. AMF0 format only. Don't use this method for AMF3 objects.

Product Availability

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

Parameters:
b - An unsigned byte (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

writeU16

void writeU16(short b)
              throws IOException,
                     AutomationException
Writes short integer. AMF0 format only. Don't use this method for AMF3 objects.

Product Availability

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

Parameters:
b - The b (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

writeU32

void writeU32(int b)
              throws IOException,
                     AutomationException
Writes an integer. AMF0 format only. Don't use this method for AMF3 objects.

Product Availability

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

Parameters:
b - The b (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

writeUTF8

void writeUTF8(String value)
               throws IOException,
                      AutomationException
This method is used to write AMF0 strings. AMF0 format only. Don't use this method for AMF3 objects.

Product Availability

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

Parameters:
value - The value (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getCopy

void getCopy(IAMFWriter[] ppOutWriter)
             throws IOException,
                    AutomationException
Clones IAMFWriter. Useful when you want to preserve traits and object, string and trait references.

Product Availability

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

Parameters:
ppOutWriter - A reference to a com.esri.arcgis.system.IAMFWriter (out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.