@Override
    public int sizeInBytes() {
        return size.get();
    }
The {@code FileRecords.open} methods should be used instead of this constructor whenever possible.
The constructor is visible for tests.
clients/src/main/java/org/apache/kafka/common/record/FileRecords.java