public static ByteBuffer serializePartialPathList(List<? extends PartialPath> paths) {
    ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
    DataOutputStream dataOutputStream = new DataOutputStream(byteArrayOutputStream);

    try {
      dataOutputStream.writeInt(paths.size());
      for (PartialPath path : paths) {
        path.serialize(dataOutputStream);
      }
    } catch (IOException e) {
      LOGGER.error("Failed to serialize PartialPath list", e);
    }
    return ByteBuffer.wrap(byteArrayOutputStream.toByteArray());
  }
Transform permission from name to privilegeId

@param authorizationList the list of privilege name
@return the set of privilege type
@throws AuthException throws if there are no privilege matched
iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/utils/AuthUtils.java