Java Code Examples for javax.mail.internet.InternetAddress#toUnicodeString()

The following examples show how to use javax.mail.internet.InternetAddress#toUnicodeString() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: InternetAddressEditor.java    From spring-analysis-note with MIT License 4 votes vote down vote up
@Override
public String getAsText() {
	InternetAddress value = (InternetAddress) getValue();
	return (value != null ? value.toUnicodeString() : "");
}
 
Example 2
Source File: InternetAddressEditor.java    From java-technology-stack with MIT License 4 votes vote down vote up
@Override
public String getAsText() {
	InternetAddress value = (InternetAddress) getValue();
	return (value != null ? value.toUnicodeString() : "");
}
 
Example 3
Source File: InternetAddressEditor.java    From lams with GNU General Public License v2.0 4 votes vote down vote up
@Override
public String getAsText() {
	InternetAddress value = (InternetAddress) getValue();
	return (value != null ? value.toUnicodeString() : "");
}
 
Example 4
Source File: InternetAddressEditor.java    From spring4-understanding with Apache License 2.0 4 votes vote down vote up
@Override
public String getAsText() {
	InternetAddress value = (InternetAddress) getValue();
	return (value != null ? value.toUnicodeString() : "");
}
 
Example 5
Source File: AddressStringTerm.java    From FairEmail with GNU General Public License v3.0 3 votes vote down vote up
/**
    * Check whether the address pattern specified in the constructor is
    * a substring of the string representation of the given Address
    * object. <p>
    *
    * Note that if the string representation of the given Address object
    * contains charset or transfer encodings, the encodings must be 
    * accounted for, during the match process. <p>
    *
    * @param   a 	The comparison is applied to this Address object.
    * @return          true if the match succeeds, otherwise false.
    */
   protected boolean match(Address a) {
if (a instanceof InternetAddress) {
    InternetAddress ia = (InternetAddress)a;
    // We dont use toString() to get "a"'s String representation,
    // because InternetAddress.toString() returns a RFC 2047 
    // encoded string, which isn't what we need here.

    return super.match(ia.toUnicodeString());
} else
    return super.match(a.toString());
   }