public class KMLUtils extends Object
| Constructor and Description |
|---|
KMLUtils() |
| Modifier and Type | Method and Description |
|---|---|
static Document |
extractKMLFromArchive(File file)
Extracts the contents of the given ZIP archive and parses the first
root-level KML document found within it.
|
public static Document extractKMLFromArchive(File file) throws IOException, SAXException
.kml extension is expected, however.file - A File object that presumably represents a KMZ file (ZIP
archive).null if a root-level KML file could
not be found in the archive.IOException - The file was not a valid ZIP archive or some other I/O error
occurred.SAXException - If a KML document was found but it is not well-formed.Copyright © 2014 Open Geospatial Consortium. All rights reserved.