public abstract class AbstractFeatureCodec<FEATURE_TYPE extends Feature,SOURCE> extends java.lang.Object implements FeatureCodec<FEATURE_TYPE,SOURCE>
FeatureCodec.canDecode(String)
to indicate whether it can decode the file.
Note that that method is the only way that the right codec for a file is identified and that Modifier | Constructor and Description |
---|---|
protected |
AbstractFeatureCodec(java.lang.Class<FEATURE_TYPE> myClass) |
Modifier and Type | Method and Description |
---|---|
Feature |
decodeLoc(SOURCE source)
Decode a line to obtain just its FeatureLoc for indexing -- contig, start, and stop.
|
java.lang.Class<FEATURE_TYPE> |
getFeatureType()
This function returns the object the codec generates.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
canDecode, close, decode, getTabixFormat, isDone, makeIndexableSourceFromStream, makeSourceFromStream, readHeader
protected AbstractFeatureCodec(java.lang.Class<FEATURE_TYPE> myClass)
public Feature decodeLoc(SOURCE source) throws java.io.IOException
FeatureCodec
decodeLoc
in interface FeatureCodec<FEATURE_TYPE extends Feature,SOURCE>
source
- the input stream from which to decode the next recordjava.io.IOException
public java.lang.Class<FEATURE_TYPE> getFeatureType()
FeatureCodec
This function returns the object the codec generates. This is allowed to be Feature in the case where conditionally different types are generated. Be as specific as you can though.
This function is used by reflections based tools, so we can know the underlying type
getFeatureType
in interface FeatureCodec<FEATURE_TYPE extends Feature,SOURCE>