|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectes.prodevelop.gvsig.mobile.fmap.driver.vect.dbf.DbaseFileHeaderNIO
Class to represent the header of a Dbase III file. Creation date: (5/15/2001 5:15:30 PM)
Constructor Summary | |
DbaseFileHeaderNIO()
|
Method Summary | |
void |
addColumn(java.lang.String inFieldName,
char inFieldType,
int inFieldLength,
int inDecimalCount)
Add a column to this DbaseFileHeader. |
static int |
charTypeToIntType(char c)
|
static DbaseFileHeaderNIO |
createDbaseHeader(com.hardcode.gdbms.engine.data.DataSource ds)
|
static DbaseFileHeaderNIO |
createDbaseHeader(FieldDescription[] fieldsDesc)
|
static DbaseFileHeaderNIO |
createDbaseHeader(java.lang.String[] fieldNames,
int[] fieldTypes,
int[] fieldLength)
Creates DbaseHeader |
static DbaseFileHeaderNIO |
createNewDbaseHeader()
Crea un DbaseFile. |
java.lang.Class |
getFieldClass(int i)
Determine the most appropriate Java Class for representing the data in the field. |
int |
getFieldDecimalCount(int inIndex)
Get the decimal count of this field. |
int |
getFieldIntType(int inIndex)
|
int |
getFieldLength(int inIndex)
Returns the field length in bytes. |
java.lang.String |
getFieldName(int inIndex)
Get the field name. |
char |
getFieldType(int inIndex)
Get the character class of the field. |
int |
getHeaderLength()
Get the length of the header |
int |
getLargestFieldSize()
Get the largest field size of this table. |
java.util.Date |
getLastUpdateDate()
Get the date this file was last updated. |
int |
getNumFields()
Return the number of fields in the records. |
int |
getNumRecords()
Return the number of records in the file |
int |
getRecordLength()
Get the length of the records in bytes. |
void |
readHeader(FalseByteBuffer in)
Read the header data from the DBF file. |
int |
removeColumn(java.lang.String inFieldName)
Remove a column from this DbaseFileHeader. |
void |
setFieldName(int j,
java.lang.String newName)
|
void |
setNumRecords(int inNumRecords)
Set the number of records in the file |
java.lang.String |
toString()
Get a simple representation of this header. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public DbaseFileHeaderNIO()
Method Detail |
public java.lang.Class getFieldClass(int i)
All packages are java.lang unless otherwise specified. C (Character) -> String N (Numeric) -> Integer or Double (depends on field's decimal count) F (Floating) -> Double L (Logical) -> Boolean D (Date) -> java.util.Date Unknown -> String
i
- The index of the field, from 0 to getNumFields() - 1
.
public void addColumn(java.lang.String inFieldName, char inFieldType, int inFieldLength, int inDecimalCount)
Field Type MaxLength ---------- --------- C 254 D 8 F 20 N 18
inFieldName
- The name of the new field, must be less than 10 characters or
it gets truncated.inFieldType
- A character representing the dBase field, ( see above ). Case
insensitive.inFieldLength
- The length of the field, in bytes ( see above )inDecimalCount
- For numeric fields, the number of decimal places to track.public int removeColumn(java.lang.String inFieldName)
inFieldName
- The name of the field, will ignore case and trim.
public int getFieldLength(int inIndex)
inIndex
- The field index.
public int getFieldDecimalCount(int inIndex)
inIndex
- The field index.
public java.lang.String getFieldName(int inIndex)
inIndex
- The field index.
public char getFieldType(int inIndex)
inIndex
- The field index.
public int getFieldIntType(int inIndex)
public static int charTypeToIntType(char c)
public java.util.Date getLastUpdateDate()
public int getNumFields()
public int getNumRecords()
public int getRecordLength()
public int getHeaderLength()
public void readHeader(FalseByteBuffer in) throws java.io.IOException
in
-
java.io.IOException
public int getLargestFieldSize()
public void setNumRecords(int inNumRecords)
inNumRecords
- The number of records.public java.lang.String toString()
public static DbaseFileHeaderNIO createNewDbaseHeader() throws java.io.IOException
java.io.IOException
- .public static DbaseFileHeaderNIO createDbaseHeader(com.hardcode.gdbms.engine.data.DataSource ds) throws java.io.IOException
java.io.IOException
public static DbaseFileHeaderNIO createDbaseHeader(java.lang.String[] fieldNames, int[] fieldTypes, int[] fieldLength) throws java.io.IOException
fieldNames
- fieldTypes
- fieldLength
-
java.io.IOException
public static DbaseFileHeaderNIO createDbaseHeader(FieldDescription[] fieldsDesc)
public void setFieldName(int j, java.lang.String newName)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |