# Class BCFVersion

java.lang.Object
htsjdk.variant.bcf2.BCFVersion

public final class BCFVersion extends Object
Simple holder for BCF version information User: depristo Date: 8/2/12 Time: 2:16 PM

## Field Summary

Fields
Modifier and Type
Field
Description
`static final byte[]`
`MAGIC_HEADER_START`
BCF2 begins with the MAGIC info BCF_M_m where M is the major version (currently 2) and m is the minor version, currently 1

## Constructor Summary

Constructors
Constructor
Description
`BCFVersion(int majorVersion, int minorVersion)`

## Method Summary

Modifier and Type
Method
Description
`boolean`
`equals(Object o)`
`int`
`getMajorVersion()`
`int`
`getMinorVersion()`
`int`
`hashCode()`
`static BCFVersion`
`readBCFVersion(InputStream stream)`
Return a new BCFVersion object describing the major and minor version of the BCF file in stream Note that stream must be at the very start of the file.
`String`
`toString()`
`void`
`write(OutputStream out)`
Write out the BCF magic information indicating this is a BCF file with corresponding major and minor versions

### Methods inherited from class Object

`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

## Field Details

### MAGIC_HEADER_START

public static final byte[] MAGIC_HEADER_START
BCF2 begins with the MAGIC info BCF_M_m where M is the major version (currently 2) and m is the minor version, currently 1

## Constructor Details

### BCFVersion

public BCFVersion(int majorVersion, int minorVersion)

## Method Details

### getMajorVersion

public int getMajorVersion()

Returns:
  the major version number of this BCF file

### getMinorVersion

public int getMinorVersion()

Returns:
  the minor version number of this BCF file

### readBCFVersion

public static BCFVersion readBCFVersion(InputStream stream) throws IOException
Return a new BCFVersion object describing the major and minor version of the BCF file in stream Note that stream must be at the very start of the file.

Parameters:
  `stream` -
Returns:
  a BCFVersion object, or null if stream doesn't contain a BCF file
Throws:
  `IOException`

### equals

public boolean equals(Object o)

Overrides:
  `equals` in class `Object`

### hashCode

public int hashCode()

Overrides:
  `hashCode` in class `Object`

### write

public void write(OutputStream out) throws IOException
Write out the BCF magic information indicating this is a BCF file with corresponding major and minor versions

Parameters:
  `out` -
Throws:
  `IOException`

### toString

public String toString()

Overrides:
  `toString` in class `Object`