java.lang.Object
org.apache.sedona.core.formatMapper.shapefileParser.parseUtils.dbf.DbfParseUtil
All Implemented Interfaces:
ShapeFileConst

public class DbfParseUtil extends Object implements ShapeFileConst
  • Field Details

    • numRecord

      public int numRecord
      number of record get from header
    • numBytesRecord

      public int numBytesRecord
      number of bytes per record
    • numRecordRead

      public int numRecordRead
      number 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

      public List<FieldDescriptor> getFieldDescriptors()
    • parseFileHead

      public void parseFileHead(DataInputStream inputStream) throws IOException
      parse header of .dbf file and draw information for next step
      Parameters:
      inputStream -
      Throws:
      IOException
    • parse

      public List<byte[]> parse(DataInputStream inputStream) throws IOException
      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

      public static String fieldBytesToString(List<byte[]> fieldBytesList)
      abstract attributes from primitive bytes according to field descriptors.
      Parameters:
      fieldBytesList - a list of primitive bytes
      Returns:
      string attributes delimited by '\t'