for (char c = readCh(); c != ';' && c != '\uffff'; c = readCh()) b.append(c);
for (int c = readCh(); c != 0x3b && c != -1; c = readCh()) b.append(Character.toChars(c));
  private char[] readCharacterRef(int base)    throws IOException, XMLStreamException  {    StringBuffer b = new StringBuffer();    for (char c = readCh(); c != ';' && c != '\uffff'; c = readCh())      b.append(c);    try      {        int ord = Integer.parseInt(b.toString(), base);        if ((ord < 0x20 && !(ord == 0x0a || ord == 0x09 || ord == 0x0d))            || (ord >= 0xd800 && ord <= 0xdfff)            || ord == 0xfffe || ord == 0xffff            || ord > 0x0010ffff)          error("illegal XML character reference" +                "U+" + Integer.toHexString(ord));        return Character.toChars(ord);      }    catch (NumberFormatException e)      {        error("illegal characters in character reference", b.toString());        return null;      }  }