com.esri.arcgis.system
Class JSONWriter

java.lang.Object
  extended by com.esri.arcgis.system.JSONWriter
All Implemented Interfaces:
com.esri.arcgis.interop.RemoteObjRef, IJSONWriter, IJSONWriter2, IJSONWriter3, ISupportErrorInfo, java.io.Serializable

public class JSONWriter
extends java.lang.Object
implements com.esri.arcgis.interop.RemoteObjRef, IJSONWriter, IJSONWriter2, IJSONWriter3, ISupportErrorInfo

COM Class 'JSONWriter'. Generated 3/19/2015 1:20:47 PM from 'C:\ArcGIS\COM\esriSystem.olb'

Description 'A sequential JSON Writer.' Generator Options: PromptForTypeLibraries = False ClashPrefix = esri_ LowerCaseMemberNames = True IDispatchOnly = False RetryOnReject = False AwtForOcxs = True ArraysAsObjects = False DontRenameSameMethods = False ImplementConflictingInterfaces = True ReuseMethods = True RenameConflictingInterfaceMethods = True GenBeanInfo = True GenerateJavadoc =

See Also:
Serialized Form

Field Summary
 
Fields inherited from interface com.esri.arcgis.system.IJSONWriter3
IID, IID1a92eb9a_69cb_4f17_b398_51756d5fb4f7, xxDummy
 
Fields inherited from interface com.esri.arcgis.system.IJSONWriter2
IID677fcbb1_c272_4616_b476_2ca3dce8d292
 
Fields inherited from interface com.esri.arcgis.system.IJSONWriter
IID408cd30c_b7a6_4793_a07c_4181035c66e7
 
Fields inherited from interface com.esri.arcgis.system.ISupportErrorInfo
IID, IIDdf0b3d60_548f_101b_8e65_08002b2bd119, xxDummy
 
Constructor Summary
JSONWriter()
          Constructs a JSONWriter using ArcGIS Engine.
JSONWriter(java.lang.Object obj)
          Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.
JSONWriter theJSONWriter = (JSONWriter) obj;
 
Method Summary
 void endArray()
          Ends an array.
 void endObject()
          Ends writing of an object.
 boolean equals(java.lang.Object o)
          Compare this object with another
static java.lang.String getClsid()
          getClsid.
 com.esri.arcgis.interop.Dispatch getJintegraDispatch()
          Deprecated. Internal use only.
 IStream getStream()
          Obtains underlying stream.
 byte[] getStringBuffer()
          Obtains copy of string buffer.
 int hashCode()
          the hashcode for this object
 void interfaceSupportsErrorInfo(GUID riid)
          interfaceSupportsErrorInfo
 void release()
          Release a JSONWriter.
 void reset()
          Resets IJSONWriter's internal state.
 void setFormatted(boolean value)
          Writes 'pretty' formatting on or off.
 void setIndent(int value)
          Writes indent for 'pretty' formatting.
 void startArray(java.lang.String name)
          Starts an array.
 void startObject(java.lang.String name)
          Starts writing an object.
 void writeBinary(java.lang.String name, byte[] value)
          Writes a byte array.
 void writeBinaryVal(byte[] value)
          Writes a byte array.
 void writeBoolean(java.lang.String name, boolean value)
          Writes a boolean.
 void writeBooleanVal(boolean value)
          Writes a boolean in array.
 void writeByte(java.lang.String name, byte value)
          Writes a byte.
 void writeByteVal(byte value)
          Writes a byte in array.
 void writeDate(java.lang.String name, java.util.Date value, boolean asString)
          Writes a date.
 void writeDateVal(java.util.Date value, boolean asString)
          Writes a date in array.
 void writeDouble(java.lang.String name, double value)
          Writes a double.
 void writeDoubleEx(java.lang.String name, double value, int precision)
          Writes a double with specified number of digits after decimal point.
 void writeDoubleVal(double value)
          Writes a double in array.
 void writeDoubleValEx(double value, int precision)
          Writes a double in array with specified number of digits after decimal point.
 void writeFloat(java.lang.String name, float value)
          Writes a float.
 void writeFloatVal(float value)
          Writes a float in array.
 void writeInt64(java.lang.String name, long value)
          Writes a LONGLONG.
 void writeInt64Val(long value)
          Writes a LONGLONG in array.
 void writeInteger(java.lang.String name, int value)
          Writes an integer.
 void writeIntegerVal(int value)
          Writes an integer in array.
 void writeNull(java.lang.String name)
          Writes null property.
 void writeNullVal()
          Writes null value in array.
 void writeRawString(java.lang.String name, java.lang.String value)
          Writes a raw property without any processing.
 void writeRawStringVal(java.lang.String value)
          Writes a raw value without any processing.
 void writeShort(java.lang.String name, short value)
          Writes a short.
 void writeShortVal(short value)
          Writes a short int in array.
 void writeString(java.lang.String name, java.lang.String value)
          Writes a string property.
 void writeStringVal(java.lang.String value)
          Writes a string in array.
 void writeTo(IStream outputStream)
          Specifies output JSON stream.
 void writeToString()
          Redirects writing to internal string buffer.
 void writeUInt64(java.lang.String name, long value)
          Writes a ULONGLONG.
 void writeUInt64Val(long value)
          Writes a ULONGLONG in array.
 void writeVariant(java.lang.String name, java.lang.Object value)
          Writes a variant valued property.
 void writeVariantVal(java.lang.Object value)
          Writes a variant in array.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JSONWriter

