Class BCFVersion


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

      • 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 Detail

      • BCFVersion

        public BCFVersion​(int majorVersion,
                          int minorVersion)
    • 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