@Override
    public void writeVarint(int i) {
        ByteUtils.writeVarint(i, buffer);
    }
Write a byte buffer. The reference to the underlying buffer will
be retained in the result of {@link #build()}.

@param buf the buffer to write
clients/src/main/java/org/apache/kafka/common/protocol/SendBuilder.java