public JSONWriter()
           throws java.io.IOException,
                  java.net.UnknownHostException
Constructs a JSONWriter using ArcGIS Engine.

Throws:
java.io.IOException - if there are interop problems
java.net.UnknownHostException - if there are interop problems

JSONWriter

public JSONWriter(java.lang.Object obj)
           throws java.io.IOException
Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.
JSONWriter theJSONWriter = (JSONWriter) obj;

Construct a JSONWriter using a reference to such an object returned from ArcGIS Engine or Server. This is semantically equivalent to casting obj to JSONWriter.

Parameters:
obj - an object returned from ArcGIS Engine or Server
Throws:
java.io.IOException - if there are interop problems
Method Detail

getClsid

public static java.lang.String getClsid()
getClsid.


equals

public boolean equals(java.lang.Object o)
Compare this object with another

Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
the hashcode for this object

Overrides:
hashCode in class java.lang.Object

getJintegraDispatch

public com.esri.arcgis.interop.Dispatch getJintegraDispatch()
Deprecated. Internal use only.

Specified by:
getJintegraDispatch in interface com.esri.arcgis.interop.RemoteObjRef

release

public void release()
Release a JSONWriter.

Specified by:
release in interface com.esri.arcgis.interop.RemoteObjRef

writeTo

public void writeTo(IStream outputStream)
             throws java.io.IOException,
                    AutomationException
Specifies output JSON stream.

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

writeToString

public void writeToString()
                   throws java.io.IOException,
                          AutomationException
Redirects writing to internal string buffer.

Specified by:
writeToString in interface IJSONWriter
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getStringBuffer

public byte[] getStringBuffer()
                       throws java.io.IOException,
                              AutomationException
Obtains copy of string buffer. Encoding is UTF8.

Specified by:
getStringBuffer in interface IJSONWriter
Returns:
An unsigned byte
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getStream

public IStream getStream()
                  throws java.io.IOException,
                         AutomationException
Obtains underlying stream. If WriteTo() is not called yet, will return NULL. Also will return NULL if WriteToString() was called.

Specified by:
getStream in interface IJSONWriter
Returns:
A reference to a com.esri.arcgis.system.IStream
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setFormatted

public void setFormatted(boolean value)
                  throws java.io.IOException,
                         AutomationException
Writes 'pretty' formatting on or off.

