|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Object | +--com.svcon.jdbf.DBFReader
Used to read database (DBF) files.
Create a DBFReader object passing a file name to be opened,
and use hasNextRecord and nextRecord
functions to iterate through the records of the file.
The getFieldCount and getField
methods allow you to find out what are the fields
of the database file.
| Constructor Summary | |
DBFReader(java.io.InputStream is)
Opens a stream, containing DBF for reading. |
|
DBFReader(java.lang.String fileName)
Opens a DBF file for reading. |
|
| Method Summary | |
void |
close()
Closes the reader. |
JDBField |
getField(int index)
Returns a field at a specified position. |
int |
getFieldCount()
Returns the field count of the database file. |
boolean |
hasNextRecord()
Checks to see if there are more records in the file. |
java.lang.Object[] |
nextRecord()
Returns an array of objects, representing one record in the database file. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public DBFReader(java.lang.String fileName)
throws JDBFException
fileName - the name of the file.JDBFException - if an error occurred opening the file for reading.
public DBFReader(java.io.InputStream is)
throws JDBFException
is - the InputStreamJDBFException - if an error occurred opening the stream.| Method Detail |
public int getFieldCount()
public JDBField getField(int index)
index - the position.public boolean hasNextRecord()
true if there are records;
false if the end of file is reached.
public java.lang.Object[] nextRecord()
throws JDBFException
JDBFException - if there are no more records or if an error occurred
reading the file.
public void close()
throws JDBFException
JDBFException - if an error occurs while closing.
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||