|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.poi.xwpf.converter.xhtml.internal.utils.StringEscapeUtils
public class StringEscapeUtils
| Nested Class Summary | |
|---|---|
static class |
StringEscapeUtils.Entities
Provides HTML and XML entity utilities. |
| Constructor Summary | |
|---|---|
StringEscapeUtils()
|
|
| Method Summary | |
|---|---|
static String |
escapeHtml(String str)
Escapes the characters in a String using HTML entities. |
static void |
escapeHtml(Writer writer,
String string)
Escapes the characters in a String using HTML entities and writes them to a Writer. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public StringEscapeUtils()
| Method Detail |
|---|
public static String escapeHtml(String str)
Escapes the characters in a String using HTML entities.
For example:
"bread" & "butter"
"bread" & "butter" .
Supports all known HTML 4.0 entities, including funky accents. Note that the commonly used apostrophe escape character (') is not a legal entity and so is not supported).
str - the String to escape, may be null
String, null if null string input#unescapeHtml(String),
ISO Entities,
HTML 3.2 Character Entities for ISO Latin-1,
HTML 4.0 Character entity references,
HTML 4.01 Character References,
HTML 4.01 Code positions
public static void escapeHtml(Writer writer,
String string)
throws IOException
Escapes the characters in a String using HTML entities and writes them to a Writer.
For example:
"bread" & "butter"
becomes:
"bread" & "butter" .
Supports all known HTML 4.0 entities, including funky accents. Note that the commonly used apostrophe escape character (') is not a legal entity and so is not supported).
writer - the writer receiving the escaped string, not nullstring - the String to escape, may be null
IllegalArgumentException - if the writer is null
IOException - when Writer passed throws the exception from calls to the
Writer.write(int) methods.escapeHtml(String),
#unescapeHtml(String),
ISO Entities,
HTML 3.2 Character Entities for ISO Latin-1,
HTML 4.0 Character entity references,
HTML 4.01 Character References,
HTML 4.01 Code positions
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||