# Class VCFEncoderV4_2

java.lang.Object
htsjdk.beta.codecs.variants.vcf.VCFEncoder
htsjdk.beta.codecs.variants.vcf.vcfv4_2.VCFEncoderV4_2

All Implemented Interfaces:
  `HtsEncoder<VCFHeader, VariantContext>, VariantsEncoder, Closeable, AutoCloseable`

public class VCFEncoderV4_2 extends VCFEncoder
VCF V4.2 encoder.

## Constructor Summary

Constructors
Constructor
Description
`VCFEncoderV4_2(Bundle outputBundle, VariantsEncoderOptions variantsEncoderOptions)`
Create a new VCF V4.2 encoder.

## Method Summary

Modifier and Type
Method
Description
`HtsVersion`
`getVersion()`
Get the version of the file format supported by this encoder.

### Methods inherited from class VCFEncoder

`close, getDisplayName, getFileFormat, getOutputBundle, getVariantsEncoderOptions, setHeader, write`

### Methods inherited from class Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### VCFEncoderV4_2

public VCFEncoderV4_2(Bundle outputBundle, VariantsEncoderOptions variantsEncoderOptions)
Create a new VCF V4.2 encoder.

Parameters:
  `outputBundle` - the output `Bundle` to encoder
  `variantsEncoderOptions` - the `VariantsEncoderOptions` to use

## Method Details

### getVersion

public HtsVersion getVersion()
Description copied from interface: `HtsEncoder`
Get the version of the file format supported by this encoder.