## xbase
Class DBFile

    java.lang.Object
      |
      +--xbase.DBFile

public class DBFile
extends java.lang.Object

Handle XBase .DBF and .DBE files The .DBE files are encrypted version of .DBF files. .DBE files will be used when available, otherwise it will fall back to .DBF files.

Constructor Summary
`DBFile(int[] key)` Constructor.

Method Summary
`void` `append()` Append a blank record.
`static java.lang.String` `ascii(java.lang.String note)`
`void` `close()` Close the file.
`protected void` `finalize()` Finalize - close the file.
`xbase.XbaseFieldSpec` `getFieldSpec(int idx)`
`int` `getNumberOfRecords()` Get the number of records in the Xbase file.
`int` `getRecordLength()`
`void` `open(java.lang.String dbfName)` Open a .DBF file.
`boolean` `read(byte[] buf, int recno)`
`java.lang.String` `readMemoField(java.lang.String key)` Read a memo field as a String.

Methods inherited from class java.lang.Object
`clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### DBFile

    public DBFile(int[] key)

  Constructor.
  Parameters:
    `key` - The file encryption key for .DBE files

Method Detail

### finalize

    protected void finalize()
                     throws java.lang.Throwable

  Finalize - close the file.
  Overrides:
    finalize in class java.lang.Object

### open

    public void open(java.lang.String dbfName)
              throws java.io.IOException

  Open a .DBF file.
  Parameters:
    `dbfName` - The filename without .DBF or .DBE extension.

### close

    public void close()
               throws java.io.IOException

  Close the file.

### readMemoField

    public java.lang.String readMemoField(java.lang.String key)
                                   throws java.io.IOException

  Read a memo field as a String.
  Parameters:
    `len` - The field length.
  Returns:
    The memo as a String.

### getNumberOfRecords

    public int getNumberOfRecords()

  Get the number of records in the Xbase file.
  Returns:
    The number of records.

### append

    public void append()
                throws java.io.IOException

  Append a blank record.

### getRecordLength

    public int getRecordLength()

### read

    public boolean read(byte[] buf,
                        int recno)
                 throws java.io.IOException

### getFieldSpec

    public xbase.XbaseFieldSpec getFieldSpec(int idx)

### ascii

    public static java.lang.String ascii(java.lang.String note)