code: public Object nextEntity(char a) throws JSONException {
          StringBuffer sb = new StringBuffer();
          for (;;) {
              char c = next();
              if (Character.isLetterOrDigit(c) || c == '#') {
                  sb.append(Character.toLowerCase(c));
              } else if (c == ';') {
                  break;
              } else {
                  throw syntaxError("Missing ';' in XML entity: &" + sb);
              }
          }
          String s = sb.toString();
          Object e = entity.get(s);
          return e != null ? e : a + s + ";";
      }
docs: Return the next entity. These entities are translated to Characters:
  <code>&amp;  &apos;  &gt;  &lt;  &quot;</code>.
  @param a An ampersand character.
  @return  A Character or an entity String if the entity is not recognized.
  @throws JSONException If missing ';' in XML entity.