FeatureCodec<FEATURE_TYPE,SOURCE>
AsciiFeatureCodec
public abstract class AbstractFeatureCodec<FEATURE_TYPE extends Feature,SOURCE> extends 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 | Description |
---|---|---|
protected |
AbstractFeatureCodec(Class<FEATURE_TYPE> myClass) |
Modifier and Type | Method | Description |
---|---|---|
Feature |
decodeLoc(SOURCE source) |
Decode a line to obtain just its FeatureLoc for indexing -- contig, start, and stop.
|
Class<FEATURE_TYPE> |
getFeatureType() |
This function returns the object the codec generates.
|
canDecode, close, decode, getTabixFormat, isDone, makeIndexableSourceFromStream, makeSourceFromStream, readHeader
protected AbstractFeatureCodec(Class<FEATURE_TYPE> myClass)
public Feature decodeLoc(SOURCE source) throws IOException
FeatureCodec
decodeLoc
in interface FeatureCodec<FEATURE_TYPE extends Feature,SOURCE>
source
- the input stream from which to decode the next recordIOException
public 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>