Package nl.tudelft.simulation.dsol.animation.gis.osm

## Class XmlStreamReader

- java.lang.Object
- - nl.tudelft.simulation.dsol.animation.gis.osm.XmlStreamReader

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 XmlStreamReader
    extends Object
    implements org.openstreetmap.osmosis.core.task.v0_6.RunnableSource

XmlStreamReader is a variant on XmlReader from the Osmosis library that takes a stream rather than a file as input to enable parsing of osm files that happen to be inside a jar file, or online. This file is based on the class XmlRreader from the osmosis-xml project.

Copyright (c) 2022-2022 Delft University of Technology, Jaffalaan 5, 2628 BX Delft, the Netherlands. All rights reserved. See for project information DSOL Manual. The DSOL project is distributed under a three-clause BSD-style license, which can be found at DSOL License.

Author:
  Alexander Verbraeck

### Constructor Summary

Constructors
`XmlStreamReader​(InputStream inputStream, boolean enableDateParsing, org.openstreetmap.osmosis.xml.common.CompressionMethod compressionMethod)` Create a new XmlReader based on an InputStream rather than on a File.

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `run()`
`void` `setSink​(org.openstreetmap.osmosis.core.task.v0_6.Sink sink)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### XmlStreamReader

    public XmlStreamReader​(InputStream inputStream,
                           boolean enableDateParsing,
                           org.openstreetmap.osmosis.xml.common.CompressionMethod compressionMethod)

Create a new XmlReader based on an InputStream rather than on a File.

Parameters:
  `inputStream` - InputStream; the stream to read from
  `enableDateParsing` - boolean; If true, dates will be parsed from xml data, else the current date will be used thus saving parsing time.
  `compressionMethod` - CompressionMethod; Specifies the compression method to employ

### Method Detail

#### 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()

Specified by:
  `run` in interface `Runnable`