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)
| Modifier and Type | Method and Description |
|---|---|
static String |
encode(Color color)
Converts a
Color into a HTML representation of this Color. |
static String |
encode(String string)
Converts a
String to the HTML-format of this String. |
static String |
getAlignment(int alignment)
Translates the alignment value.
|
public static String encode(String string)
String to the HTML-format of this String.string - The String to convertStringpublic static String encode(Color color)
Color into a HTML representation of this Color.color - the Color that has to be converted.public static String getAlignment(int alignment)
alignment - the alignment valueCopyright © 2019. All rights reserved.