case ' ': d.print(chars, last, (pos-last)); d.print("&nbsp;"); last = pos+1; break;
    private static void quote(Device d, String s) throws IOException {	if (s == null) return;        char[] chars = s.toCharArray();	char c;        int last = 0;	for (int pos = 0; pos < chars.length; ++pos) {            c = chars[pos];	    switch (c) {	    case '&':                 d.print(chars, last, (pos-last));                d.print("&amp;");                last = pos+1;                break;	    case '"':                 d.print(chars, last, (pos-last));                d.print("&quot;");                last = pos+1;                break;	    case '<':                 d.print(chars, last, (pos-last));                d.print("&lt;");                last = pos+1;                break;	    case '>':                d.print(chars, last, (pos-last));                d.print("&gt;");                last = pos+1;                break;	    }	}        d.print(chars, last, chars.length-last);    }