public ByteBuffer serialize() throws IOException {
    PublicBAOS baos = new PublicBAOS();
    serialize(baos);
    ByteBuffer serializedPatternTree = ByteBuffer.allocate(baos.size());
    serializedPatternTree.put(baos.getBuf(), 0, baos.size());
    serializedPatternTree.flip();
    return serializedPatternTree;
  }
Construct tree according to the pathPatternList.
iotdb-core/node-commons/src/main/java/org/apache/iotdb/commons/path/PathPatternTree.java