com.lowagie.text.html
public final class HtmlEncoder extends Object
String to the HTML-format of a String.
To convert the String, each character is examined:
Example:
String htmlPresentation = HtmlEncoder.encode("Marie-Thérèse Sørensen");
for more info: see O'Reilly; "HTML: The Definitive Guide" (page 164)
| Field Summary | |
|---|---|
| static String[] | htmlCode List with the HTML translation of all the characters. |
| Constructor Summary | |
|---|---|
| HtmlEncoder()
This class will never be constructed.
| |
| Method Summary | |
|---|---|
| static String | encode(String string)
Converts a String to the HTML-format of this String.
|
| static String | encode(Color color)
Converts a Color into a HTML representation of this Color.
|
| static String | getAlignment(int alignment)
Translates the alignment value.
|
HtmlEncoder only contains static methods.
String to the HTML-format of this String.
Parameters: string The String to convert
Returns: a String
Color into a HTML representation of this Color.
Parameters: color the Color that has to be converted.
Returns: the HTML representation of this
Parameters: alignment the alignment value
Returns: the translated value