gistoolkit.datasources.shapefile
Class DbaseFile

java.lang.Object
  extended bygistoolkit.datasources.shapefile.DbaseFile

public class DbaseFile
extends java.lang.Object

Class to read and write data to a dbase III format file. Creation date: (5/15/2001 5:15:13 PM)


Constructor Summary
DbaseFile()
          DbaseFile constructor comment.
DbaseFile(java.lang.String inFileName)
          DbaseFile constructor comment.
 
Method Summary
 void addColumn(java.lang.String inName, char inType, int inLength, int inDecimalPlace)
          Adds the column to the file.
protected  void addRecord(java.lang.Object[] inRecord)
          Adds the record to the dataset.
 int getFieldDecimalLength(int inIndex)
          Retrieve the location of the decimal point.
 int getFieldLength(int inIndex)
          Retrieve the length of the given column.
 java.lang.String getFieldName(int inIndex)
          Retrieve the name of the given column.
 java.lang.String[] getFieldNames()
          Returns the array of field names.
 char getFieldType(int inIndex)
          Retrieve the type of the given column.
 java.lang.String getFileName()
          Retrieves the file name to read or write.
 int getNumRecords()
           
 java.lang.Object[] getRecord(int inIndex)
           
 void read()
          read the DBF file into memory.
protected  void removeAllRecords()
          Removes all data from the dataset
 void removeColumn(java.lang.String inName)
          Removes the named column from the file
 void setFileName(java.lang.String inFileName)
          Set the file name to read or write.
 void setRecord(java.lang.Object[] inRecord, int inIndex)
           
static void setVerbose(boolean inVerbose)
           
 void setWarnings(boolean inWarning)
          Print warnings to system.out.
 void write()
          write the DBF file to disk.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DbaseFile

public DbaseFile()
DbaseFile constructor comment.


DbaseFile

public DbaseFile(java.lang.String inFileName)
DbaseFile constructor comment.

Method Detail

addColumn

public void addColumn(java.lang.String inName,
                      char inType,
                      int inLength,
                      int inDecimalPlace)
               throws java.lang.Exception
Adds the column to the file.

Throws:
java.lang.Exception

removeColumn

public void removeColumn(java.lang.String inName)
Removes the named column from the file


addRecord

protected void addRecord(java.lang.Object[] inRecord)
Adds the record to the dataset.


getFieldNames

public java.lang.String[] getFieldNames()
Returns the array of field names.


getFileName

public java.lang.String getFileName()
Retrieves the file name to read or write.


getNumRecords

public int getNumRecords()

getRecord

public java.lang.Object[] getRecord(int inIndex)

getFieldName

public java.lang.String getFieldName(int inIndex)
Retrieve the name of the given column.


getFieldType

public char getFieldType(int inIndex)
Retrieve the type of the given column.


getFieldLength

public int getFieldLength(int inIndex)
Retrieve the length of the given column.


getFieldDecimalLength

public int getFieldDecimalLength(int inIndex)
Retrieve the location of the decimal point.


read

public void read()
          throws java.lang.Exception
read the DBF file into memory.

Throws:
java.lang.Exception

removeAllRecords

protected void removeAllRecords()
Removes all data from the dataset


setFileName

public void setFileName(java.lang.String inFileName)
Set the file name to read or write.


setWarnings

public void setWarnings(boolean inWarning)
Print warnings to system.out.


setRecord

public void setRecord(java.lang.Object[] inRecord,
                      int inIndex)

setVerbose

public static void setVerbose(boolean inVerbose)

write

public void write()
           throws java.lang.Exception
write the DBF file to disk.

Throws:
java.lang.Exception