public class DBFReader
extends java.lang.Object
| Constructor and Description |
|---|
DBFReader(java.io.InputStream inputStream)
Construct an object out of the specified shapefile's DBF file input stream.
|
DBFReader(java.io.InputStream inputStream, java.io.InputStream cpgFileInputStream)
Construct an object out of the specified shapefile's DBF file input stream and of the optional CPG file input stream.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getFieldData(int ith, byte[] rec)
Returns the value string for the ith field in the given record.
|
java.lang.String |
getFieldName(int ith)
Returns the name for the ith field of records in this file.
|
byte |
getFieldType(int ith)
Returns the type for the ith field in a record.
|
byte[] |
getRecord(int nth)
Retrieves the nth record in the file.
|
int |
numFields()
Returns the number of fields in each record.
|
int |
numRecords()
Returns the number of records in the DBF file.
|
void |
print()
nicely print out the general information of this DBF file.
|
int |
recordSize()
Returns the record size in the DBF file.
|
public DBFReader(java.io.InputStream inputStream)
throws java.io.IOException
inputStream - the DBF file input streamjava.io.IOException - thrown if an IOException occurs
public DBFReader(java.io.InputStream inputStream,
java.io.InputStream cpgFileInputStream)
throws java.io.IOException
inputStream - the DBF file input streamcpgFileInputStream - the CPG file input streamjava.io.IOException - thrown if an IOException occurs
public java.lang.String getFieldData(int ith,
byte[] rec)
ith - the number of the fieldrec - records bytespublic java.lang.String getFieldName(int ith)
ith - the number of the fieldpublic 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
ith - the number of the fieldpublic byte[] getRecord(int nth)
nth - record number in the filepublic int numFields()
public int numRecords()
public void print()
public int recordSize()
Copyright © 2016 Oracle and/or its affiliates. All Rights Reserved.