void write(ByteBuffer buffer, ObjectSerializationCache serializationCache) {
        data.write(new ByteBufferAccessor(buffer), serializationCache, headerVersion);
    }
Returns the size of {@link ResponseHeader} in bytes.

Calls to this method are idempotent and inexpensive since it returns the cached value of size after the first
invocation.
clients/src/main/java/org/apache/kafka/common/requests/ResponseHeader.java