private void setInputEncoding(String encoding) throws UnsupportedEncodingException { if (!encoding.equals(inputEncoding) && reader instanceof XMLInputStreamReader)
void setInputEncoding(String encoding) throws IOException
    private void setInputEncoding(String encoding)      throws UnsupportedEncodingException    {      if (!encoding.equals(inputEncoding) &&          reader instanceof XMLInputStreamReader)        {          inputEncoding = encoding;          reader = new XMLInputStreamReader((XMLInputStreamReader) reader,                                            encoding);        }      else        {          /*if (reporter != null)            {            try            {            reporter.report("unable to set input encoding '" + encoding +            "': input is specified as reader", "WARNING",            encoding, this);            }            catch (XMLStreamException e)            {          // Am I bothered?          }}*/          System.err.println("Can't set input encoding "+encoding);        }    }