@Override
    public int compareTo(AbstractUtf8Array rhs) {
        final int l = getByteLength();
        final int rl = rhs.getByteLength();
        if (l < rl) {
            return -1;
        } else if (l > rl) {
            return 1;
        } else {
            final byte [] b = getBytes();
            final byte [] rb = rhs.getBytes();
            final int c = getByteOffset();
            final int rc = rhs.getByteOffset();
            for (int i=0; i < l; i++) {
                if (b[c+i] < rb[rc+i]) {
                    return -1;
                } else if (b[c+i] > rb[rc+i]) {
                    return 1;
                }
            }
            return 0;
        }
    }
Retuerns  the utf8 sequence as a Java string.
vespajlib/src/main/java/com/yahoo/text/AbstractUtf8Array.java