这段函数的代表的意思是变成HTML转义字符码?

private static void withinStyle(StringBuilder out, CharSequence text,
int start, int end) {
for (int i = start; i < end; i++) {
char c = text.charAt(i);

        if (c == '<') {
            out.append("&lt;");
        } else if (c == '>') {
            out.append("&gt;");
        } else if (c == '&') {
            out.append("&amp;");
        } else if (c >= 0xD800 && c <= 0xDFFF) {
            if (c < 0xDC00 && i + 1 < end) {
                char d = text.charAt(i + 1);
                if (d >= 0xDC00 && d <= 0xDFFF) {
                    i++;
                    int codepoint = 0x010000 | (int) c - 0xD800 << 10 | (int) d - 0xDC00;
                    out.append("&#").append(codepoint).append(";");
                }
            }
        } else if (c > 0x7E || c < ' ') {
            out.append("&#").append((int) c).append(";");
        } else if (c == ' ') {
            while (i + 1 < end && text.charAt(i + 1) == ' ') {
                out.append("&nbsp;");
                i++;
            }

            out.append(' ');
        } else {
            out.append(c);
        }
    }
}

}

基本上是这么个意思,为啥这干不知