Class XmlReader

java.lang.Object
org.openstreetmap.osmosis.xml.v0_6.impl.BaseXMLReader
org.openstreetmap.osmosis.xml.v0_6.XmlReader
All Implemented Interfaces:
Runnable, org.openstreetmap.osmosis.core.task.common.Task, org.openstreetmap.osmosis.core.task.v0_6.RunnableSource, org.openstreetmap.osmosis.core.task.v0_6.Source

public class XmlReader extends BaseXMLReader implements org.openstreetmap.osmosis.core.task.v0_6.RunnableSource
An OSM data source reading from an xml file. The entire contents of the file are read.
  • Constructor Details

    • XmlReader

      public XmlReader(File file, boolean enableDateParsing, CompressionMethod compressionMethod)
      Creates a new instance.
      Parameters:
      file - The file to read.
      enableDateParsing - If true, dates will be parsed from xml data, else the current date will be used thus saving parsing time.
      compressionMethod - Specifies the compression method to employ.
  • Method Details

    • setSink

      public void setSink(org.openstreetmap.osmosis.core.task.v0_6.Sink sink)
      Specified by:
      setSink in interface org.openstreetmap.osmosis.core.task.v0_6.Source
    • run

      public void run()
      Reads all data from the file and send it to the sink.
      Specified by:
      run in interface Runnable