public static String encode(String raw){
  StringBuilder sb=new StringBuilder((raw.length() * 3) / 2);
  Escaping.escapeXml(raw,false,sb);
  return sb.toString();
}

public static String encode ( String raw ) { StringBuilder sb = new StringBuilder ( ( raw . length ( ) * 3 ) / 2 ) ; Escaping . escapeXml ( raw , false , sb ) ; return sb . toString ( ) ; }
convert html to plain text by replacing html special characters with html entities .
