public class DbaseFile
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
DbaseFile.FieldFormatter
Utility for formatting Dbase fields.
|
| 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(int rowIndex,
int fieldId)
DOCUMENT ME!
|
byte |
getCodePage() |
java.nio.charset.Charset |
getCurrenCharset() |
int |
getFieldCount()
DOCUMENT ME!
|
int |
getFieldDecimalLength(int inIndex)
Retrieve the location of the decimal point.
|
int |
getFieldIndex(java.lang.String name) |
int |
getFieldLength(int inIndex)
Retrieve the length of the given column.
|
java.lang.String |
getFieldName(int inIndex)
Retrieve the name of the given column.
|
char |
getFieldType(int inIndex)
Retrieve the type of the given column.
|
java.nio.charset.Charset |
getOriginalCharset() |
int |
getRecordCount() |
java.lang.String |
getStringFieldValue(int rowIndex,
int fieldId)
DOCUMENT ME!
|
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(int 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 byte getCodePage()
public int getRecordCount()
public int getFieldCount()
public boolean getBooleanFieldValue(int rowIndex,
int fieldId)
rowIndex - DOCUMENT ME!fieldId - DOCUMENT ME!public java.lang.String getStringFieldValue(int rowIndex,
int fieldId)
throws UnsupportedEncodingException
rowIndex - DOCUMENT ME!fieldId - DOCUMENT ME!UnsupportedEncodingExceptionpublic void setFieldValue(int rowIndex,
int fieldId,
java.lang.Object obj)
throws UnsupportedEncodingException,
WriteException
public java.lang.String getFieldName(int inIndex)
inIndex - DOCUMENT ME!public char getFieldType(int inIndex)
inIndex - DOCUMENT ME!public int getFieldLength(int inIndex)
inIndex - DOCUMENT ME!public int getFieldDecimalLength(int inIndex)
inIndex - DOCUMENT ME!public void open()
throws FileNotFoundException,
UnsupportedVersionException,
java.io.IOException
file - DOCUMENT ME!FileNotFoundExceptionUnsupportedVersionExceptionjava.io.IOExceptionjava.io.IOException - DOCUMENT ME!public void close()
throws CloseException
CloseExceptionjava.io.IOException - DOCUMENT ME!public 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()