T - The feature type this codec readspublic abstract class AsciiFeatureCodec<T extends Feature> extends AbstractFeatureCodec<T,LineIterator>
| Modifier | Constructor and Description |
|---|---|
protected |
AsciiFeatureCodec(java.lang.Class<T> myClass) |
| Modifier and Type | Method and Description |
|---|---|
void |
close(LineIterator lineIterator)
Adapter method that closes the provided
SOURCE. |
T |
decode(LineIterator lineIterator)
Convenience method.
|
abstract T |
decode(java.lang.String s) |
boolean |
isDone(LineIterator lineIterator)
Adapter method that assesses whether the provided
SOURCE has more data. |
LocationAware |
makeIndexableSourceFromStream(java.io.InputStream bufferedInputStream)
Generates a
LocationAware reader of type SOURCE. |
LineIterator |
makeSourceFromStream(java.io.InputStream bufferedInputStream)
Generates a reader of type
SOURCE appropriate for use by this codec from the generic input stream. |
abstract java.lang.Object |
readActualHeader(LineIterator reader)
Read and return the header, or null if there is no header.
|
FeatureCodecHeader |
readHeader(LineIterator lineIterator)
Read and return the header, or null if there is no header.
|
decodeLoc, getFeatureTypeclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcanDecodeprotected AsciiFeatureCodec(java.lang.Class<T> myClass)
public void close(LineIterator lineIterator)
FeatureCodecSOURCE.public boolean isDone(LineIterator lineIterator)
FeatureCodecSOURCE has more data. True if it does, false otherwise.public LocationAware makeIndexableSourceFromStream(java.io.InputStream bufferedInputStream)
FeatureCodecLocationAware reader of type SOURCE. Like FeatureCodec.makeSourceFromStream(java.io.InputStream), except
the LocationAware compatibility is required for creating indexes.
Implementers of this method must return a type that is both LocationAware as well as SOURCE. Note that this
requirement cannot be enforced via the method signature due to limitations in Java's generic typing system. Instead, consumers
should cast the call result into a SOURCE when applicable.public LineIterator makeSourceFromStream(java.io.InputStream bufferedInputStream)
FeatureCodecSOURCE appropriate for use by this codec from the generic input stream. Implementers should
assume the stream is buffered.public T decode(LineIterator lineIterator)
Iterator.next() in implementing classes and, instead, have them implement
decode(String).lineIterator - the input stream from which to decode the next recordpublic abstract T decode(java.lang.String s)
public FeatureCodecHeader readHeader(LineIterator lineIterator) throws java.io.IOException
FeatureCodecSOURCE as needed to parse the header, and no
more. Otherwise, data that might otherwise be fed into parsing a Feature may be lost.lineIterator - the source from which to decode the headerjava.io.IOExceptionpublic abstract java.lang.Object readActualHeader(LineIterator reader)