All Packages This Package Class Hierarchy Class Search Index
java.lang.Object | +----xBaseJ.Client.DBF
Summary |
public class DBF extends java.lang.Object { // Constructors 1 public DBF(String, String, int) throws xBaseJException, IOException, UnknownHostException; // Methods 24 public void close() throws IOException, xBaseJException; public void delete() throws IOException, xBaseJException; public boolean deleted() throws IOException, xBaseJException; public boolean find(String) throws xBaseJException, IOException; public void findNext() throws xBaseJException, IOException; public void findPrev() throws xBaseJException, IOException;public int fldcount(); public int getCurrentRecordNumber(); public Field getField(int) throws ArrayIndexOutOfBoundsException, xBaseJException; public Field getField(String) throws xBaseJException, ArrayIndexOutOfBoundsException; public int getFieldCount(); public String getName(); public int getRecordCount() throws xBaseJException, IOException; public void gotoRecord(long) throws xBaseJException, IOException; public void read() throws xBaseJException, IOException; public void readPrev() throws xBaseJException, IOException;public int reccount() throws xBaseJException, IOException;public int recno(); public void setLock(boolean) throws xBaseJException, IOException; public void setRecordLock(boolean) throws xBaseJException, IOException; public void undelete() throws IOException, xBaseJException; public void update() throws xBaseJException, IOException; public void useIndex(String) throws xBaseJException, IOException; public void write() throws xBaseJException, IOException; }
xBaseJ - java access to dBase files
Copyright 1997-1999 - American Coders, LTD - Raleigh NC USA
All rights reserved
Currently supports only dBase III format DBF, DBT and NDX files
dBase IV format DBF, DBT, MDX and NDX files
American Coders, Ltd
P. O. Box 97462
Raleigh, NC 27615 USA
1-919-846-2014
http://www.americancoders.com
Constructors |
· DBF | Summary | Top |
public DBF(String inDBFname, String inhost, int inport) throws xBaseJException, IOException, UnknownHostException
opens a DBF at the server
Parameter Description DBFname database as defined on the server inhost host name or ip address inport host listening port
- Throws: xBaseJException
- File does exist and told not to destroy it.
- Throws: xBaseJException
- Told to destroy but operating system can not destroy
- Throws: IOException
- Java error caused by called methods
- Throws: SecurityException
- Java error caused by called methods, most likely trying to create on a remote system
Methods |
· setLock | Summary | Top |
public void setLock(boolean lockSwitch) throws xBaseJException, IOException
locks/unlocks the whole table
Parameter Description lockSwitch - true - lock the table, false - unlock
- Throws: xBaseJException
- most likely table already locked by another process
- Throws: IOException
- Java error caused by called methods
· setRecordLock | Summary | Top |
public void setRecordLock(boolean lockSwitch) throws xBaseJException, IOException
locks/unlocks the current record. You must read, write or find the record before locking
Parameter Description lockSwitch - true - lock the record, false - unlock
- Throws: xBaseJException
- most likely table or record is already locked by another process record cursor not on a valid record - read a record first
- Throws: IOException
- Java error caused by called methods
· useIndex | Summary | Top |
public void useIndex(String name) throws xBaseJException, IOException
opens an index associated with the database
Parameter Description indexname an existing index as defined in Server's dbfs.dbf
- Throws: xBaseJException
- xBaseJ Fields defined in Index do not match Fields in database
- Throws: IOException
- Java error caused by called methods
· find | Summary | Top |
public boolean find(String keyString) throws xBaseJException, IOException
used to find a record with an equal or greater string value when done the record pointer and field contents will be changed
Parameter Description keyString a search string
- Returns:
- boolean - true if record found key matches input key
- Throws: xBaseJException
- xBaseJ no Indexs opened with database
- Throws: IOException
- Java error caused by called methods
· findNext | Summary | Top |
public void findNext() throws xBaseJException, IOException
used to get the next record in the Index list when done the record pointer and field contents will be changed
- Throws: xBaseJException
- xBaseJ Index not opened or not part of the database
- Throws: IOException
- Java error caused by called methods
· findPrev | Summary | Top |
public void findPrev() throws xBaseJException, IOException
used to get the previous record in the Index list when done the record pointer and field contents will be changed
- Throws: xBaseJException
- xBaseJ Index not opened or not part of the database
- Throws: IOException
- Java error caused by called methods
· fldcount | Summary | Top |
public int fldcount()
Note: fldcount() is deprecated use getFieldCount
- Returns:
- int the number of Fields in a database
· recno | Summary | Top |
public int recno()
Note: recno() is deprecated use getCurrentRecordNumber
- Returns:
- int the current record number
· reccount | Summary | Top |
public int reccount() throws xBaseJException, IOException
Note: reccount() is deprecated use getRecordCount
- Returns:
- int the number of records in a database
- Throws: xBaseJException
- logic error with server
- Throws: IOException
- logic error with server
· getFieldCount | Summary | Top |
public int getFieldCount()
- Returns:
- int the number of Fields in a database
· getCurrentRecordNumber | Summary | Top |
public int getCurrentRecordNumber()
- Returns:
- int the current record number
· getRecordCount | Summary | Top |
public int getRecordCount() throws xBaseJException, IOException
- Returns:
- int the number of records in a database
- Throws: xBaseJException
- logic error with server
- Throws: IOException
- logic error with server
· read | Summary | Top |
public void read() throws xBaseJException, IOException
used to read the next record, after the current record pointer, in the database when done the record pointer and field contents will be changed
- Throws: xBaseJException
- usually the end of file condition
- Throws: IOException
- Java error caused by called methods
· readPrev | Summary | Top |
public void readPrev() throws xBaseJException, IOException
used to read the previous record, before the current record pointer, in the database when done the record pointer and field contents will be changed
- Throws: xBaseJException
- usually the top of file condition
- Throws: IOException
- Java error caused by called methods
· gotoRecord | Summary | Top |
public void gotoRecord(long recno) throws xBaseJException, IOException
used to read a record at a particular place in the database when done the record pointer and field contents will be changed
Parameter Description recno the relative position of the record to read
- Throws: xBaseJException
- passed an negative number, 0 or value greater than the number of records in database
- Throws: IOException
- Java error caused by called methods
· write | Summary | Top |
public void write() throws xBaseJException, IOException
used to write a new record in the database when done the record pointer is at the end of the database
- Throws: xBaseJException
- any one of several errors
- Throws: IOException
- Java error caused by called methods
· update | Summary | Top |
public void update() throws xBaseJException, IOException
updates the record at the current position
- Throws: xBaseJException
- any one of several errors
- Throws: IOException
- Java error caused by called methods
· delete | Summary | Top |
public void delete() throws IOException, xBaseJException
marks the current records as deleted
- Throws: xBaseJException
- usually occurs when no record has been read
- Throws: IOException
- Java error caused by called methods
· undelete | Summary | Top |
public void undelete() throws IOException, xBaseJException
marks the current records as not deleted
- Throws: xBaseJException
- usually occurs when no record has been read.
- Throws: IOException
- Java error caused by called methods
· close | Summary | Top |
public void close() throws IOException, xBaseJException
closes the database NOT FULLY IMPLEMENTED
- Throws: IOException
- Java error caused by called methods
- Throws: xBaseJException
- logic error with server
· getField | Summary | Top |
public Field getField(int i) throws ArrayIndexOutOfBoundsException, xBaseJException
Parameter Description i Field number
- Returns:
- Field object by its relative position
- Throws: xBaseJException
- usually occurs when Field number is less than 1 or greater than the number of Fields
- Throws: IOException
- Java error caused by called methods
· getField | Summary | Top |
public Field getField(String name) throws xBaseJException, ArrayIndexOutOfBoundsException
Parameter Description name Field name
- Returns:
- Field object by its name in the database
- Throws: xBaseJException
- Field name is not correct
- Throws: IOException
- Java error caused by called methods
· getName | Summary | Top |
public String getName()
- Returns:
- String operating system name of the database
· deleted | Summary | Top |
public boolean deleted() throws IOException, xBaseJException
- Returns:
- boolean true if record is marked for deletion
- Throws: xBaseJException
- logic error with server
- Throws: IOException
- logic error with server
All Packages This Package Class Hierarchy Class Search IndexFreshly brewed Java API Documentation automatically generated with polardoc Version 1.0.7