| java.lang.Object org.geotools.dbffile.Dbf
Dbf | public class Dbf implements DbfConsts(Code) | | This class represents a DBF (or DBase) file.
Construct it with a URL or File (including the .dbf)
this causes the header and field definitions to be read.
Later queries return rows or columns of the database.
If a URL is specified then the whole file is read into memory
if a file is specified then a randomAccess system is used.
author: Ian Turton Centre for author: Computaional Geography, University of Leeds, LS2 9JT, 1998. author:
author: mod to getStringCol by James Macgill. |
Inner Class :class DbfFileHeader | |
DEBUG | final static boolean DEBUG(Code) | | |
data_offset | int data_offset(Code) | | |
filesizenumfields | int filesizenumfields(Code) | | |
last_update_dlast_update_mlast_update_y | int last_update_dlast_update_mlast_update_y(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. |
getFieldNumber | public int getFieldNumber(String name)(Code) | | looks up the field number for the given named column
Parameters: name - A String for the name to look up int The col number for the field, -1 if field could not be found |
getFieldType | public char getFieldType(int col)(Code) | | |
getFileSize | public int getFileSize()(Code) | | Returns the size of the database file.
|
getFloatCol | public Float[] getFloatCol(int col, int start, int end) throws DbfFileException, java.io.IOException(Code) | | Fetches a part column of Floats 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.
|
getStringCol | public String[] getStringCol(int col, int start, int end) throws DbfFileException, java.io.IOException(Code) | | Fetches a part column of Strings 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. |
|
|