New to Telerik UI for WinForms? Start a free 30-day trial

Parses the DBF table header used to locate attribute records and interpret their fields.

Definition

Namespace:Telerik.WinControls.UI

Assembly:Telerik.WinControls.RadMap.dll

Syntax:

C#
public class DbfHeader

Inheritance: objectDbfHeader

Constructors

Initializes an empty header without reading a DBF stream.

C#
protected DbfHeader()

Reads a DBF header from the beginning of a dBASE table stream.

C#
public DbfHeader(Stream stream, Encoding encoding)
Parameters:streamStream

The DBF stream, positioned at its beginning.

encodingEncoding

The encoding for field names and values. If null, the encoding is selected from the DBF language-driver identifier, falling back to Default when that identifier is not mapped.

Exceptions: NotSupportedException

The DBF file type is not supported.

Properties

Gets an error recorded while parsing a DBF header from buffered data; stream-based parsing reports invalid file types by throwing instead.

C#
public Exception Error { get; }

Gets the total byte length of each attribute record, including its deletion marker.

C#
public int RecordLength { get; }

Gets the byte offset from the beginning of the DBF stream to its first attribute record.

C#
public int RecordsOffset { get; }

Methods

Parses a DBF header from the beginning of a table stream.

C#
public static DbfHeader Create(Stream stream, Encoding encoding)
Parameters:streamStream

The DBF stream, positioned at its beginning.

encodingEncoding

The encoding for field names and values, or null to use the DBF language-driver identifier.

Returns:

DbfHeader

The parsed header and its record-layout information.

Exceptions: NotSupportedException

The DBF file type is not supported.