if (reader != null)
if (encodingDetected)
    void setInputEncoding(String encoding)      throws IOException        {      if (encoding.equals(inputEncoding))        return;      if ("UTF-16".equalsIgnoreCase(encoding) &&          inputEncoding.startsWith("UTF-16"))        return;      if (reader != null)        throw new UnsupportedEncodingException("document is not in its " +                                               "declared encoding " +                                               inputEncoding +                                               ": " + encoding);          inputEncoding = encoding;      finalizeEncoding();            }