|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.esri.arcgis.system.ZipArchive
The ZipArchive object which manages zip archives.
| Constructor Summary | |
ZipArchive()
Constructs a ZipArchive using ArcGIS Engine. |
|
ZipArchive(java.lang.Object obj)
Deprecated. As of ArcGIS 9.2, replaced by normal Java casts. |
|
| Method Summary | |
void |
addFile(java.lang.String inputFile)
Compresses a file and adds it to the archive. |
void |
closeArchive()
Closes the archive. |
void |
createArchive(java.lang.String archiveName)
Creates a new archive. |
boolean |
equals(java.lang.Object o)
Compare this object with another |
void |
extract(java.lang.String outputDir)
Extracts all items in the archive to the output directory. |
void |
extractFile(java.lang.String file,
java.lang.String outputDir)
Extracts a file from the archive to the output directory. |
IZipArchive |
getAsIZipArchive()
Deprecated. No replacement. The object reference can be directly used where the implemented interface is needed. |
static java.lang.String |
getClsid()
|
IEnumBSTR |
getFileNames()
Gets the list of files in the archive. |
int |
hashCode()
the hashcode for this object |
void |
openArchive(java.lang.String archiveName)
Opens an existing archive. |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public ZipArchive()
throws java.io.IOException,
java.net.UnknownHostException
java.io.IOException - if there are interop problems
java.net.UnknownHostException - if there are interop problems
public ZipArchive(java.lang.Object obj)
throws java.io.IOException
obj to ZipArchive. ZipArchive theZipArchive = (ZipArchive) obj;
obj - an object returned from ArcGIS Engine or Server
java.io.IOException - if there are interop problems| Method Detail |
public static java.lang.String getClsid()
public IZipArchive getAsIZipArchive()
public boolean equals(java.lang.Object o)
public int hashCode()
public void openArchive(java.lang.String archiveName)
throws java.io.IOException,
AutomationException
IZipArchiveOpens 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)
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
public void createArchive(java.lang.String archiveName)
throws java.io.IOException,
AutomationException
IZipArchiveCreates 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)
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.
public void closeArchive()
throws java.io.IOException,
AutomationException
IZipArchiveCloses 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 IZipArchivejava.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
public void addFile(java.lang.String inputFile)
throws java.io.IOException,
AutomationException
IZipArchiveCompresses 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)
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
public IEnumBSTR getFileNames()
throws java.io.IOException,
AutomationException
IZipArchiveReturns 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 IZipArchivejava.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
public void extractFile(java.lang.String file,
java.lang.String outputDir)
throws java.io.IOException,
AutomationException
IZipArchiveThe 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)
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.
public void extract(java.lang.String outputDir)
throws java.io.IOException,
AutomationException
IZipArchiveThe 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)
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||