public class Translate extends Object
Note: Do not edit! This class is created by the Generate class.
Typical usage:
String s = Translate.decode(getTextFromHtmlPage());
Modifier and Type | Method and Description |
---|---|
static char |
convertToChar(String string)
Convert a reference to a unicode character.
|
static String |
convertToString(Character character)
Convert a character to a character entity reference.
|
static String |
convertToString(int character)
Convert a character to a numeric character reference.
|
static String |
decode(String string)
Decode a string containing references.
|
static String |
encode(String string)
Encode a string to use references.
|
static String |
shrink(String string)
It returns a string shrinked in size Replace ant character &..; by "w".
|
public static char convertToChar(String string)
string
- The string to convert. Of the form &xxxx; or &#xxxx; with
or without the leading ampersand or trailing semi-colon.public static String decode(String string)
string
- The string to translate.public static String shrink(String string)
string
- The string to translate.public static String convertToString(Character character)
character
- The character to convert.null
if the character is
not one of the known entity references.public static String convertToString(int character)
character
- The character to convert.public static String encode(String string)
Character
for each character in the string, but this class
is primarily intended to decode strings so efficiency and speed in the
encoding was not a priority.string
- The string to translate.Jas4pp 1.5 © Java Analysis Studio for Particle Physics