| java.lang.Object com.sqlmagic.tinysql.DBFHeader
DBFHeader | public class DBFHeader (Code) | | dBase III header read/write access (bytes 0 - 31)
The column definitions are not read
author: Brian Jepson author: Marcel Ruff Added write access to dBase and JDK 2 support |
BULK_SIZE | final static int BULK_SIZE(Code) | | |
DATE_INDEX | final static int DATE_INDEX(Code) | | |
FLAG_INDEX | final static int FLAG_INDEX(Code) | | |
LENGTH_OF_HEADER_INDEX | final static int LENGTH_OF_HEADER_INDEX(Code) | | |
LENGTH_OF_REC_INDEX | final static int LENGTH_OF_REC_INDEX(Code) | | |
NUMBER_OF_REC_INDEX | final static int NUMBER_OF_REC_INDEX(Code) | | |
RESERVED_INDEX | final static int RESERVED_INDEX(Code) | | |
file_type | short file_type(Code) | | |
file_update_day | short file_update_day(Code) | | |
file_update_month | short file_update_month(Code) | | |
file_update_year | short file_update_year(Code) | | |
headerLength | int headerLength(Code) | | |
numRecords | int numRecords(Code) | | |
recordLength | int recordLength(Code) | | |
DBFHeader | DBFHeader(RandomAccessFile ff) throws tinySQLException(Code) | | Constructs a DBFHeader, read the data from file
You need to supply an open file handle to read from
Parameters: ff - open file handle for read access |
DBFHeader | DBFHeader(int numFields, int recordLength) throws tinySQLException(Code) | | Constructs a DBFHeader, read the data from file
You need to supply an open file handle to read from
Parameters: numFields - number of Columns Parameters: recordLength - sum of all column.size plus 1 byte (delete flag) |
setHeaderLength | public void setHeaderLength(RandomAccessFile ff, int numFields) throws tinySQLException(Code) | | Update the header (index 8-9) with the new number of records
Parameters: numFields - number of columns (used to calculate header length) |
setNumRecords | public void setNumRecords(RandomAccessFile ff, int numRecords) throws tinySQLException(Code) | | Update the header (index 4-7) with the new number of records
Parameters: New - number of records |
setRecordLength | public void setRecordLength(RandomAccessFile ff, int recordLength) throws tinySQLException(Code) | | Update the header (index 10-11) with the length of one record
Parameters: recordLength - Length of one data record (row) |
setReserved | public void setReserved(RandomAccessFile ff) throws tinySQLException(Code) | | Update the header (index 10-11) with the length of one record
Parameters: recordLength - Length of one data record (row) |
writeNumRecords | public static void writeNumRecords(RandomAccessFile ff, int numRecords) throws tinySQLException(Code) | | Update the header (index 4-7) with the new number of records
This is the static variant (use it if you don't want to obtain
a DBFHeader instance
Parameters: New - number of records |
|
|