public class DbaseFile
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static int |
MAX_FIELD_NAME_LENGTH |
| Constructor and Description |
|---|
DbaseFile(java.io.File afile) |
DbaseFile(java.io.File afile,
java.nio.charset.Charset chars) |
DbaseFile(java.io.File afile,
java.nio.charset.Charset chars,
boolean allowDuplicatedFieldNames) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Removes all data from the dataset
|
boolean |
getBooleanFieldValue(long rowIndex,
int fieldId) |
java.lang.String |
getCharsetName()
Returns the charset used to read/write this dbf.
|
int |
getCodePageInt() |
java.nio.charset.Charset |
getCurrenCharset() |
int |
getFieldCount() |
int |
getFieldIndex(java.lang.String name) |
DbaseFileHeader |
getHeader() |
java.nio.charset.Charset |
getOriginalCharset() |
java.lang.String |
getOriginalCharsetName()
Returns the charset declared on the dbf file (or the default one if none
is declared)
|
int |
getRecordCount() |
java.lang.String |
getStringFieldValue(long rowIndex,
int fieldId) |
java.nio.channels.FileChannel |
getWriteChannel() |
boolean |
isOpen() |
boolean |
isWritable() |
void |
open()
read the DBF file into memory.
|
void |
setCharset(java.nio.charset.Charset chars) |
void |
setFieldValue(long rowIndex,
int fieldId,
java.lang.Object obj) |
public static final int MAX_FIELD_NAME_LENGTH
public DbaseFile(java.io.File afile)
public DbaseFile(java.io.File afile,
java.nio.charset.Charset chars)
public DbaseFile(java.io.File afile,
java.nio.charset.Charset chars,
boolean allowDuplicatedFieldNames)
public DbaseFileHeader getHeader()
public int getCodePageInt()
public java.lang.String getCharsetName()
public java.lang.String getOriginalCharsetName()
public int getRecordCount()
public int getFieldCount()
public boolean getBooleanFieldValue(long rowIndex,
int fieldId)
public java.lang.String getStringFieldValue(long rowIndex,
int fieldId)
throws UnsupportedEncodingException
UnsupportedEncodingExceptionpublic void setFieldValue(long rowIndex,
int fieldId,
java.lang.Object obj)
throws UnsupportedEncodingException,
WriteException
public void open()
throws FileNotFoundException,
UnsupportedVersionException,
java.io.IOException,
AttributeFeatureTypeNotSuportedException
FileNotFoundExceptionUnsupportedVersionExceptionjava.io.IOExceptionAttributeFeatureTypeNotSuportedExceptionpublic void close()
throws CloseException
CloseExceptionpublic java.nio.channels.FileChannel getWriteChannel()
public boolean isOpen()
public int getFieldIndex(java.lang.String name)
public java.nio.charset.Charset getCurrenCharset()
public java.nio.charset.Charset getOriginalCharset()
public void setCharset(java.nio.charset.Charset chars)
public boolean isWritable()