/* * GeoTools - The Open Source Java GIS Toolkit * http://geotools.org * * (C) 2004-2008, Open Source Geospatial Foundation (OSGeo) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; * version 2.1 of the License. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * */ package org.geotools.feature; import java.io.IOException; import java.util.Iterator; import java.util.NoSuchElementException; import org.geotools.data.FeatureReader; import org.opengis.feature.Feature; import org.opengis.feature.type.FeatureType; /** * An iterator that wraps around a FeatureReader. *
* 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. *
** {@link #close()} shall be called before disposing the iterator. Before propagating an exception * from {@link #next()} or eating an exception from the underlying feature reader at * {@link #hasNext()}, this iterator will auto-close. *
* * @author jeichar * @author Jody Garnett * @author Gabriel Roldan * * * @source $URL$ */ public class FeatureReaderIterator