|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.partnersoft.v3x.io.formats.ObjectDatafile
com.partnersoft.v3x.io.formats.DBFFile
public class DBFFile
a dbf file. tell me things about myself and watch me write records and headers and such! before writing anything make sure the number of records, and all the DBFFieldDescriptors are set or the header will be bogus/worthless.. enjoy.
| Constructor Summary | |
|---|---|
DBFFile(java.lang.String filename)
|
|
| Method Summary | |
|---|---|
java.util.ArrayList |
getFieldDescriptors()
|
java.io.RandomAccessFile |
getFile()
If you just have to bang on the file, use this. |
int |
getNumberOfRecords()
|
boolean |
getStripString()
|
protected void |
readRecordImp(java.lang.Object recycleMe,
java.io.RandomAccessFile filet)
Subclasses must override this to read an object from the fixed-length format, given an object to put the results into. |
protected java.lang.Object |
readRecordImp(java.io.RandomAccessFile filet)
Subclasses must override this to read an object from the fixed-length format. |
void |
setFieldDescriptors(java.util.ArrayList newFieldDescriptors)
|
void |
setNumberOfRecords(int newNumber)
|
void |
setStripString(boolean newValue)
|
void |
updateHeader(int numberOfRecords,
java.io.RandomAccessFile filet)
|
void |
writeEOFByte()
|
void |
writeHeader()
|
void |
writeHeaderImp(java.lang.Object header,
java.io.RandomAccessFile filet)
a (version 3?) dbf header |
void |
writeRecord(java.lang.Object source)
|
void |
writeRecordImp(java.lang.Object source,
java.io.RandomAccessFile filet)
Subclasses must override this to write out the object in the desired form. |
| Methods inherited from class com.partnersoft.v3x.io.formats.ObjectDatafile |
|---|
appendRecord, clear, close, compare, compare, compareImp, compareImp, findClosest, getHeaderSize, getRecordSize, getSize, openRead, openWrite, readHeader, readHeaderImp, readKey, readKeyImp, readRecord, readRecord, search, setHeaderSize, setRecordSize, sort, writeHeader, writeRecord |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DBFFile(java.lang.String filename)
| Method Detail |
|---|
public void writeRecord(java.lang.Object source)
throws java.io.IOException
java.io.IOException
public void writeRecordImp(java.lang.Object source,
java.io.RandomAccessFile filet)
throws java.io.IOException
ObjectDatafile
writeRecordImp in class ObjectDatafilejava.io.IOExceptionprotected java.lang.Object readRecordImp(java.io.RandomAccessFile filet)
ObjectDatafile
readRecordImp in class ObjectDatafile
protected void readRecordImp(java.lang.Object recycleMe,
java.io.RandomAccessFile filet)
ObjectDatafileThe RandomAccessFile is advanced to the correct spot; just read away.
readRecordImp in class ObjectDatafile
public void writeHeader()
throws java.io.IOException
java.io.IOException
public void updateHeader(int numberOfRecords,
java.io.RandomAccessFile filet)
public void writeHeaderImp(java.lang.Object header,
java.io.RandomAccessFile filet)
throws java.io.IOException
writeHeaderImp in class ObjectDatafilejava.io.IOException
public void writeEOFByte()
throws java.io.IOException
java.io.IOExceptionpublic java.io.RandomAccessFile getFile()
ObjectDatafile
getFile in class ObjectDatafilepublic void setNumberOfRecords(int newNumber)
public int getNumberOfRecords()
public void setFieldDescriptors(java.util.ArrayList newFieldDescriptors)
public java.util.ArrayList getFieldDescriptors()
public void setStripString(boolean newValue)
public boolean getStripString()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||