public class DbfField extends Object
A number of features are not yet supported. Only the data types C (character), N (numeric) and F (floating-point) are supported. Only iso-8859-1 character sets are supported.
Modifier and Type | Field and Description |
---|---|
protected StringBuilder |
builder |
protected int |
dataAddress |
protected int |
fieldDecimalCount |
protected int |
fieldLength |
protected char |
fieldType |
protected boolean |
isIntegral |
protected String |
name |
protected boolean |
numeric |
protected int |
offset |
Modifier and Type | Method and Description |
---|---|
Object |
getApplicationData()
Gets the data for the field as an Object of the appropriate class.
|
double |
getDouble()
Gets the double value stored in the field during the most recent read
operation, if any
|
int |
getFieldDecimalCount()
For numeric fields, indicates the number of decimal digits.
|
int |
getFieldLength()
Indicates the overall length of the data field
|
char |
getFieldType()
Indicates the type of the data field as defined in the DBF spec.
|
int |
getInteger()
Gets the integer value of the field, if it is of an integral type,
otherwise returns a zero.
|
boolean |
getLogicalValue()
Gets a logical value.
|
String |
getName()
Gets the name of the data field
|
String |
getString()
Gets the string value stored in the field during the most recent read
operation.
|
List<String> |
getUniqueValues(DbfFileReader dbf)
Gets the unique values for this field as a list of strings.
|
boolean |
isIntegral()
Indicates whether the field supports integral data value type.
|
boolean |
isNull()
Indicates whether the field contains a null value.
|
boolean |
isNumeric()
Indicates if the field defines a numeric value
|
String |
toString() |
boolean |
usesEngineeringNotation()
Indicates whether the value in the field was encoded using engineering
notation (e.g.
|
protected final String name
protected final char fieldType
protected final int dataAddress
protected final int fieldLength
protected final int fieldDecimalCount
protected final int offset
protected final StringBuilder builder
protected final boolean numeric
protected final boolean isIntegral
public boolean isIntegral()
public int getInteger()
public double getDouble()
public String getString()
public String getName()
public char getFieldType()
public int getFieldLength()
public int getFieldDecimalCount()
public boolean isNumeric()
public boolean getLogicalValue()
public Object getApplicationData()
public boolean usesEngineeringNotation()
public List<String> getUniqueValues(DbfFileReader dbf) throws IOException
dbf
- the DBF with which this field is associatedIOException
- in the event of an unrecoverable IO condition.public boolean isNull()
Copyright © 2021. All rights reserved.