public interface Exportable
isExportFormatSupported(String)to determine if an object supports export in a certain format. Example of use:
// Export a PointPlacemark in KML format PointPlacemark placemark; StringWriter kml = new StringWriter(); placemark.export(KMLConstants.KML_MIME_TYPE, kml);
|Modifier and Type||Field and Description|
static final String FORMAT_NOT_SUPPORTED
isExportFormatSupported(String)if the object does not support export to the given format.
static final String FORMAT_PARTIALLY_SUPPORTED
isExportFormatSupported(String)if the object contains some objects that support does not support export to the given format, but others that do not. For example, a Layer might contain some objects that support the export format, and some that do not.
void export(String mimeType, Object output) throws IOException, UnsupportedOperationException
mimeType- Desired export format. Call
isExportFormatSupported(String)to make sure that the object supports the format before trying to export, or be prepared to handle
output- Object that will receive the exported data. The type of this object depends on the export format. All formats should support
java.io.OutputStream. Text based format (for example, XML formats) should also support
java.io.Writer. Certain formats may also support other object types.
IOException- if an exception occurs while exporting the data.
UnsupportedOperationException- if the format is not supported by this object, or if the
outputargument is not of a supported type.