public class DbaseFile
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static int |
DBASE5DOS
_more_
|
static int |
DBASE5WIN
_more_
|
static int |
DBASEIII
_more_
|
static int |
DBASEIV
_more_
|
| Constructor and Description |
|---|
DbaseFile(java.io.File file)
Instantiates a new dbase file.
|
DbaseFile(java.io.InputStream s)
Instantiates a new dbase file.
|
DbaseFile(java.lang.String spec)
Instantiates a new dbase file.
|
DbaseFile(java.net.URL url)
Instantiates a new dbase file.
|
| 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() |
int |
loadData()
Load the dbase file data.
|
int |
loadHeader()
Load the dbase file header.
|
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.net.MalformedURLException,
java.io.IOException
url - URL to the *.dbf filejava.net.MalformedURLException - the malformed url exceptionjava.io.IOException - Signals that an I/O exception has occurred.public DbaseFile(java.lang.String spec)
throws java.io.IOException
spec - Location of the *.dbf file, as either a URL or filenamejava.io.IOException - Signals that an I/O exception has occurred.public DbaseFile(java.io.File file)
file - A file object of the *.dbf file.public DbaseFile(java.io.InputStream s)
s - the spublic int loadHeader()
public int loadData()
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)
args - the arguments