com.esri.arcgis.enginecore
Class PackageFile

java.lang.Object
  extended by com.esri.arcgis.enginecore.PackageFile
All Implemented Interfaces:
IPackageFile, com.esri.arcgis.interop.RemoteObjRef, Serializable

public class PackageFile
extends Object
implements com.esri.arcgis.interop.RemoteObjRef, IPackageFile

An object for holding package files.

Product Availability

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

See Also:
Serialized Form

Constructor Summary
PackageFile()
          Constructs a PackageFile using ArcGIS Engine.
PackageFile(Object obj)
          Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.
PackageFile thePackageFile = (PackageFile) obj;
 
Method Summary
 boolean equals(Object o)
          Compare this object with another
static String getClsid()
          getClsid.
 int hashCode()
          the hashcode for this object
 IStringArray unpack(String fileorURL, String[] pUnpackLocation)
          Unpacks a package.
 
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

PackageFile

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

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

PackageFile

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

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

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

unpack

public IStringArray unpack(String fileorURL,
                           String[] pUnpackLocation)
                    throws IOException,
                           AutomationException
Unpacks a package.

Description

The Unpack method requires a reference to a string and the path to the package that is being unpacked. Developers can pass in a string to the location they want the package to unpack to. This should be a general location. After the package unpacks the string will be updated with the path to the content of the package. For example, if a you are unpacking a Map Package to c:\Packages, the unpack location string will be updated to the path to the MXD.

If a package has been previously unpacked to a different location the path to the previous location will be returned. Passing in an empty string will use the default package location.

The unpack method returns a StringArray containing the path to the package content.

Remarks

The unpack method does not support Geoprocessing Packages.

Product Availability

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

Specified by:
unpack in interface IPackageFile
Parameters:
fileorURL - The fileorURL (in)
pUnpackLocation - The pUnpackLocation (in/out: use single element array)
Returns:
A reference to a com.esri.arcgis.system.IStringArray
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.