@Override
  public void flushPageToStream(OutputStream stream) throws IOException {
    if (pageIndex < 0) {
      // mark as check point
      stream.write(new byte[] {(byte) pageIndex});
      return;
    }

    this.pageBuffer.clear();
    stream.write(pageBuffer.array());
  }
compatible constructor with no existing ref or lock
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/schemaengine/schemaregion/mtree/impl/pbtree/schemafile/SchemaPage.java