Class ParadoxFile

java.lang.Object
   |
   +----ParadoxFile

public class ParadoxFile
extends Object
ParadoxFile


Constructor Index

 o ParadoxFile()
construct class needing call to readTableHeader(filename) to use
 o ParadoxFile(String)
open given file and read header data

Method Index

 o closeParadoxFile()
close file also called on any file error to assure pdxRW set null so isOK() returns false; data block and record buffer also set null to indicate unsafe to use
 o formatDate(int[])
format date as mo/da/year string
 o getCurrentRecordNumber()
get current record number
 o getDateField(int)
get value of date field by offset into field list
 o getDateField(String)
get value of named date field
 o getFieldCount()
get number of fields in each record
 o getFieldNames()
get field names
 o getFieldTypes()
get field types
 o getFirstRecord()
get first record in paradox table to rawRecordData
 o getFormattedField(int)
format data for reports
 o getIntField(int)
get value of small integer field by offset in field list
 o getIntField(String)
get value of named small integer field
 o getKeyFieldCount()
get number of key fields
 o getLastRecord()
get last record in paradox table
 o getNextRecord()
get next record in paradox table to rawRecordData
 o getNumberField(int)
get value of numeric field by offset in field list
 o getNumberField(String)
get value of named numeric field
 o getPreviousRecord()
get previous record in paradox table
 o getRecordCount()
get number of records
 o getStringField(int)
get value of String field by offset into field list
 o getStringField(String)
get value of named String field
 o isDataReady()
did last record fetch succeed?
 o isOK()
is paradox file ready to use?
 o main(String[])
ParadoxFile command line handler
 o readTableHeader(String)
open table and read header data
 o toString()

Constructors

 o ParadoxFile
 public ParadoxFile()
construct class needing call to readTableHeader(filename) to use

 o ParadoxFile
 public ParadoxFile(String fileName)
open given file and read header data

Parameters:
name - of paradox version 3.5 table follow with isOK() test to determine if table ready to use

Methods

 o toString
 public String toString()
Overrides:
toString in class Object
 o isOK
 public boolean isOK()
is paradox file ready to use?

Returns:
true if file ready for use ready to use means file found available for read and write, header read, description values parsed, and a request for table record can be honored.
 o isDataReady
 public boolean isDataReady()
did last record fetch succeed?

Returns:
true if valid data available
 o readTableHeader
 public void readTableHeader(String fileName)
open table and read header data

Parameters:
InputFileName returns - without header variables set on error
 o closeParadoxFile
 public void closeParadoxFile()
close file also called on any file error to assure pdxRW set null so isOK() returns false; data block and record buffer also set null to indicate unsafe to use

 o getFirstRecord
 public void getFirstRecord()
get first record in paradox table to rawRecordData

 o getNextRecord
 public void getNextRecord()
get next record in paradox table to rawRecordData

 o getPreviousRecord
 public void getPreviousRecord()
get previous record in paradox table

 o getLastRecord
 public void getLastRecord()
get last record in paradox table

 o getFieldNames
 public String[] getFieldNames()
get field names

Returns:
String array of field names note: this gives recipient opportunity to modify array element values
 o getFieldTypes
 public char[] getFieldTypes()
get field types

Returns:
char array of field type codes note: this gives recipient opportunity to modify array element values
 o getRecordCount
 public int getRecordCount()
get number of records

Returns:
number of records in file
 o getCurrentRecordNumber
 public int getCurrentRecordNumber()
get current record number

Returns:
current record index in table
 o getFieldCount
 public int getFieldCount()
get number of fields in each record

Returns:
field count
 o getKeyFieldCount
 public int getKeyFieldCount()
get number of key fields

Returns:
key field count
 o getFormattedField
 public String getFormattedField(int fieldIdx)
format data for reports

Parameters:
field - list offest
Returns:
string with field data using default format or "" on unknown
 o getNumberField
 public double getNumberField(String fieldName)
get value of named numeric field

Parameters:
field - name
Returns:
double value, NaN indicates no field data
 o getNumberField
 public double getNumberField(int fieldIdx)
get value of numeric field by offset in field list

Parameters:
field - offset in record
Returns:
double value, NaN indicates no field data
 o getIntField
 public int getIntField(String fieldName)
get value of named small integer field

Parameters:
field - name
Returns:
double value, INT_NULL indicates no field data
 o getIntField
 public int getIntField(int fieldIdx)
get value of small integer field by offset in field list

Parameters:
field - offset in record
Returns:
double value, INT_NULL indicates no field data
 o getDateField
 public int[] getDateField(String fieldName)
get value of named date field

Parameters:
field - name
Returns:
int array with year, month, and day or null on blank
 o getDateField
 public int[] getDateField(int fieldIdx)
get value of date field by offset into field list

Parameters:
field - name
Returns:
int array with year, month, and day or null on blank
 o formatDate
 public static String formatDate(int yrMoDa[])
format date as mo/da/year string

Parameters:
getDateField - return integer array
Returns:
string in form mo/da/year
 o getStringField
 public String getStringField(String fieldName)
get value of named String field

Parameters:
field - name
Returns:
String, null indicates no field data
 o getStringField
 public String getStringField(int fieldIdx)
get value of String field by offset into field list

Parameters:
field - name
Returns:
String, null indicates no field data
 o main
 public static void main(String args[])
ParadoxFile command line handler

Parameters:
name - of Paradox file to examine usage: 'java ParadoxFile table.db' writes record data to standard output