public static int sizeOfBodyInBytes(int offsetDelta,
                                        long timestampDelta,
                                        int keySize,
                                        int valueSize,
                                        Header[] headers) {
        int size = 1; // always one byte for attributes
        size += ByteUtils.sizeOfVarint(offsetDelta);
        size += ByteUtils.sizeOfVarlong(timestampDelta);
        size += sizeOf(keySize, valueSize, headers);
        return size;
    }
Skips over and discards exactly {@code bytesToSkip} bytes from the input stream.

We require a loop over {@link InputStream#skip(long)} because it is possible for InputStream to skip smaller
number of bytes than expected (see javadoc for InputStream#skip).

No-op for case where bytesToSkip <= 0. This could occur for cases where field is expected to be null.
@throws InvalidRecordException if end of stream is encountered before we could skip required bytes.
@throws IOException is an I/O error occurs while trying to skip from InputStream.

@see java.io.InputStream#skip(long)
clients/src/main/java/org/apache/kafka/common/record/DefaultRecord.java