public class FeatureReaderIterator<F extends Feature> extends Object implements Iterator<F>, Closeable
The Iterator's hasNext() will return false if the wrapped feature reader's hasNext method throws an exception. If next() throws an exception a NoSuchElementException will be thrown.
close()
shall be called before disposing the iterator. Before propagating an
exception from next()
or eating an exception from the underlying feature reader at
hasNext()
, this iterator will auto-close.
Constructor and Description |
---|
FeatureReaderIterator(FeatureReader<? extends FeatureType,F> reader) |
Modifier and Type | Method and Description |
---|---|
void |
close()
Close the reader please.
|
boolean |
hasNext() |
F |
next() |
void |
remove()
If this is a problem, a different iterator can be made based on FeatureWriter
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEachRemaining
public FeatureReaderIterator(FeatureReader<? extends FeatureType,F> reader)
public void remove()
public void close()
close
in interface Closeable
close
in interface AutoCloseable
Copyright © 1996–2019 Geotools. All rights reserved.