public class DBFReaderJGeom
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
DBFReaderJGeom.CharacterColumn |
static class |
DBFReaderJGeom.DateColumn |
static class |
DBFReaderJGeom.LogicalColumn |
static class |
DBFReaderJGeom.NumericColumn |
static class |
DBFReaderJGeom.RecordColumn |
Constructor and Description |
---|
DBFReaderJGeom() |
DBFReaderJGeom(java.lang.String name)
construct an object out of the specified shapefile's DBF file.
|
Modifier and Type | Method and Description |
---|---|
void |
closeDBF()
close this dbfile.
|
java.lang.String |
getFieldData(int ith, byte[] rec)
get the value string for the ith field in the given record.
|
int |
getFieldLength(int nth)
return the length of the specified field.
|
java.lang.String |
getFieldName(int ith)
returns the name for the ith field of records in this file.
|
byte |
getFieldType(int ith)
get the type for the ith field in a record.
|
byte[] |
getRecord(int nth)
retrieve the nth record in the file.
|
int |
numFields()
return the number of fields in each record
|
int |
numRecords()
return the number of records in the DBF file.
|
void |
openDBF(java.lang.String name)
Given a DBF file's name, open the file and read the header info.
|
void |
print()
nicely print out the general information of this shapefile.
|
void |
readCodePage(java.lang.String name)
Given a DBF file's name, open the (optional) .cpg file and read the character encoding value.
|
int |
recordSize()
return the record size in the DBF file
|
public DBFReaderJGeom()
public DBFReaderJGeom(java.lang.String name) throws java.io.IOException
java.io.IOException
public void readCodePage(java.lang.String name) throws java.io.IOException
java.io.IOException
public void openDBF(java.lang.String name) throws java.io.IOException
java.io.IOException
public void closeDBF() throws java.io.IOException
java.io.IOException
public int numRecords()
public int numFields()
public int recordSize()
public byte[] getRecord(int nth)
public java.lang.String getFieldData(int ith, byte[] rec)
public int getFieldLength(int nth)
public java.lang.String getFieldName(int ith)
public byte getFieldType(int ith)
'C': character 'D': Date (8 digits: YYYYMMDD) 'F': Floating point binary numeric: -. 0 1 2 3 4 5 6 7 8 9 'G': General. All OEM characters or OLE. 'L': Logical: ? Y y N n T t F f (? initially) 'M': Memo 'N': Float: - . 0 1 2 3 4 5 6 7 8 9 'I': Integer: - 0 1 2 3 4 5 6 7 8 9
public void print()