Specified by:
setFormatted in interface IJSONWriter
Parameters:
value - The value (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setIndent

public void setIndent(int value)
               throws java.io.IOException,
                      AutomationException
Writes indent for 'pretty' formatting. Default is 2.

Specified by:
setIndent in interface IJSONWriter
Parameters:
value - The value (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

startObject

public void startObject(java.lang.String name)
                 throws java.io.IOException,
                        AutomationException
Starts writing an object.

Specified by:
startObject in interface IJSONWriter
Parameters:
name - The name (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

endObject

public void endObject()
               throws java.io.IOException,
                      AutomationException
Ends writing of an object.

Specified by:
endObject in interface IJSONWriter
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

startArray

public void startArray(java.lang.String name)
                throws java.io.IOException,
                       AutomationException
Starts an array.

Specified by:
startArray in interface IJSONWriter
Parameters:
name - The name (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

endArray

public void endArray()
              throws java.io.IOException,
                     AutomationException
Ends an array.

Specified by:
endArray in interface IJSONWriter
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

writeVariant

public void writeVariant(java.lang.String name,
                         java.lang.Object value)
                  throws java.io.IOException,
                         AutomationException
Writes a variant valued property.

Specified by:
writeVariant in interface IJSONWriter
Parameters:
name - The name (in)
value - A Variant (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

writeString

public void writeString(java.lang.String name,
                        java.lang.String value)
                 throws java.io.IOException,
                        AutomationException
Writes a string property.

Specified by:
writeString in interface IJSONWriter
Parameters:
name - The name (in)
value - The value (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

writeBoolean

public void writeBoolean(java.lang.String name,
                         boolean value)
                  throws java.io.IOException,
                         AutomationException
Writes a boolean.

Specified by:
writeBoolean in interface IJSONWriter
Parameters:
name - The name (in)
value - The value (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

writeByte

public void writeByte(java.lang.String name,
                      byte value)
               throws java.io.IOException,
                      AutomationException
Writes a byte.

Specified by:
writeByte in interface IJSONWriter
Parameters:
name - The name (in)
value - An unsigned byte (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

writeShort

public void writeShort(java.lang.String name,
                       short value)
                throws java.io.IOException,
                       AutomationException
Writes a short.

Specified by:
writeShort in interface IJSONWriter
Parameters:
name - The name (in)
value - The value (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

writeInteger

public void writeInteger(java.lang.String name,
                         int value)
                  throws java.io.IOException,
                         AutomationException
Writes an integer.

Specified by:
writeInteger in interface IJSONWriter
Parameters:
name - The name (in)
value - The value (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

writeFloat

public void writeFloat(java.lang.String name,
                       float value)
                throws java.io.IOException,
                       AutomationException
Writes a float.

Specified by:
writeFloat in interface IJSONWriter
Parameters:
name - The name (in)
value - The value (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

writeDouble

public void writeDouble(java.lang.String name,
                        double value)
                 throws java.io.IOException,
                        AutomationException
Writes a double.

Specified by:
writeDouble in interface IJSONWriter
Parameters:
name - The name (in)
value - The value (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

writeDate

public void writeDate(java.lang.String name,
                      java.util.Date value,
                      boolean asString)
               throws java.io.IOException,
                      AutomationException
Writes a date.

Specified by:
writeDate in interface IJSONWriter
Parameters:
name - The name (in)
value - The value (in)
asString - The asString (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

writeBinary

public void writeBinary(java.lang.String name,
                        byte[] value)
                 throws java.io.IOException,
                        AutomationException
Writes a byte array.

Specified by:
writeBinary in interface IJSONWriter
Parameters:
name - The name (in)
value - An unsigned byte (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

writeNull

public void writeNull(java.lang.String name)
               throws java.io.IOException,
                      AutomationException
Writes null property.

Specified by:
writeNull in interface IJSONWriter
Parameters:
name - The name (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

writeVariantVal

public void writeVariantVal(java.lang.Object value)
                     throws java.io.IOException,
                            AutomationException
Writes a variant in array.

Specified by:
writeVariantVal in interface IJSONWriter
Parameters:
value - A Variant (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

writeStringVal

public void writeStringVal(java.lang.String value)
                    throws java.io.IOException,
                           AutomationException
Writes a string in array.

Specified by:
writeStringVal in interface IJSONWriter
Parameters:
value - The value (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

writeBooleanVal

public void writeBooleanVal(boolean value)
                     throws java.io.IOException,
                            AutomationException
Writes a boolean in array.

Specified by:
writeBooleanVal in interface IJSONWriter
Parameters:
value - The value (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

writeByteVal

public void writeByteVal(byte value)
                  throws java.io.IOException,
                         AutomationException
Writes a byte in array.

Specified by:
writeByteVal in interface IJSONWriter
Parameters:
value - An unsigned byte (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

writeShortVal

public void writeShortVal(short value)
                   throws java.io.IOException,
                          AutomationException
Writes a short int in array.

Specified by:
writeShortVal in interface IJSONWriter
Parameters:
value - The value (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

writeIntegerVal

public void writeIntegerVal(int value)
                     throws java.io.IOException,
                            AutomationException
Writes an integer in array.

Specified by:
writeIntegerVal in interface IJSONWriter
Parameters:
value - The value (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

writeFloatVal

public void writeFloatVal(float value)
                   throws java.io.IOException,
                          AutomationException
Writes a float in array.

Specified by:
writeFloatVal in interface IJSONWriter
Parameters:
value - The value (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

writeDoubleVal

public void writeDoubleVal(double value)
                    throws java.io.IOException,
                           AutomationException
Writes a double in array.

Specified by:
writeDoubleVal in interface IJSONWriter
Parameters:
value - The value (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

writeDateVal

public void writeDateVal(java.util.Date value,
                         boolean asString)
                  throws java.io.IOException,
                         AutomationException
Writes a date in array.

Specified by:
writeDateVal in interface IJSONWriter
Parameters:
value - The value (in)
asString - The asString (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

writeBinaryVal

public void writeBinaryVal(byte[] value)
                    throws java.io.IOException,
                           AutomationException
Writes a byte array.

Specified by:
writeBinaryVal in interface IJSONWriter
Parameters:
value - An unsigned byte (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

writeNullVal

public void writeNullVal()
                  throws java.io.IOException,
                         AutomationException
Writes null value in array.

Specified by:
writeNullVal in interface IJSONWriter
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

reset

public void reset()
           throws java.io.IOException,
                  AutomationException
Resets IJSONWriter's internal state.

Specified by:
reset in interface IJSONWriter2
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

writeRawString

public void writeRawString(java.lang.String name,
                           java.lang.String value)
                    throws java.io.IOException,
                           AutomationException
Writes a raw property without any processing. Use to insert JSON sub-object or sub-array strings only.

Specified by:
writeRawString in interface IJSONWriter2
Parameters:
name - The name (in)
value - The value (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

writeRawStringVal

public void writeRawStringVal(java.lang.String value)
                       throws java.io.IOException,
                              AutomationException
Writes a raw value without any processing. Use to insert JSON sub-object or sub-array strings only.

Specified by:
writeRawStringVal in interface IJSONWriter2
Parameters:
value - The value (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

writeDoubleValEx

public void writeDoubleValEx(double value,
                             int precision)
                      throws java.io.IOException,
                             AutomationException
Writes a double in array with specified number of digits after decimal point.

Specified by:
writeDoubleValEx in interface IJSONWriter2
Parameters:
value - The value (in)
precision - The precision (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

writeDoubleEx

public void writeDoubleEx(java.lang.String name,
                          double value,
                          int precision)
                   throws java.io.IOException,
                          AutomationException
Writes a double with specified number of digits after decimal point.

Specified by:
writeDoubleEx in interface IJSONWriter2
Parameters:
name - The name (in)
value - The value (in)
precision - The precision (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

writeInt64

public void writeInt64(java.lang.String name,
                       long value)
                throws java.io.IOException,
                       AutomationException
Writes a LONGLONG.

Specified by:
writeInt64 in interface IJSONWriter3
Parameters:
name - The name (in)
value - Signed 64-bit int (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

writeInt64Val

public void writeInt64Val(long value)
                   throws java.io.IOException,
                          AutomationException
Writes a LONGLONG in array.

Specified by:
writeInt64Val in interface IJSONWriter3
Parameters:
value - Signed 64-bit int (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

writeUInt64

public void writeUInt64(java.lang.String name,
                        long value)
                 throws java.io.IOException,
                        AutomationException
Writes a ULONGLONG.

Specified by:
writeUInt64 in interface IJSONWriter3
Parameters:
name - The name (in)
value - Unsigned 64-bit int (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

writeUInt64Val

public void writeUInt64Val(long value)
                    throws java.io.IOException,
                           AutomationException
Writes a ULONGLONG in array.

Specified by:
writeUInt64Val in interface IJSONWriter3
Parameters:
value - Unsigned 64-bit int (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

interfaceSupportsErrorInfo

public void interfaceSupportsErrorInfo(GUID riid)
                                throws java.io.IOException,
                                       AutomationException
interfaceSupportsErrorInfo

Specified by:
interfaceSupportsErrorInfo in interface ISupportErrorInfo
Parameters:
riid - A Structure: com.esri.arcgis.support.ms.stdole.GUID (in)
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.