org.mule.util
Class EncodingUtils
java.lang.Object
org.mule.util.EncodingUtils
- public class EncodingUtils
- extends java.lang.Object
Method Summary |
static java.lang.String |
decode(java.lang.String string)
|
static java.lang.String |
encode(java.lang.String string)
|
static java.lang.String |
sgmlEncode(java.lang.String string)
|
protected static java.lang.String |
toSgmlEncoding(char c)
Converts a character to its SGML numeric encoding |
static java.lang.String |
toSgmlEntity(char c)
Encodes a character using its SGML sequence
It can be a hex representation |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
EncodingUtils
public EncodingUtils()
encode
public static java.lang.String encode(java.lang.String string)
decode
public static java.lang.String decode(java.lang.String string)
toSgmlEncoding
protected static java.lang.String toSgmlEncoding(char c)
- Converts a character to its SGML numeric encoding
- Parameters:
c
- the character
- Returns:
- a string with the representation of c as
"Numeric Character Reference" in SGMLese
Example:
toSgmlEncoding('\n')
returns " ".
toSgmlEntity
public static java.lang.String toSgmlEntity(char c)
- Encodes a character using its SGML sequence
It can be a hex representation
- Parameters:
c
- the character
- Returns:
- the string with either Predefined Entity, Numeric Character Reference,
or null if no entity could be found
sgmlEncode
public static java.lang.String sgmlEncode(java.lang.String string)
Copyright © 2003-2005 SymphonySoft Limited. All Rights Reserved.