|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--laur.dm.ar.DBReader
A DBReader is used to read data from a database.
Constructor Summary | |
DBReader(java.lang.String fileName)
Create a new DBReader according to the input file name. |
Method Summary | |
boolean |
checkIntegrity()
Check the integrity of the database. |
void |
close()
Close the I/O stream. |
java.lang.String |
getColumnName(int i)
Get the i-th column name from database. |
java.util.ArrayList |
getColumnNames()
Get all the column names for database. |
java.lang.String |
getDescription()
Get the description of the database. |
Itemset |
getFirstRow()
Get first row of the table from the data file. |
Itemset |
getNextRow()
Get the next row of data since last reading. |
long |
getNumColumns()
Get the number of the columns in database. |
long |
getNumRows()
Get the number of the rows in database. |
java.lang.String |
getVersion()
Get the file version number. |
boolean |
hasMoreRows()
Tell whether there are more rows to be read from the database. |
static void |
main(java.lang.String[] arg)
sample usage and testing |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DBReader(java.lang.String fileName) throws java.io.IOException
fileName
- the name of the filejava.io.IOException
- from library callMethod Detail |
public void close() throws java.io.IOException
public java.lang.String getVersion()
public long getNumRows()
public long getNumColumns()
public java.util.ArrayList getColumnNames()
public java.lang.String getColumnName(int i) throws DBException
i
- the index of the column requestedpublic java.lang.String getDescription()
public boolean checkIntegrity() throws java.io.IOException
java.io.IOException
- from library callpublic Itemset getFirstRow() throws java.io.IOException, DBException
java.io.IOException
- from library callDBException
- an invalid item has been metpublic Itemset getNextRow() throws java.io.IOException, DBException
java.io.IOException
- from library callDBException
- an invalid item has been metpublic boolean hasMoreRows()
public static void main(java.lang.String[] arg)
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |