com.esri.arcgis.system
Class XMLStream

java.lang.Object
  extended by com.esri.arcgis.system.XMLStream
All Implemented Interfaces:
com.esri.arcgis.interop.RemoteObjRef, ISequentialStream, IStream, IXMLStream, Serializable

public class XMLStream
extends Object
implements com.esri.arcgis.interop.RemoteObjRef, IXMLStream, IStream

An in-memory XML stream.

Remarks

Use the XMLStream coclass when you wish to provide access to members that control an in-memory XML stream. XMLStream is a wrapper on a memory blob stream and would be useful when documents are small. XMLWriter and XMLReader should be used with XMLStream in order to write and read the stream.


See the IXMLStream interface for more on getting information about streaming of objects.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

See Also:
IXMLStream, IXMLWriter, IXMLReader, IXMLSerialize, Serialized Form

Constructor Summary
XMLStream()
          Constructs a XMLStream using ArcGIS Engine.
XMLStream(Object obj)
          Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.
XMLStream theXMLStream = (XMLStream) obj;
 
Method Summary
 void commit(int grfCommitFlags)
          commit
 boolean equals(Object o)
          Compare this object with another
 void esri_clone(IStream[] ppstm)
          esri_clone
static String getClsid()
          getClsid.
 int hashCode()
          the hashcode for this object
 void loadFromBytes(byte[] bytes)
          Loads from a UTF-8 byte array.
 void loadFromFile(String filePath)
          Loads from a file path.
 void loadFromString(String xML)
          Loads from a string.
 void lockRegion(_ULARGE_INTEGER libOffset, _ULARGE_INTEGER cb, int dwLockType)
          lockRegion
 void remoteCopyTo(IStream pstm, _ULARGE_INTEGER cb, _ULARGE_INTEGER[] pcbRead, _ULARGE_INTEGER[] pcbWritten)
          remoteCopyTo
 void remoteRead(byte[] pv, int cb, int[] pcbRead)
          remoteRead
 void remoteSeek(_LARGE_INTEGER dlibMove, int dwOrigin, _ULARGE_INTEGER[] plibNewPosition)
          remoteSeek
 void remoteWrite(byte[] pv, int cb, int[] pcbWritten)
          remoteWrite
 void reset()
          Resets the stream to the beginning.
 void revert()
          revert
 byte[] saveToBytes()
          Saves to a UTF-8 byte array.
 void saveToFile(String filePath)
          Saves to a file path.
 String saveToString()
          Saves to a string.
 void setSize(_ULARGE_INTEGER libNewSize)
          setSize
 void stat(tagSTATSTG[] pstatstg, int grfStatFlag)
          stat
 void unlockRegion(_ULARGE_INTEGER libOffset, _ULARGE_INTEGER cb, int dwLockType)
          unlockRegion
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.esri.arcgis.interop.RemoteObjRef
getJintegraDispatch, release
 

Constructor Detail

XMLStream

public XMLStream()
          throws IOException,
                 UnknownHostException
Constructs a XMLStream using ArcGIS Engine.

Throws:
IOException - if there are interop problems
UnknownHostException - if there are interop problems

XMLStream

public XMLStream(Object obj)
          throws IOException
Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.
XMLStream theXMLStream = (XMLStream) obj;

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

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

getClsid

public static String getClsid()
getClsid.


equals

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

Overrides:
equals in class Object

hashCode

public int hashCode()
the hashcode for this object

Overrides:
hashCode in class Object

loadFromString

public void loadFromString(String xML)
                    throws IOException,
                           AutomationException
