public boolean isBlank() {
        if (isEmpty()) {
            return true;
        }

        int off = offset;
        int len = length;
        while (len > 0 && buffer[off] <= SPACE) {
            off++;
            len--;

            if (off >= buffer.length) {
                off = 0;
            }
        }

        return len == 0;
    }
True if the length of the buffer is 0 or that all content is whitespace.
stroom-util/src/test/java/stroom/util/xml/RingBuffer.java