ru.smartflex.tools.dbf
Class DbfIterator

java.lang.Object
  extended by ru.smartflex.tools.dbf.DbfIterator

public class DbfIterator
extends java.lang.Object

An iterator over xBase file. Reads all file from first record to last record.

Since:
1.00
Author:
galisha

Constructor Summary
protected DbfIterator(java.io.File dbfFile, java.lang.String enc)
           
protected DbfIterator(java.io.InputStream is, java.lang.String enc)
           
 
Method Summary
 void closeIterator()
          The method has to be invoked in case when not all records were read.
protected  DbfHeader getDbfHeader()
          Returns DBF file header definition
 boolean hasMoreRecords()
          Returns true if the iteration has more records
 DbfRecord nextRecord()
          Returns the next record in the iteration.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DbfIterator

protected DbfIterator(java.io.File dbfFile,
                      java.lang.String enc)

DbfIterator

protected DbfIterator(java.io.InputStream is,
                      java.lang.String enc)
Method Detail

getDbfHeader

protected DbfHeader getDbfHeader()
Returns DBF file header definition

Returns:
DBF file header definition
Since:
1.05

hasMoreRecords

public boolean hasMoreRecords()
Returns true if the iteration has more records

Returns:
true if the iteration has more records
Since:
1.00

nextRecord

public DbfRecord nextRecord()
Returns the next record in the iteration.

Returns:
returns the next record in the iteration.
Since:
1.00

closeIterator

public void closeIterator()
The method has to be invoked in case when not all records were read.