|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.esri.arcgis.system.ZipArchive
public class ZipArchive
The ZipArchive object which manages zip archives.
| Constructor Summary | |
|---|---|
ZipArchive()
Constructs a ZipArchive using ArcGIS Engine. |
|
ZipArchive(Object obj)
Deprecated. As of ArcGIS 9.2, replaced by normal Java casts. ZipArchive theZipArchive = (ZipArchive) obj; |
|
| Method Summary | |
|---|---|
void |
addFile(String inputFile)
Compresses a file and adds it to the archive. |
void |
closeArchive()
Closes the archive. |
void |
createArchive(String archiveName)
Creates a new archive. |
boolean |
equals(Object o)
Compare this object with another |
void |
extract(String outputDir)
Extracts all items in the archive to the output directory. |
void |
extractFile(String file,
String outputDir)
Extracts a file from the archive to the output directory. |
static String |
getClsid()
getClsid. |
IEnumBSTR |
getFileNames()
Obtains the list of files in the archive. |
int |
hashCode()
the hashcode for this object |
void |
openArchive(String archiveName)
Opens an existing archive. |
| 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 |
|---|
public ZipArchive()
throws IOException,
UnknownHostException
IOException - if there are interop problems
UnknownHostException - if there are interop problems
public ZipArchive(Object obj)
throws IOException
ZipArchive theZipArchive = (ZipArchive) obj;
obj to ZipArchive.
obj - an object returned from ArcGIS Engine or Server
IOException - if there are interop problems| Method Detail |
|---|
public static String getClsid()
public boolean equals(Object o)
equals in class Objectpublic int hashCode()
hashCode in class Object
public void openArchive(String archiveName)
throws IOException,
AutomationException
Opens an existing zip archive with the specified file name.
Ensure the zip archive you want to open is not empty, as OpenArchive method would fail if the archive doesn't contain anything in it.
openArchive in interface IZipArchivearchiveName - The archiveName (in)
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
public void createArchive(String archiveName)
throws IOException,
AutomationException
Creates a new zip archive with the specified file name. The file name must include the zip extension (*.zip).
If a zip archive with the specified file name already exists it will automatically be replaced with a new empty zip archive and the contents of the previous zip archive will be lost.
createArchive in interface IZipArchivearchiveName - The archiveName (in)
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
public void closeArchive()
throws IOException,
AutomationException
Closes the zip archive. In order to open an archive use either the CreateArchive (create a new archive) or OpenArchive (open existing one) methods.
closeArchive in interface IZipArchiveIOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
public void addFile(String inputFile)
throws IOException,
AutomationException
Compresses and adds the specified file to the zip archive. Ensure the zip archive is open before using the AddFile method by either using the CreateArchive (if you just created an archive) or OpenArchive (if you are using a previously created archive) methods.
Note, you cannot use the AddFile method to add the contents of a directory to a zip archive.
addFile in interface IZipArchiveinputFile - The inputFile (in)
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
public IEnumBSTR getFileNames()
throws IOException,
AutomationException
Returns an enumeration of file names in the zip archive. Ensure the zip archive is open before using the GetFileNames method by using the OpenArchive method.
getFileNames in interface IZipArchiveIOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
public void extractFile(String file,
String outputDir)
throws IOException,
AutomationException
The ExtractFile method extracts the specified compressed file in the zip archive into the specified directory. Use the GetFileNames method to return an enumeration of files in the zip archive. Ensure the zip archive is open before using the ExtractFile method by using the OpenArchive method.
extractFile in interface IZipArchivefile - The file (in)outputDir - The outputDir (in)
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
public void extract(String outputDir)
throws IOException,
AutomationException
The Extract method extracts all of the compressed files in the zip archive into the specified directory. Ensure the zip archive is open before using the Extract method by using the OpenArchive method.
extract in interface IZipArchiveoutputDir - The outputDir (in)
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||