if (i >= len) return;
    private final void writeChars(CharSequence s, boolean inAttribute)    throws IOException {//        boolean[] specialChars = inAttribute ? attrSpecialChars//                : textSpecialChars;        char ch = 0;        final int len = s.length();        int pos = 0, i;        while (pos < len) {            i = pos;                        // TODO: I am not sure about this loop.            while (i < len) {                ch = s.charAt(i);//                if (ch < 128) {//                    if (specialChars[ch])//                        break;//                    else//                        i++;//                } else if (!charSet.inCharacterSet(ch) || ch == 160)//                    break;//                else                    i++;            }            writeCharSeq(s, pos, i);            // writer.write(s.subSequence(pos, i).toString());            if (i >= len)                return;//            switch (ch) {//                case '<'://                    writer.write("&lt;");//                    break;//                case '>'://                    writer.write("&gt;");//                    break;//                case '&'://                    writer.write("&amp;");//                    break;//                case '\r'://                    writer.write("&#xD;");//                    break;//                case '\n'://                    writer.write("&#xA;");//                    break;//                case '\t'://                    writer.write("&#x9;");//                    break;//                case '"'://                    writer.write("&#34;");//                    break;//                    // non-breaking space://                case 160://                    writer.write("&#160;");//                    break;//                default://                    writeCharacterReference(ch);//            }            writeCharacterReference(ch);            pos = ++i;        }    }