public class OsmXmlIterator extends Object implements OsmIterator, OsmHandler
hasNext()
and next()
return
data. When the buffer is not full, those methods will use a monitor to wait
for more data.Constructor and Description |
---|
OsmXmlIterator(File file,
boolean parseMetadata) |
OsmXmlIterator(InputStream inputStream,
boolean parseMetadata) |
OsmXmlIterator(String pathname,
boolean parseMetadata) |
Modifier and Type | Method and Description |
---|---|
void |
complete() |
OsmBounds |
getBounds() |
void |
handle(OsmBounds bounds) |
void |
handle(OsmNode node) |
void |
handle(OsmRelation relation) |
void |
handle(OsmWay way) |
boolean |
hasBounds() |
boolean |
hasNext() |
Iterator<EntityContainer> |
iterator() |
EntityContainer |
next() |
void |
remove() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
forEachRemaining
public OsmXmlIterator(InputStream inputStream, boolean parseMetadata)
public OsmXmlIterator(File file, boolean parseMetadata) throws FileNotFoundException
FileNotFoundException
public OsmXmlIterator(String pathname, boolean parseMetadata) throws FileNotFoundException
FileNotFoundException
public Iterator<EntityContainer> iterator()
iterator
in interface Iterable<EntityContainer>
public boolean hasNext()
hasNext
in interface Iterator<EntityContainer>
public EntityContainer next()
next
in interface Iterator<EntityContainer>
public void remove()
remove
in interface Iterator<EntityContainer>
public void complete()
complete
in interface OsmHandler
public void handle(OsmBounds bounds) throws IOException
handle
in interface OsmHandler
IOException
public void handle(OsmNode node)
handle
in interface OsmHandler
public void handle(OsmWay way)
handle
in interface OsmHandler
public void handle(OsmRelation relation)
handle
in interface OsmHandler
public boolean hasBounds()
hasBounds
in interface OsmIterator
public OsmBounds getBounds()
getBounds
in interface OsmIterator