Package htsjdk.variant.vcf
Class VCFRecordCodec
java.lang.Object
htsjdk.variant.vcf.VCFRecordCodec
- All Implemented Interfaces:
SortingCollection.Codec<VariantContext>,Cloneable
Writes VariantContext instances to an OutputStream without headers or metadata. For use
with SortingCollection ONLY.
-
Constructor Summary
ConstructorsConstructorDescriptionVCFRecordCodec(VCFHeader header) VCFRecordCodec(VCFHeader header, boolean allowMissingFieldsInHeader) -
Method Summary
Modifier and TypeMethodDescriptionclone()Must return a cloned copy of the codec that can be used independently of the original instance.decode()Read the next record from the input stream and convert into a java object.voidencode(VariantContext context) Write object to output streamvoidsetInputStream(InputStream stream) Where to read encoded input fromvoidsetOutputStream(OutputStream stream) Where to write encoded output
-
Constructor Details
-
VCFRecordCodec
-
VCFRecordCodec
-
-
Method Details
-
setOutputStream
Description copied from interface:SortingCollection.CodecWhere to write encoded output- Specified by:
setOutputStreamin interfaceSortingCollection.Codec<VariantContext>
-
setInputStream
Description copied from interface:SortingCollection.CodecWhere to read encoded input from- Specified by:
setInputStreamin interfaceSortingCollection.Codec<VariantContext>
-
encode
Description copied from interface:SortingCollection.CodecWrite object to output stream- Specified by:
encodein interfaceSortingCollection.Codec<VariantContext>- Parameters:
context- what to write
-
decode
Description copied from interface:SortingCollection.CodecRead the next record from the input stream and convert into a java object.- Specified by:
decodein interfaceSortingCollection.Codec<VariantContext>- Returns:
- null if no more records. Should throw exception if EOF is encountered in the middle of a record.
-
clone
Description copied from interface:SortingCollection.CodecMust return a cloned copy of the codec that can be used independently of the original instance. This is required so that multiple codecs can exist simultaneously that each is reading a separate file.- Specified by:
clonein interfaceSortingCollection.Codec<VariantContext>- Overrides:
clonein classObject
-