| java.lang.Object org.geotools.dbffile.DbfFile
DbfFile | public class DbfFile implements DbfConsts(Code) | | This class represents a DBF (or DBase) file.
Construct it with a filename (including the .dbf)
this causes the header and field definitions to be read.
Later queries return rows or columns of the database.
author: Ian Turton Centre for author: Computaional Geography, University of Leeds, LS2 9JT, 1998. |
Inner Class :class DbfFileHeader | |
Constructor Summary | |
protected | DbfFile() | public | DbfFile(String file) Constructor, opens the file and reads the header infomation. |
DEBUG | final static boolean DEBUG(Code) | | |
data_offset | int data_offset(Code) | | |
last_update_d | int last_update_d(Code) | | |
last_update_m | int last_update_m(Code) | | |
last_update_y | int last_update_y(Code) | | |
DbfFile | protected DbfFile()(Code) | | |
GetNextDbfRec | public StringBuffer GetNextDbfRec() throws java.io.IOException(Code) | | gets the next record and returns it as a string. This method works on
a sequential stream and can not go backwards. Only useful if you want
to read the whole file in one.
exception: java.io.IOException - on read error. |
ParseRecord | public Vector ParseRecord(StringBuffer rec)(Code) | | Parses the record stored in the StringBuffer rec into a vector of
objects
Parameters: rec - the record to be parsed. |
getFileSize | public int getFileSize()(Code) | | Returns the size of the database file.
|
getFloatCol | public Double[] getFloatCol(int col, int start, int end) throws DbfFileException, java.io.IOException(Code) | | Fetches a part column of Double from the database file.
Parameters: col - - the column to fetch Parameters: start - - the row to start fetching from Parameters: end - - the row to stop fetching at. exception: java.io.IOException - - on read error exception: DbfFileException - - column is not an Integer. |
getIntegerCol | public Integer[] getIntegerCol(int col, int start, int end) throws java.io.IOException, DbfFileException(Code) | | Fetches a part column of Integers from the database file.
Parameters: col - - the column to fetch Parameters: start - - the row to start fetching from Parameters: end - - the row to stop fetching at. exception: java.io.IOException - - on read error exception: DbfFileException - - column is not an Integer. |
getLastRec | public int getLastRec()(Code) | | Returns the number of records in the database file.
|
getLastUpdate | public String getLastUpdate()(Code) | | Returns the date of the last update of the file as a string.
|
getNumFields | public int getNumFields()(Code) | | Returns the number of fields in the records in the database file.
|
getRecSize | public int getRecSize()(Code) | | Returns the size of the records in the database file.
|
|
|