public static String utf8(ByteBuffer buffer, int offset, int length) {
        if (buffer.hasArray())
            return new String(buffer.array(), buffer.arrayOffset() + buffer.position() + offset, length, StandardCharsets.UTF_8);
        else
            return utf8(toArray(buffer, offset, length));
    }
Read a UTF8 string from a byte buffer at a given offset. Note that the position of the byte buffer
is not affected by this method.

@param buffer The buffer to read from
@param offset The offset relative to the current position in the buffer
@param length The length of the string in bytes
@return The UTF8 string
clients/src/main/java/org/apache/kafka/common/utils/Utils.java