public class DBFField extends Object
Modifier and Type | Field and Description |
---|---|
static byte |
FIELD_TYPE_C
Deprecated.
You must use
DBFDataType.CHARACTER instead |
static byte |
FIELD_TYPE_D
Deprecated.
You must use
DBFDataType.DATE instead |
static byte |
FIELD_TYPE_F
Deprecated.
You must use
DBFDataType.FLOATING_POINT instead |
static byte |
FIELD_TYPE_L
Deprecated.
You must use
DBFDataType.LOGICAL instead |
static byte |
FIELD_TYPE_M
Deprecated.
You must use
DBFDataType.MEMO instead |
static byte |
FIELD_TYPE_N
Deprecated.
You must use
DBFDataType.NUMERIC instead |
Constructor and Description |
---|
DBFField() |
DBFField(String name,
DBFDataType type) |
DBFField(String name,
DBFDataType type,
int length) |
DBFField(String name,
DBFDataType type,
int length,
int decimalCount) |
Modifier and Type | Method and Description |
---|---|
protected static DBFField |
createField(DataInput in,
Charset charset)
Creates a DBFField object from the data read from the given
DataInputStream.
|
protected static DBFField |
createFieldDB7(DataInput in,
Charset charset) |
byte |
getDataType()
Deprecated.
This method is deprecated and is replaced by
getType() |
int |
getDecimalCount()
Returns the decimal part.
|
int |
getFieldLength()
Deprecated.
use
getLength() |
byte |
getIndexFieldFlag() |
int |
getLength()
Returns field length.
|
String |
getName()
Returns the name of the field.
|
int |
getReserv1() |
short |
getReserv2() |
short |
getReserv3() |
byte[] |
getReserv4() |
byte |
getSetFieldsFlag() |
DBFDataType |
getType()
Gets the type for this field
|
byte |
getWorkAreaId() |
boolean |
isBinary() |
boolean |
isNullable() |
boolean |
isSystem() |
void |
setDataType(byte type)
Deprecated.
This method is deprecated and is replaced by
setType(DBFDataType) |
void |
setDecimalCount(int size)
Sets the decimal place size of the field.
|
void |
setFieldLength(int length)
Deprecated.
use
setLength(int) |
void |
setFieldName(String value)
Deprecated.
This method is deprecated and is replaced by
setName(String) . |
void |
setLength(int length)
Set Length of the field.
|
void |
setName(String name)
Sets the name of the field.
|
void |
setType(DBFDataType type)
Set the type for this field
|
String |
toString() |
protected void |
write(DataOutput out,
Charset charset)
Writes the content of DBFField object into the stream as per DBF format
specifications.
|
@Deprecated public static final byte FIELD_TYPE_C
DBFDataType.CHARACTER
instead@Deprecated public static final byte FIELD_TYPE_L
DBFDataType.LOGICAL
instead@Deprecated public static final byte FIELD_TYPE_N
DBFDataType.NUMERIC
instead@Deprecated public static final byte FIELD_TYPE_F
DBFDataType.FLOATING_POINT
instead@Deprecated public static final byte FIELD_TYPE_D
DBFDataType.DATE
instead@Deprecated public static final byte FIELD_TYPE_M
DBFDataType.MEMO
insteadpublic DBFField()
public DBFField(String name, DBFDataType type)
public DBFField(String name, DBFDataType type, int length)
public DBFField(String name, DBFDataType type, int length, int decimalCount)
protected static DBFField createField(DataInput in, Charset charset) throws IOException
in
- DataInputStreamIOException
- If any stream reading problems occures.protected static DBFField createFieldDB7(DataInput in, Charset charset) throws IOException
IOException
protected void write(DataOutput out, Charset charset) throws IOException
out
- OutputStreamcharset
- dbf file's charsetIOException
- if any stream related issues occur.public String getName()
public int getLength()
public int getDecimalCount()
public void setName(String name)
name
- of the field as String.public int getReserv1()
public short getReserv2()
public byte getWorkAreaId()
public short getReserv3()
public byte getSetFieldsFlag()
public byte[] getReserv4()
public byte getIndexFieldFlag()
public void setLength(int length)
length
- of the field as int.public DBFDataType getType()
public void setType(DBFDataType type)
type
- The type for this fieldIllegalArgumentException
- if type is not write supportedpublic void setDecimalCount(int size)
size
- of the decimal field.public boolean isSystem()
public boolean isNullable()
public boolean isBinary()
@Deprecated public int getFieldLength()
getLength()
@Deprecated public void setFieldLength(int length)
setLength(int)
length
- of the field as int.@Deprecated public void setDataType(byte type)
setType(DBFDataType)
type
- of the field. One of the following:@Deprecated public void setFieldName(String value)
setName(String)
.@Deprecated public byte getDataType()
getType()
Copyright © 2017. All rights reserved.