Java Utililty Methods String Decode

List of utility methods to do String Decode

Description

The list of methods to do String Decode are organized into topic(s).

Method

StringdecodeText(String encodeText)
decode Text
if (encodeText == null || "".equals(encodeText)) {
    return "";
} else {
    return MimeUtility.decodeText(encodeText);
StringdecodeText(String s)
Decode iso-xxxx strings present in subjects and emails like: =?ISO-8859-1?Q?No=20hay=20ma=F1ana?=
String ret = s;
try {
    ret = MimeUtility.decodeText(s);
} catch (UnsupportedEncodingException e) {
    System.out.println(e.getMessage());
ret = ret
        .replaceFirst("^[<\"' ]+([^\"<>]*)[>\"' ]+<", "$1 <");
...
StringdecodeText(String str)
Encode a string from "default.encoding" to "8859_1".
if (getEncoding() == null)
    return str;
return encodeText(str, getEncoding(), "8859_1");
StringdecodeTextQuietly(String input)
Calls MimeUtility#decodeText for the input.
if (input == null) {
    return null;
String decoded;
try {
    decoded = MimeUtility.decodeText(input);
} catch (UnsupportedEncodingException e) {
    decoded = input;
...