@Override
  public void serialize(T t, OutputStream outputStream) throws IOException {
    serializer.serialize(t, logBufferStream);
    logBufferStream.writeTo(outputStream);
    // clear buffer
    logBufferStream.reset();
  }
This class provides the ability to buffer the data serialized by nested serializer.

@param <T> the generic type
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/schemaengine/schemaregion/logfile/BufferedSerializer.java