Class XmlWriter
java.lang.Object
org.openstreetmap.osmosis.xml.common.BaseXmlWriter
org.openstreetmap.osmosis.xml.v0_6.XmlWriter
- All Implemented Interfaces:
AutoCloseable,org.openstreetmap.osmosis.core.lifecycle.Closeable,org.openstreetmap.osmosis.core.lifecycle.Completable,org.openstreetmap.osmosis.core.task.common.Task,org.openstreetmap.osmosis.core.task.v0_6.Initializable,org.openstreetmap.osmosis.core.task.v0_6.Sink
public class XmlWriter
extends BaseXmlWriter
implements org.openstreetmap.osmosis.core.task.v0_6.Sink
An OSM data sink for storing all data to an xml file.
-
Constructor Summary
ConstructorsConstructorDescriptionXmlWriter(BufferedWriter writer) Creates a new instance.XmlWriter(File file, CompressionMethod compressionMethod) Creates a new instance.XmlWriter(File file, CompressionMethod compressionMethod, boolean legacyBound) Creates a new instance. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidCalls the begin method of the element writer used for this implementation.protected voidCalls the end method of the element writer used for this implementation.voidprocess(org.openstreetmap.osmosis.core.container.v0_6.EntityContainer entityContainer) protected voidSets the writer on the element writer used for this implementation.Methods inherited from class org.openstreetmap.osmosis.xml.common.BaseXmlWriter
close, complete, initialize, initializeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.openstreetmap.osmosis.core.lifecycle.Closeable
closeMethods inherited from interface org.openstreetmap.osmosis.core.lifecycle.Completable
completeMethods inherited from interface org.openstreetmap.osmosis.core.task.v0_6.Initializable
initialize
-
Constructor Details
-
XmlWriter
Creates a new instance.- Parameters:
writer- The writer to send all data to.
-
XmlWriter
Creates a new instance.- Parameters:
file- The file to write.compressionMethod- Specifies the compression method to employ.
-
XmlWriter
Creates a new instance.- Parameters:
file- The file to write.compressionMethod- Specifies the compression method to employ.legacyBound- If true, write the legacy <bound> element instead of the correct <bounds> one.
-
-
Method Details
-
process
public void process(org.openstreetmap.osmosis.core.container.v0_6.EntityContainer entityContainer) - Specified by:
processin interfaceorg.openstreetmap.osmosis.core.task.v0_6.Sink
-
beginElementWriter
protected void beginElementWriter()Calls the begin method of the element writer used for this implementation.- Specified by:
beginElementWriterin classBaseXmlWriter
-
endElementWriter
protected void endElementWriter()Calls the end method of the element writer used for this implementation.- Specified by:
endElementWriterin classBaseXmlWriter
-
setWriterOnElementWriter
Sets the writer on the element writer used for this implementation.- Specified by:
setWriterOnElementWriterin classBaseXmlWriter- Parameters:
writer- The writer receiving xml data.
-