|
NASA World Wind | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectgov.nasa.worldwindx.examples.kml.KMZDocumentBuilder
public class KMZDocumentBuilder
Utility class to create KMZ documents. The builder creates a KMZ archive with one KML file inside the archive. Objects that support export in KML format can be written to the KML file.
| Field Summary | |
|---|---|
protected XMLStreamWriter |
writer
|
protected ZipOutputStream |
zipStream
|
| Constructor Summary | |
|---|---|
KMZDocumentBuilder(OutputStream stream)
Create a KMZ document using an OutputStream. |
|
| Method Summary | |
|---|---|
void |
close()
Close the document builder. |
protected void |
endDocument()
End the KMZ document. |
protected String |
getMainFileName()
Get the name of the KML file inside of the KMZ archive. |
protected void |
startDocument()
Start the KMZ document and write namespace declarations. |
void |
writeObject(Exportable exportable)
Write an Exportable object to the document. |
void |
writeObjects(Exportable... exportables)
Write a list of Exportable objects to the document. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected XMLStreamWriter writer
protected ZipOutputStream zipStream
| Constructor Detail |
|---|
public KMZDocumentBuilder(OutputStream stream)
throws XMLStreamException,
IOException
stream - Stream to receive KMZ output.
XMLStreamException - If an exception is encountered while writing KML.
IOException - If an exception occurs writing to the output stream.| Method Detail |
|---|
public void close()
throws XMLStreamException,
IOException
XMLStreamException - If an error is encountered while writing KML.
IOException - If an exception occurs closing the output stream.
protected void endDocument()
throws XMLStreamException,
IOException
XMLStreamException - If an error is encountered while writing KML.
IOException - If an exception occurs writing to the output stream.protected String getMainFileName()
protected void startDocument()
throws XMLStreamException,
IOException
XMLStreamException - If an error is encountered while writing KML.
IOException - If an exception occurs writing to the output stream.
public void writeObject(Exportable exportable)
throws IOException
Exportable object to the document. If the object does not support export in
KML format, it will be ignored.
exportable - Object to export in KML.
IOException - If an error is encountered while writing KML.
public void writeObjects(Exportable... exportables)
throws IOException
Exportable objects to the document. If any objects do not support export in KML format,
they will be ignored.
exportables - List of objects to export in KML.
IOException - If an error is encountered while writing KML.
|
NASA World Wind | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||