|
NASA World Wind | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface Exportable
Exportable marks an object that can be exported in different data formats. Implementing classes may support one or
more export formats. Formats are identified by MIME type. Call isExportFormatSupported(String) to determine
if an object supports export in a certain format.
// Export a PointPlacemark in KML format PointPlacemark placemark; StringWriter kml = new StringWriter(); placemark.export(KMLConstants.KML_MIME_TYPE, kml);
| Field Summary | |
|---|---|
static String |
FORMAT_NOT_SUPPORTED
Returned by isExportFormatSupported(String) if the object does not support export to the given format. |
static String |
FORMAT_PARTIALLY_SUPPORTED
Returned by isExportFormatSupported(String) if the object contains some objects that support does not
support export to the given format, but others that do not. |
static String |
FORMAT_SUPPORTED
Returned by isExportFormatSupported(String) if the object does support export to the given format. |
| Method Summary | |
|---|---|
void |
export(String mimeType,
Object output)
Exports the object to a format. |
String |
isExportFormatSupported(String mimeType)
Does this object support a certain export format? |
| Field Detail |
|---|
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.
static final String FORMAT_SUPPORTED
isExportFormatSupported(String) if the object does support export to the given format.
| Method Detail |
|---|
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 UnsupportedOperationException.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 output
argument is not of a supported type.isExportFormatSupported(String)String isExportFormatSupported(String mimeType)
mimeType - Desired export format.
FORMAT_SUPPORTED, FORMAT_NOT_SUPPORTED, or FORMAT_PARTIALLY_SUPPORTED.export(String, Object)
|
NASA World Wind | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||