public class DbaseFile
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
DBASE5DOS |
static int |
DBASE5WIN |
static int |
DBASEIII |
static int |
DBASEIV |
Constructor and Description |
---|
DbaseFile(java.io.File file) |
DbaseFile(java.io.InputStream s) |
DbaseFile(java.lang.String spec) |
DbaseFile(java.net.URL url) |
Modifier and Type | Method and Description |
---|---|
boolean[] |
getBooleansByName(java.lang.String Name)
Extract the boolean array of data for a field by Name.
|
double[] |
getDoublesByName(java.lang.String Name)
Extract the double array of data for a field by Name.
|
DbaseData |
getField(int index)
Extract the data for a field by field index number.
|
DbaseData |
getField(java.lang.String Name)
Extract the data for a given field by name.
|
java.lang.String |
getFieldName(int i)
Get the name of a field by column number.
|
java.lang.String[] |
getFieldNames()
Get a list of all the field names in the dbase file
|
int |
getNumFields()
Get the number of fields in the file.
|
int |
getNumRecords() |
java.lang.String[] |
getStringsByName(java.lang.String Name)
Extract the string array of data for a field by Name.
|
boolean |
isLoaded() |
static void |
main(java.lang.String[] args)
Test program, dumps a Dbase file to stdout.
|
public static int DBASEIII
public static int DBASEIV
public static int DBASE5DOS
public static int DBASE5WIN
public DbaseFile(java.net.URL url) throws java.io.IOException
url
- URL to the *.dbf filejava.io.IOException
public DbaseFile(java.lang.String spec) throws java.io.IOException
spec
- Location of the *.dbf file, as either a URL or filenamejava.io.IOException
public DbaseFile(java.io.File file)
file
- A file object of the *.dbf file.public DbaseFile(java.io.InputStream s)
public DbaseData getField(int index)
index
- Column number of the field to extract.public DbaseData getField(java.lang.String Name)
Name
- String with the name of the field to retrieve.public double[] getDoublesByName(java.lang.String Name)
Name
- String with the name of the field to retrievepublic java.lang.String[] getStringsByName(java.lang.String Name)
Name
- String with the name of the field to retrievepublic boolean[] getBooleansByName(java.lang.String Name)
Name
- String with the name of the field to retrievepublic java.lang.String getFieldName(int i)
i
- The column number of the field name.public java.lang.String[] getFieldNames()
public int getNumFields()
public int getNumRecords()
public boolean isLoaded()
public static void main(java.lang.String[] args)