org.progeeks.dbf
Class DbfReader

java.lang.Object
  extended by org.progeeks.dbf.DbfReader
All Implemented Interfaces:
java.util.Iterator

public class DbfReader
extends java.lang.Object
implements java.util.Iterator

A reader for DBF files that can stream records from start to finish. This reader does not support random access.

Version:
$Revision: 1.1 $
Author:
Paul Speed

Constructor Summary
DbfReader(java.io.File f)
           
 
Method Summary
 void close()
           
 DbfHeader getHeader()
           
 int getRecordNumber()
          Returns the number of the record that will be returned next.
 boolean hasNext()
           
 java.lang.Object next()
           
 DbfRecord nextRecord()
          Returns the next record from the database and returns a new DbfRecord instance.
 DbfRecord nextRecord(DbfRecord record)
          Reads the next record from the database and puts the values into the specified DbfRecord.
 void remove()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DbfReader

public DbfReader(java.io.File f)
          throws java.io.IOException
Throws:
java.io.IOException
Method Detail

close

public void close()
           throws java.io.IOException
Throws:
java.io.IOException

getHeader

public DbfHeader getHeader()

nextRecord

public DbfRecord nextRecord()
                     throws java.io.IOException
Returns the next record from the database and returns a new DbfRecord instance.

Throws:
java.io.IOException

nextRecord

public DbfRecord nextRecord(DbfRecord record)
                     throws java.io.IOException
Reads the next record from the database and puts the values into the specified DbfRecord.

Throws:
java.io.IOException

getRecordNumber

public int getRecordNumber()
Returns the number of the record that will be returned next.


next

public java.lang.Object next()
Specified by:
next in interface java.util.Iterator

hasNext

public boolean hasNext()
Specified by:
hasNext in interface java.util.Iterator

remove

public void remove()
Specified by:
remove in interface java.util.Iterator


Copyright © 2002-2003 Paul Speed. All Rights Reserved.