Example #1
0
        public static D1BDHeader Get1BDHeader(string filename)
        {
            FileStream   fs         = null;
            BinaryReader br         = null;
            D1BDHeader   d1bdHeader = null;

            try
            {
                fs         = new FileStream(filename, FileMode.Open, FileAccess.Read);
                br         = new BinaryReader(fs, Encoding.Default);
                d1bdHeader = new SecHlder1BDFileHeader().Create(fs, br, 0, 22016) as D1BDHeader;
            }
            finally
            {
                if (fs != null)
                {
                    fs.Close();
                }
                if (br != null)
                {
                    br.Close();
                }
            }
            return(d1bdHeader);
        }
Example #2
0
 public L1BDataProvider(string fileName)
 {
     this.fileName = fileName;
     _d1bdHeader   = SecHlder1BDFileHeader.Get1BDHeader(fileName);
     using (FileStream fs = new FileStream(fileName, FileMode.Open))
     {
         long len = fs.Length;
         _factOfLine = (int)(len / _sizeOfLine - 1);
     }
 }