@Override
    public int read(@NotNull byte[] b, int off, int len) throws IOException {
      int num = inputStream.read(b, off, len);
      if (num < 0) {
        return num;
      }
      readBytes += num;
      return num;
    }
This class provides the ability to record the num of read bytes from the nested InputStream.
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/schemaengine/schemaregion/logfile/SchemaLogReader.java