The following are methods for EncodingUtil. All methods are static.
public static Blob convertToHex(String inputString)
Type: Blob
Each byte in the Blob is constructed from two hexadecimal characters in the input string.
The convertFromHex method throws the following exceptions.
Blob blobValue = EncodingUtil.convertFromHex('4A4B4C'); System.assertEquals('JKL', blobValue.toString());
public static String convertToHex(Blob inputString)
Type: String
public static String urlDecode(String inputString, String encodingScheme)
Type: String
This method uses the supplied encoding scheme to determine which characters are represented by any consecutive sequence of the from \"%xy\". For more information about the format, see The form-urlencoded Media Type in Hypertext Markup Language - 2.0.
public static String urlEncode(String inputString, String encodingScheme)
Type: String
This method uses the supplied encoding scheme to obtain the bytes for unsafe characters. For more information about the format, see The form-urlencoded Media Type in Hypertext Markup Language - 2.0.
String encoded = EncodingUtil.urlEncode(url, 'UTF-8');