public BaseParser(string indexPath) { airdInfo = AirdScanUtil.loadAirdInfo(indexPath); if (airdInfo == null) { throw new Exception(ResultCodeEnum.AIRD_INDEX_FILE_PARSE_ERROR.Message); } try { airdFile = File.OpenRead(FileNameUtil.getAirdPathByIndexPath(indexPath)); } catch (FileNotFoundException e) { Console.WriteLine(e.ToString()); Console.Write(e.StackTrace); throw new Exception(ResultCodeEnum.AIRD_FILE_PARSE_ERROR.Message); } mzCompressor = CompressUtil.getMzCompressor(airdInfo.compressors); intCompressor = CompressUtil.getIntCompressor(airdInfo.compressors); mzPrecision = mzCompressor.precision; type = airdInfo.type; }