char c;
int c;
  private ExternalIds readExternalIds(boolean inNotation, boolean isSubset)    throws IOException, XMLStreamException  {    char c;    int flags = LIT_DISABLE_CREF | LIT_DISABLE_PE | LIT_DISABLE_EREF;    ExternalIds ids = new ExternalIds();        if (tryRead("PUBLIC"))      {        requireWhitespace();        ids.publicId = readLiteral(LIT_NORMALIZE | LIT_PUBID | flags);        if (inNotation)          {            skipWhitespace();            mark(1);            c = readCh();            reset();            if (c == '"' || c == '\'')              ids.systemId = absolutize(input.systemId, readLiteral(flags));          }        else          {            requireWhitespace();            ids.systemId = absolutize(input.systemId, readLiteral(flags));          }        for (int i = 0; i < ids.publicId.length(); i++)          {            c = ids.publicId.charAt(i);            if (c >= 'a' && c <= 'z')              continue;            if (c >= 'A' && c <= 'Z')              continue;            if (" \r\n0123456789-' ()+,./:=?;!*#@$_%".indexOf(c) != -1)              continue;            error("illegal PUBLIC id character",                  "U+" + Integer.toHexString(c));          }      }    else if (tryRead("SYSTEM"))      {        requireWhitespace();        ids.systemId = absolutize(input.systemId, readLiteral(flags));      }    else if (!isSubset)      {        error("missing SYSTEM or PUBLIC keyword");      }    if (ids.systemId != null)      {        if (ids.systemId.indexOf('#') != -1)          error("SYSTEM id has a URI fragment", ids.systemId);      }    return ids;  }