public static String htmlAmpersand(final String str){
  return str.replaceAll("&","&amp;");
}

public static String htmlAmpersand ( final String str ) { return str . replaceAll ( "&" , "&amp;" ) ; }
replace & amp ; characters with & amp ; amp ; html entities .
