title: encoding in Java StAX parser
body: <p>I'm using StAX to read XML file, but having problem with characters like žćčšđ.
  The code is almost same as in the SAX, but i had not that kind of problem with that.</p>
  
  <p>this is part of xml document</p>
  
  <pre><code>&lt;?xml version = "1.0" encoding="UTF-8" ?&gt;      
  &lt;Autor&gt;
          &lt;Id&gt;1&lt;/Id&gt;
          &lt;Meno&gt;Jano Žiška&lt;/Meno&gt;
          &lt;Email&gt;dfdsfsfdsdf@gmail.com&lt;/Email&gt;
          &lt;tel_cislo typ="mobil"&gt;0944564685&lt;/tel_cislo&gt;  
          &lt;plat&gt;500&lt;/plat&gt;
        &lt;/Autor&gt;
  </code></pre>
  
  <p>java</p>
  
  <pre><code>        public static void main(String[] args) {
              try {
                XMLInputFactory f = XMLInputFactory.newInstance();
                XMLStreamReader r = f.createXMLStreamReader(new FileReader(SUBOR));
              }
  ....
            if (r.getLocalName().equals(ELEMENT_MENO) == true) {
              String v = r.getElementText();
               System.out.println("meno:\t\t\t " + v);
            }
  </code></pre>
  
  <p>how can i specify encoding in java?
  thanks</p>