public class DbaseFileHeader extends Object
Modifier and Type | Class and Description |
---|---|
class |
DbaseFileHeader.DbaseFieldDescriptor
Class for holding the information assicated with a record.
|
Constructor and Description |
---|
DbaseFileHeader()
DbaseFileHreader constructor comment.
|
Modifier and Type | Method and Description |
---|---|
void |
addColumn(String inFieldName,
char inFieldType,
int inFieldLength,
int inDecimalCount)
Add a column to this DbaseFileHeader.
|
static DbaseFileHeader |
createDbaseHeader(FeatureType featureType) |
String |
getCharsetName()
01h DOS USA code page 437
02h DOS Multilingual code page 850
03h Windows ANSI code page 1252
04h Standard Macintosh
64h EE MS-DOS code page 852
65h Nordic MS-DOS code page 865
66h Russian MS-DOS code page 866
67h Icelandic MS-DOS
68h Kamenicky (Czech) MS-DOS
69h Mazovia (Polish) MS-DOS
6Ah Greek MS-DOS (437G)
6Bh Turkish MS-DOS
96h Russian Macintosh
97h Eastern European Macintosh
98h Greek Macintosh
C8h Windows EE code page 1250
C9h Russian Windows
CAh Turkish Windows
CBh Greek Windows
|
int |
getFieldDecimalCount(int inIndex) |
DbaseFileHeader.DbaseFieldDescriptor |
getFieldDescription(int inIndex)
Return the Field Descriptor for the given field.
|
int |
getFieldIndex(String name) |
int |
getFieldLength(int inIndex) |
String |
getFieldName(int inIndex) |
char |
getFieldType(int inIndex) |
int |
getHeaderLength()
Return the length of the header
|
byte |
getLanguageID() |
Date |
getLastUpdateDate()
Return 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()
Return the length of the records in bytes.
|
String |
mappingEncoding(String dbfEnconding) |
void |
readHeader(BigByteBuffer2 in,
String charsName,
boolean allowDuplicatedFieldNames)
Read the header data from the DBF file.
|
int |
removeColumn(String inFieldName)
Remove a column from this DbaseFileHeader.
|
void |
setNumRecords(int inNumRecords)
Set the number of records in the file
|
void |
writeHeader(FileChannel out)
Write the header data to the DBF file.
|
public void addColumn(String inFieldName, char inFieldType, int inFieldLength, int inDecimalCount) throws AttributeFeatureTypeNotSuportedException
inFieldName
- DOCUMENT ME!inFieldType
- DOCUMENT ME!inFieldLength
- DOCUMENT ME!inDecimalCount
- DOCUMENT ME!AttributeFeatureTypeNotSuportedException
public int removeColumn(String inFieldName)
inFieldName
- DOCUMENT ME!public DbaseFileHeader.DbaseFieldDescriptor getFieldDescription(int inIndex)
inIndex,
- the index of the requeted field descriptionpublic int getFieldLength(int inIndex)
public int getFieldDecimalCount(int inIndex)
public String getFieldName(int inIndex)
public int getFieldIndex(String name)
public char getFieldType(int inIndex)
public Date getLastUpdateDate()
public int getNumFields()
public int getNumRecords()
public int getRecordLength()
public int getHeaderLength()
public void readHeader(BigByteBuffer2 in, String charsName, boolean allowDuplicatedFieldNames) throws UnsupportedVersionException, UnsupportedEncodingException
in
- DOCUMENT ME!charsName
- UnsupportedVersionException
UnsupportedEncodingException
public void setNumRecords(int inNumRecords)
inNumRecords
- DOCUMENT ME!public byte getLanguageID()
public static DbaseFileHeader createDbaseHeader(FeatureType featureType) throws AttributeFeatureTypeNotSuportedException
public void writeHeader(FileChannel out) throws IOException
out
- A channel to write to. If you have an OutputStream you can
obtain the correct channel by using
java.nio.Channels.newChannel(OutputStream out).IOException
- If errors occur.public String getCharsetName()