Loads from a string.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
loadFromString in interface IXMLStream
Parameters:
xML - The xML (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

loadFromFile

public void loadFromFile(String filePath)
                  throws IOException,
                         AutomationException
Loads from a file path.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
loadFromFile in interface IXMLStream
Parameters:
filePath - The filePath (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

loadFromBytes

public void loadFromBytes(byte[] bytes)
                   throws IOException,
                          AutomationException
Loads from a UTF-8 byte array.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
loadFromBytes in interface IXMLStream
Parameters:
bytes - An unsigned byte (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

saveToString

public String saveToString()
                    throws IOException,
                           AutomationException
Saves to a string.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
saveToString in interface IXMLStream
Returns:
The xML
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

saveToFile

public void saveToFile(String filePath)
                throws IOException,
                       AutomationException
Saves to a file path.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
saveToFile in interface IXMLStream
Parameters:
filePath - The filePath (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

saveToBytes

public byte[] saveToBytes()
                   throws IOException,
                          AutomationException
Saves to a UTF-8 byte array.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

reset

public void reset()
           throws IOException,
                  AutomationException
Resets the stream to the beginning.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

remoteSeek

public void remoteSeek(_LARGE_INTEGER dlibMove,
                       int dwOrigin,
                       _ULARGE_INTEGER[] plibNewPosition)
                throws IOException,
                       AutomationException
remoteSeek

Description

IStream is a Microsoft interface. Please refer to MSDN for information about this interface.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
remoteSeek in interface IStream
Parameters:
dlibMove - 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)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setSize

public void setSize(_ULARGE_INTEGER libNewSize)
             throws IOException,
                    AutomationException
setSize

Description

IStream is a Microsoft interface. Please refer to MSDN for information about this interface.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
setSize in interface IStream
Parameters:
libNewSize - A Structure: com.esri.arcgis.system._ULARGE_INTEGER (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

remoteCopyTo

public void remoteCopyTo(IStream pstm,
                         _ULARGE_INTEGER cb,
                         _ULARGE_INTEGER[] pcbRead,
                         _ULARGE_INTEGER[] pcbWritten)
                  throws IOException,
                         AutomationException
remoteCopyTo

Description

IStream is a Microsoft interface. Please refer to MSDN for information about this interface.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
remoteCopyTo in interface IStream
Parameters:
pstm - 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)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

commit

public void commit(int grfCommitFlags)
            throws IOException,
                   AutomationException
commit

Description

IStream is a Microsoft interface. Please refer to MSDN for information about this interface.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
commit in interface IStream
Parameters:
grfCommitFlags - The grfCommitFlags (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

revert

public void revert()
            throws IOException,
                   AutomationException
revert

Description

IStream is a Microsoft interface. Please refer to MSDN for information about this interface.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
revert in interface IStream
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

lockRegion

public void lockRegion(_ULARGE_INTEGER libOffset,
                       _ULARGE_INTEGER cb,
                       int dwLockType)
                throws IOException,
                       AutomationException
lockRegion

Description

IStream is a Microsoft interface. Please refer to MSDN for information about this interface.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
lockRegion in interface IStream
Parameters:
libOffset - A Structure: com.esri.arcgis.system._ULARGE_INTEGER (in)
cb - A Structure: com.esri.arcgis.system._ULARGE_INTEGER (in)
dwLockType - The dwLockType (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

unlockRegion

public void unlockRegion(_ULARGE_INTEGER libOffset,
                         _ULARGE_INTEGER cb,
                         int dwLockType)
                  throws IOException,
                         AutomationException
unlockRegion

Description

IStream is a Microsoft interface. Please refer to MSDN for information about this interface.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
unlockRegion in interface IStream
Parameters:
libOffset - A Structure: com.esri.arcgis.system._ULARGE_INTEGER (in)
cb - A Structure: com.esri.arcgis.system._ULARGE_INTEGER (in)
dwLockType - The dwLockType (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

stat

public void stat(tagSTATSTG[] pstatstg,
                 int grfStatFlag)
          throws IOException,
                 AutomationException
stat

Description

IStream is a Microsoft interface. Please refer to MSDN for information about this interface.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
stat in interface IStream
Parameters:
pstatstg - A Structure: com.esri.arcgis.system.tagSTATSTG (out: use single element array)
grfStatFlag - The grfStatFlag (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

esri_clone

public void esri_clone(IStream[] ppstm)
                throws IOException,
                       AutomationException
esri_clone

Product Availability

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

Specified by:
esri_clone in interface IStream
Parameters:
ppstm - A reference to a com.esri.arcgis.system.IStream (out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

remoteRead

public void remoteRead(byte[] pv,
                       int cb,
                       int[] pcbRead)
                throws IOException,
                       AutomationException
remoteRead

Description

ISequentialStream is a Microsoft interface. Please refer to MSDN for information about this interface.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
remoteRead in interface ISequentialStream
Parameters:
pv - An unsigned byte (out: use single element array)
cb - The cb (in)
pcbRead - The pcbRead (out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

remoteWrite

public void remoteWrite(byte[] pv,
                        int cb,
                        int[] pcbWritten)
                 throws IOException,
                        AutomationException
remoteWrite

Description

ISequentialStream is a Microsoft interface. Please refer to MSDN for information about this interface.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
remoteWrite in interface ISequentialStream
Parameters:
pv - An unsigned byte (in)
cb - The cb (in)
pcbWritten - The pcbWritten (out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.