Java Utililty Methods HTML Entity

List of utility methods to do HTML Entity

  1. HOME
  2. Java
  3. H
  4. HTML Entity

Description

The list of methods to do HTML Entity are organized into topic(s).

Method

String charToHtmlEntity(char entity)
char To Html Entity
return CHAR_TO_HTML_ENTITIES.get(entity);
String htmlEntities(String html)
html Entities
StringBuilder out = new StringBuilder(html.length() * 2);
for (int p = 0; p < html.length(); p++) {
 Character c = html.charAt(p);
 String entity = entityTable.get(c);
 if (entity != null)
 out.append(entity);
 else
 out.append(c);
...
String removeHtmlEntity(String content)
remove Html Entity
for (Map.Entry<String, Integer> entry : ENTITIES.entrySet()) {
 content = content.replaceAll("&" + entry.getKey() + ";", "");
return content;
String replaceHtmlEntitiesWithEmptyString(String stb)
replace Html Entities With Empty String
Iterator i$ = HTML_ENTITY_MAP.keySet().iterator();
do {
 if (!i$.hasNext())
 break;
 String key = (String) i$.next();
 if (stb.contains(key))
 stb = stb.replaceAll(key, "");
} while (true);
...
String unescapeHTMLEntities(String source)
unescape HTML Entities
Iterator<String> it = htmlEntities.keySet().iterator();
while (it.hasNext()) {
 String key = it.next();
 String val = htmlEntities.get(key);
 source = source.replaceAll(key, val);
return source;

AltStyle によって変換されたページ (->オリジナル) /