Exemple #1
0
            /// <summary>
            /// </summary>
            protected void ReadHeader()
            {
                _header = new DbaseFileHeader();
                // read the header
                _header.ReadHeader(_dbfReader, _parent._encodingProvider);

                // how many records remain
                _readPosition = _header.HeaderLength;
            }
Exemple #2
0
 /// <summary>
 /// Gets the header information for the dbase file.
 /// </summary>
 /// <returns>DbaseFileHeader contain header and field information.</returns>
 public DbaseFileHeader GetHeader()
 {
     if (_header == null)
     {
         using (var dbfReader = new BinaryReader(_streamProvider.OpenRead()))
         {
             // read the header
             _header = new DbaseFileHeader();
             _header.ReadHeader(dbfReader, _encodingProvider);
         }
     }
     return(_header);
 }