Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## anl.repast.gis.data.dbf
Class DBFReader

    java.lang.Object
      anl.repast.gis.data.dbf.DBFReader

    public class DBFReader

extends java.lang.Object

Title: JDBF

Description: 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.

Copyright : Copyright (c) 2004

Société : FUCaM-GTM

Version:
  1.0
Author:
  Bart Jourquin, adapted from original free lib by SV Consulting (http://www.svcon.com/)

Constructor Summary
`DBFReader(java.io.InputStream inputstream)` Opens a stream, containing DBF for reading.
`DBFReader(java.lang.String s)` Opens a DBF file for reading.

Method Summary
`JDBField` | `getField(int i)` 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

### DBFReader

    public DBFReader(java.lang.String s)
              throws JDBFException

  Opens a DBF file for reading.

  Parameters:
    `s` - String
  Throws:
    `JDBFException`

### DBFReader

    public DBFReader(java.io.InputStream inputstream)
              throws JDBFException

  Opens a stream, containing DBF for reading.

  Parameters:
    `inputstream` - InputStream
  Throws:
    `JDBFException`

Method Detail

### getFieldCount

    public int getFieldCount()

  Returns the field count of the database file.

  Returns:
    int

### getField

    public JDBField getField(int i)

  Returns a field at a specified position.

  Parameters:
    `i` - int
  Returns:
    JDBField

### hasNextRecord

    public boolean hasNextRecord()

  Checks to see if there are more records in the file.

  Returns:
    boolean

### nextRecord

    public java.lang.Object[] nextRecord()
                                  throws JDBFException

  Returns an array of objects, representing one record in the database file.

  Returns:
    Object[]
  Throws:
    `JDBFException`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD