Package htsjdk.variant.bcf2
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 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
All Methods Static Methods Instance Methods Concrete Methods 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
-
-
-
Method Detail
-
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
-
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
-
-