title: Convert HTML Character Back to Text Using Java Standard Library
body: <p>I would like to convert some HTML characters back to text using Java Standard Library. I was wondering whether any library would achieve my purpose?</p>
  
  <pre><code>/**
   * @param args the command line arguments
   */
  public static void main(String[] args) {
      // TODO code application logic here
  
      // "Happy &amp; Sad" in HTML form.
      String s = "Happy &amp;amp; Sad";
      System.out.println(s);
  
      try {
          // Change to "Happy &amp; Sad". DOESN'T WORK!
          s = java.net.URLDecoder.decode(s, "UTF-8");
          System.out.println(s);
      } catch (UnsupportedEncodingException ex) {
  
      }
  }
  </code></pre>