NetTopologySuite
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Pages
NetTopologySuite.IO.DbaseFileHeader Class Reference

Class for holding the information assicated with a dbase header. More...

Public Member Functions

 DbaseFileHeader ()
 Initializes a new instance of the DbaseFileHeader class. More...
 
 DbaseFileHeader (Encoding enc)
 Initializes a new instance of the DbaseFileHeader class. More...
 
void AddColumn (string fieldName, char fieldType, int fieldLength, int decimalCount)
 Add a column to this DbaseFileHeader. More...
 
int RemoveColumn (string fieldName)
 Remove a column from this DbaseFileHeader. More...
 
void ReadHeader (BinaryReader reader, string filename)
 Read the header data from the DBF file. More...
 
void WriteHeader (BinaryWriter writer)
 Write the header data to the DBF file. More...
 

Public Attributes

const int FieldNameMaxLength = 11
 

Protected Member Functions

void SetNumRecords (int inNumRecords)
 Set the number of records in the file More...
 

Properties

DateTime LastUpdateDate [get]
 Return the date this file was last updated. More...
 
int NumFields [get, set]
 Return the number of fields in the records. More...
 
Encoding Encoding [get, set]
 
int NumRecords [get, set]
 Return the number of records in the file. More...
 
int RecordLength [get]
 Return the length of the records in bytes. More...
 
int HeaderLength [get]
 Return the length of the header. More...
 
DbaseFieldDescriptor[] Fields [get]
 Returns the fields in the dbase file. More...
 

Detailed Description

Class for holding the information assicated with a dbase header.

Constructor & Destructor Documentation

NetTopologySuite.IO.DbaseFileHeader.DbaseFileHeader ( )

Initializes a new instance of the DbaseFileHeader class.

NetTopologySuite.IO.DbaseFileHeader.DbaseFileHeader ( Encoding  enc)

Initializes a new instance of the DbaseFileHeader class.

Member Function Documentation

void NetTopologySuite.IO.DbaseFileHeader.AddColumn ( string  fieldName,
char  fieldType,
int  fieldLength,
int  decimalCount 
)

Add a column to this DbaseFileHeader.

Parameters
fieldNameThe name of the field to add.
fieldTypeThe type is one of (C N L or D) character, number, logical(true/false), or date.
fieldLengthThe Field length is the total length in bytes reserved for this column.
decimalCountThe decimal count only applies to numbers(N), and floating point values (F), and refers to the number of characters to reserve after the decimal point.
void NetTopologySuite.IO.DbaseFileHeader.ReadHeader ( BinaryReader  reader,
string  filename 
)

Read the header data from the DBF file.

Parameters
readerBinaryReader containing the header.
filenameFilename
int NetTopologySuite.IO.DbaseFileHeader.RemoveColumn ( string  fieldName)

Remove a column from this DbaseFileHeader.

Parameters
fieldName
Returns
return index of the removed column, -1 if no found.
void NetTopologySuite.IO.DbaseFileHeader.SetNumRecords ( int  inNumRecords)
protected

Set the number of records in the file

Parameters
inNumRecords
void NetTopologySuite.IO.DbaseFileHeader.WriteHeader ( BinaryWriter  writer)

Write the header data to the DBF file.

Parameters
writer

Property Documentation

DbaseFieldDescriptor [] NetTopologySuite.IO.DbaseFileHeader.Fields
get

Returns the fields in the dbase file.

int NetTopologySuite.IO.DbaseFileHeader.HeaderLength
get

Return the length of the header.

Returns
DateTime NetTopologySuite.IO.DbaseFileHeader.LastUpdateDate
get

Return the date this file was last updated.

Returns
int NetTopologySuite.IO.DbaseFileHeader.NumFields
getset

Return the number of fields in the records.

Returns
int NetTopologySuite.IO.DbaseFileHeader.NumRecords
getset

Return the number of records in the file.

Returns
int NetTopologySuite.IO.DbaseFileHeader.RecordLength
get

Return the length of the records in bytes.

Returns

The documentation for this class was generated from the following file: