public class DbfReader
extends java.lang.Object
implements java.io.Closeable
| Modifier and Type | Field and Description |
|---|---|
protected byte |
DATA_DELETED |
protected byte |
DATA_ENDED |
| Constructor and Description |
|---|
DbfReader(java.io.File file) |
DbfReader(java.io.File file,
java.nio.charset.Charset charset) |
DbfReader(java.io.InputStream in) |
DbfReader(java.io.InputStream in,
java.nio.charset.Charset charset) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canSeek() |
void |
close() |
DbfHeader |
getHeader() |
int |
getRecordCount() |
java.lang.Object[] |
nextRecord()
Reads and returns the next row in the Dbf stream
|
DbfRow |
nextRow() |
protected java.lang.Object |
readCharacterValue(DbfField field,
byte[] buf) |
protected java.util.Date |
readDateValue(DbfField field,
byte[] buf) |
protected java.lang.Float |
readFloatValue(DbfField field,
byte[] buf) |
protected java.lang.Boolean |
readLogicalValue(DbfField field,
byte[] buf) |
protected java.lang.Number |
readMemoLink(DbfField field,
byte[] buf) |
protected java.lang.Number |
readNumericValue(DbfField field,
byte[] buf) |
void |
seekToRecord(int n)
Attempt to seek to a specified record index.
|
protected final byte DATA_ENDED
protected final byte DATA_DELETED
public DbfReader(java.io.File file)
throws DbfException
DbfExceptionpublic DbfReader(java.io.File file,
java.nio.charset.Charset charset)
throws DbfException
DbfExceptionpublic DbfReader(java.io.InputStream in)
throws DbfException
DbfExceptionpublic DbfReader(java.io.InputStream in,
java.nio.charset.Charset charset)
throws DbfException
DbfExceptionpublic boolean canSeek()
true if the reader can seek forward or backward to a specified record index,
false otherwise.public void seekToRecord(int n)
nextRecord().n - The zero-based record index.public DbfRow nextRow()
public java.lang.Object[] nextRecord()
protected java.lang.Object readCharacterValue(DbfField field, byte[] buf) throws java.io.IOException
java.io.IOExceptionprotected java.util.Date readDateValue(DbfField field, byte[] buf) throws java.io.IOException
java.io.IOExceptionprotected java.lang.Float readFloatValue(DbfField field, byte[] buf) throws java.io.IOException
java.io.IOExceptionprotected java.lang.Boolean readLogicalValue(DbfField field, byte[] buf) throws java.io.IOException
java.io.IOExceptionprotected java.lang.Number readNumericValue(DbfField field, byte[] buf) throws java.io.IOException
java.io.IOExceptionprotected java.lang.Number readMemoLink(DbfField field, byte[] buf) throws java.io.IOException
java.io.IOExceptionpublic int getRecordCount()
public DbfHeader getHeader()
public void close()
close in interface java.io.Closeableclose in interface java.lang.AutoCloseable