public static String transformDataToString(MeasurementPath measurementPath) {
    ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
    DataOutputStream dataOutputStream = new DataOutputStream(byteArrayOutputStream);
    try {
      measurementPath.serialize(dataOutputStream);
    } catch (IOException ignored) {
      // this exception won't happen.
    }
    byte[] bytes = byteArrayOutputStream.toByteArray();
    // must use single-byte char sets
    return new String(bytes, StandardCharsets.ISO_8859_1);
  }
In specific scenarios, like internal create timeseries, the message can only be passed as
String format.
iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/path/MeasurementPath.java