Class DbfParseUtil
java.lang.Object
org.apache.sedona.core.formatMapper.shapefileParser.parseUtils.dbf.DbfParseUtil
- All Implemented Interfaces:
ShapeFileConst
-
Field Summary
FieldsModifier and TypeFieldDescriptionintnumber of bytes per recordintnumber of record get from headerintnumber of records already read.Fields inherited from interface org.apache.sedona.core.formatMapper.shapefileParser.parseUtils.shp.ShapeFileConst
DOUBLE_LENGTH, EXPECT_FILE_CODE, EXPECT_FILE_VERSION, FIELD_DESCRIPTOR_TERMINATOR, FIELD_NAME_LENGTH, FILE_END_FLAG, HEAD_BOX_NUM, HEAD_EMPTY_NUM, HEAD_FILE_LENGTH_16BIT, INT_LENGTH, RECORD_DELETE_FLAG, RECORD_EXIST_FLAG -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringfieldBytesToString(List<byte[]> fieldBytesList) abstract attributes from primitive bytes according to field descriptors.floatbooleanisDone()List<byte[]>parse(DataInputStream inputStream) Parse the next record in the .dbf filevoidparseFileHead(DataInputStream inputStream) parse header of .dbf file and draw information for next step
-
Field Details
-
numRecord
public int numRecordnumber of record get from header -
numBytesRecord
public int numBytesRecordnumber of bytes per record -
numRecordRead
public int numRecordReadnumber of records already read. Records that is ignored also counted in
-
-
Constructor Details
-
DbfParseUtil
public DbfParseUtil()
-
-
Method Details
-
isDone
public boolean isDone() -
getProgress
public float getProgress() -
getFieldDescriptors
-
parseFileHead
parse header of .dbf file and draw information for next step- Parameters:
inputStream-- Throws:
IOException
-
parse
Parse the next record in the .dbf file- Parameters:
inputStream- input stream of .dbf file- Returns:
- a list of fields as their original representation in the dbf file
- Throws:
IOException- if an I/O error occurs
-
fieldBytesToString
abstract attributes from primitive bytes according to field descriptors.- Parameters:
fieldBytesList- a list of primitive bytes- Returns:
- string attributes delimited by '\t'
-