static ITimeIndex createTimeIndex(InputStream inputStream) throws IOException {
    byte timeIndexType = ReadWriteIOUtils.readByte(inputStream);
    if (timeIndexType == -1) {
      throw new IOException("The end of stream has been reached");
    }
    return TimeIndexLevel.valueOf(timeIndexType).getTimeIndex().deserialize(inputStream);
  }
Get TimeIndex Type

@return V012FileTimeIndex = 0, plainDeviceTimeIndex = 1, fileTimeIndex = 2,
    arrayDeviceTimeIndex = 3
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/tsfile/timeindex/ITimeIndex.java