com.vividsolutions.jump.io
Class BaseFeatureInputStream
java.lang.Object
com.vividsolutions.jump.io.BaseFeatureInputStream
- All Implemented Interfaces:
- FeatureInputStream
- Direct Known Subclasses:
- PostgisFeatureInputStream
public abstract class BaseFeatureInputStream
- extends java.lang.Object
- implements FeatureInputStream
Base class for FeatureInputStreamReaders.
Handles the details of buffering the stream of features
to allow for lookahead.
This allows subclasses to implement the simpler semantics
of "return null if no more features".
Subclasses need to define readNext and close.
They also need to set the featureSchema instance variable.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BaseFeatureInputStream
public BaseFeatureInputStream()
getFeatureSchema
public abstract FeatureSchema getFeatureSchema()
- Specified by:
getFeatureSchema in interface FeatureInputStream
next
public Feature next()
throws java.lang.Exception
- Specified by:
next in interface FeatureInputStream
- Throws:
java.lang.Exception
hasNext
public boolean hasNext()
throws java.lang.Exception
- Specified by:
hasNext in interface FeatureInputStream
- Throws:
java.lang.Exception
readNext
protected abstract Feature readNext()
throws java.lang.Exception
- Read the next feature, if any.
- Returns:
- the next Feature, or
null if there is none
- Throws:
java.lang.Exception
close
public abstract void close()
throws java.lang.Exception
- Specified by:
close in interface FeatureInputStream
- Throws:
java.lang.Exception