for (int i = 0; i < addresses.length; i++) { InternetAddress a = (InternetAddress)addresses[i]; if (a.isGroup()) { if (groups == null) {
for (int i = 0; i < addresses.length; i++) { InternetAddress a = (InternetAddress)addresses[i]; if (a.isGroup()) { if (groups == null) {
/** * Parse the given string and create an InternetAddress. * If <code>strict</code> is false, the detailed syntax of the * address isn't checked. * * @param address the address in RFC822 format * @param strict enforce RFC822 syntax * @exception AddressException if the parse failed * @since JavaMail 1.3 */ public InternetAddress(String address, boolean strict) throws AddressException { this(address); if (strict) { if (isGroup()) getGroup(true); // throw away the result else checkAddress(this.address, true, true); } }
/** * Parse the given string and create an InternetAddress. * If <code>strict</code> is false, the detailed syntax of the * address isn't checked. * * @param address the address in RFC822 format * @param strict enforce RFC822 syntax * @exception AddressException if the parse failed * @since JavaMail 1.3 */ public InternetAddress(String address, boolean strict) throws AddressException { this(address); if (strict) { if (isGroup()) getGroup(true); // throw away the result else checkAddress(this.address, true, true); } }
/** * Returns a properly formatted address (RFC 822 syntax) of * Unicode characters. * * @return Unicode address string * @since JavaMail 1.2 */ public String toUnicodeString() { String p = getPersonal(); if (p != null) return quotePhrase(p) + " <" + address + ">"; else if (isGroup() || isSimple()) return address; else return "<" + address + ">"; }
/** * Returns a properly formatted address (RFC 822 syntax) of * Unicode characters. * * @return Unicode address string * @since JavaMail 1.2 */ public String toUnicodeString() { String p = getPersonal(); if (p != null) return quotePhrase(p) + " <" + address + ">"; else if (isGroup() || isSimple()) return address; else return "<" + address + ">"; }
/** * Validate that this address conforms to the syntax rules of * RFC 822. The current implementation checks many, but not * all, syntax rules. Note that even though the syntax of * the address may be correct, there's no guarantee that a * mailbox of that name exists. * * @exception AddressException if the address isn't valid. * @since JavaMail 1.3 */ public void validate() throws AddressException { if (isGroup()) getGroup(true); // throw away the result else checkAddress(getAddress(), true, true); }
/** * Validate that this address conforms to the syntax rules of * RFC 822. The current implementation checks many, but not * all, syntax rules. Note that even though the syntax of * the address may be correct, there's no guarantee that a * mailbox of that name exists. * * @exception AddressException if the address isn't valid. * @since JavaMail 1.3 */ public void validate() throws AddressException { if (isGroup()) getGroup(true); // throw away the result else checkAddress(getAddress(), true, true); }
/** * Convert this address into a RFC 822 / RFC 2047 encoded address. * The resulting string contains only US-ASCII characters, and * hence is mail-safe. * * @return possibly encoded address string */ @Override public String toString() { String a = address == null ? "" : address; if (encodedPersonal == null && personal != null) try { encodedPersonal = MimeUtility.encodeWord(personal); } catch (UnsupportedEncodingException ex) { } if (encodedPersonal != null) return quotePhrase(encodedPersonal) + " <" + a + ">"; else if (isGroup() || isSimple()) return a; else return "<" + a + ">"; }
/** * Convert this address into a RFC 822 / RFC 2047 encoded address. * The resulting string contains only US-ASCII characters, and * hence is mail-safe. * * @return possibly encoded address string */ public String toString() { String a = address == null ? "" : address; if (encodedPersonal == null && personal != null) try { encodedPersonal = MimeUtility.encodeWord(personal); } catch (UnsupportedEncodingException ex) { } if (encodedPersonal != null) return quotePhrase(encodedPersonal) + " <" + a + ">"; else if (isGroup() || isSimple()) return a; else return "<" + a + ">"; }
@Override public boolean isGroup() { return wrappedInstance.isGroup(); }
/** * Validate that this address conforms to the syntax rules of * RFC 822. The current implementation checks many, but not * all, syntax rules. Note that even though the syntax of * the address may be correct, there's no guarantee that a * mailbox of that name exists. * * @exception AddressException if the address isn't valid. * @since JavaMail 1.3 */ public void validate() throws AddressException { if (isGroup()) getGroup(true); // throw away the result else checkAddress(getAddress(), true, true); }
/** * Validate that this address conforms to the syntax rules of * RFC 822. The current implementation checks many, but not * all, syntax rules. Note that even though the syntax of * the address may be correct, there's no guarantee that a * mailbox of that name exists. * * @exception AddressException if the address isn't valid. * @since JavaMail 1.3 */ public void validate() throws AddressException { if (isGroup()) getGroup(true); // throw away the result else checkAddress(getAddress(), true, true); }
/** * Returns a properly formatted address (RFC 822 syntax) of * Unicode characters. * * @return Unicode address string * @since JavaMail 1.2 */ public String toUnicodeString() { String p = getPersonal(); if (p != null) return quotePhrase(p) + " <" + address + ">"; else if (isGroup() || isSimple()) return address; else return "<" + address + ">"; }
/** * Validate that this address conforms to the syntax rules of * RFC 822. The current implementation checks many, but not * all, syntax rules. Note that even though the syntax of * the address may be correct, there's no guarantee that a * mailbox of that name exists. * * @exception AddressException if the address isn't valid. * @since JavaMail 1.3 */ public void validate() throws AddressException { if (isGroup()) getGroup(true); // throw away the result else checkAddress(getAddress(), true, true); }
/** * Returns a properly formatted address (RFC 822 syntax) of * Unicode characters. * * @return Unicode address string * @since JavaMail 1.2 */ public String toUnicodeString() { String p = getPersonal(); if (p != null) return quotePhrase(p) + " <" + address + ">"; else if (isGroup() || isSimple()) return address; else return "<" + address + ">"; }
/** * Validate that this address conforms to the syntax rules of * RFC 822. The current implementation checks many, but not * all, syntax rules. Note that even though the syntax of * the address may be correct, there's no guarantee that a * mailbox of that name exists. * * @exception AddressException if the address isn't valid. * @since JavaMail 1.3 */ public void validate() throws AddressException { if (isGroup()) getGroup(true); // throw away the result else checkAddress(getAddress(), true, true); }
/** * Returns a properly formatted address (RFC 822 syntax) of * Unicode characters. * * @return Unicode address string * @since JavaMail 1.2 */ public String toUnicodeString() { String p = getPersonal(); if (p != null) return quotePhrase(p) + " <" + address + ">"; else if (isGroup() || isSimple()) return address; else return "<" + address + ">"; }
/** * Returns a properly formatted address (RFC 822 syntax) of * Unicode characters. * * @return Unicode address string * @since JavaMail 1.2 */ public String toUnicodeString() { String p = getPersonal(); if (p != null) return quotePhrase(p) + " <" + address + ">"; else if (isGroup() || isSimple()) return address; else return "<" + address + ">"; }
/** * Validate that this address conforms to the syntax rules of * RFC 822. The current implementation checks many, but not * all, syntax rules. Note that even though the syntax of * the address may be correct, there's no guarantee that a * mailbox of that name exists. * * @exception AddressException if the address isn't valid. * @since JavaMail 1.3 */ public void validate() throws AddressException { if (isGroup()) getGroup(true); // throw away the result else checkAddress(getAddress(), true, true); }