亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? internetaddress.java

?? java Email you can use it to send email to others
?? JAVA
?? 第 1 頁 / 共 3 頁
字號:
/* * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. * * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved. * * The contents of this file are subject to the terms of either the GNU * General Public License Version 2 only ("GPL") or the Common Development * and Distribution License("CDDL") (collectively, the "License").  You * may not use this file except in compliance with the License. You can obtain * a copy of the License at https://glassfish.dev.java.net/public/CDDL+GPL.html * or glassfish/bootstrap/legal/LICENSE.txt.  See the License for the specific * language governing permissions and limitations under the License. * * When distributing the software, include this License Header Notice in each * file and include the License file at glassfish/bootstrap/legal/LICENSE.txt. * Sun designates this particular file as subject to the "Classpath" exception * as provided by Sun in the GPL Version 2 section of the License file that * accompanied this code.  If applicable, add the following below the License * Header, with the fields enclosed by brackets [] replaced by your own * identifying information: "Portions Copyrighted [year] * [name of copyright owner]" * * Contributor(s): * * If you wish your version of this file to be governed by only the CDDL or * only the GPL Version 2, indicate your decision by adding "[Contributor] * elects to include this software in this distribution under the [CDDL or GPL * Version 2] license."  If you don't indicate a single choice of license, a * recipient has the option to distribute your version of this file under * either the CDDL, the GPL Version 2 or to extend the choice of license to * its licensees as provided above.  However, if you add GPL Version 2 code * and therefore, elected the GPL Version 2 license, then the option applies * only if the new code is made subject to such option by the copyright * holder. *//* * @(#)InternetAddress.java	1.49 07/05/04 */package javax.mail.internet;import java.io.UnsupportedEncodingException;import java.net.InetAddress;import java.net.UnknownHostException;import java.util.Vector;import java.util.StringTokenizer;import java.util.Locale;import javax.mail.*;/** * This class represents an Internet email address using the syntax * of <a href="http://www.ietf.org/rfc/rfc822.txt">RFC822</a>. * Typical address syntax is of the form "user@host.domain" or * "Personal Name <user@host.domain>". * * @author Bill Shannon * @author John Mani */public class InternetAddress extends Address implements Cloneable {    protected String address; // email address    /**     * The personal name.     */    protected String personal;    /**     * The RFC 2047 encoded version of the personal name. <p>     *     * This field and the <code>personal</code> field track each     * other, so if a subclass sets one of these fields directly, it     * should set the other to <code>null</code>, so that it is     * suitably recomputed.     */    protected String encodedPersonal;    private static final long serialVersionUID = -7507595530758302903L;    /**     * Default constructor.     */    public InternetAddress() { }    /**     * Constructor. <p>     *     * Parse the given string and create an InternetAddress.     * See the <code>parse</code> method for details of the parsing.     * The address is parsed using "strict" parsing.     * This constructor does <b>not</b> perform the additional     * syntax checks that the     * <code>InternetAddress(String address, boolean strict)</code>     * constructor does when <code>strict</code> is <code>true</code>.     * This constructor is equivalent to     * <code>InternetAddress(address, false)</code>.     *     * @param address	the address in RFC822 format     * @exception	AddressException if the parse failed     */    public InternetAddress(String address) throws AddressException {	// use our address parsing utility routine to parse the string	InternetAddress a[] = parse(address, true);	// if we got back anything other than a single address, it's an error	if (a.length != 1)	    throw new AddressException("Illegal address", address);	/*	 * Now copy the contents of the single address we parsed	 * into the current object, which will be returned from the	 * constructor.	 * XXX - this sure is a round-about way of getting this done.	 */	this.address = a[0].address;	this.personal = a[0].personal;	this.encodedPersonal = a[0].encodedPersonal;    }    /**     * 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)	    checkAddress(this.address, true, true);    }    /**     * Construct an InternetAddress given the address and personal name.     * The address is assumed to be a syntactically valid RFC822 address.     *     * @param address	the address in RFC822 format     * @param personal	the personal name     */    public InternetAddress(String address, String personal)				throws UnsupportedEncodingException {	this(address, personal, null);    }    /**     * Construct an InternetAddress given the address and personal name.     * The address is assumed to be a syntactically valid RFC822 address.     *     * @param address	the address in RFC822 format     * @param personal	the personal name     * @param charset	the MIME charset for the name     */    public InternetAddress(String address, String personal, String charset)				throws UnsupportedEncodingException {	this.address = address;	setPersonal(personal, charset);    }    /**     * Return a copy of this InternetAddress object.     * @since		JavaMail 1.2     */    public Object clone() {	InternetAddress a = null;	try {	    a = (InternetAddress)super.clone();	} catch (CloneNotSupportedException e) {} // Won't happen	return a;    }    /**     * Return the type of this address. The type of an InternetAddress     * is "rfc822".     */    public String getType() {	return "rfc822";    }    /**     * Set the email address.     *     * @param	address email address     */    public void setAddress(String address) {	this.address = address;    }    /**     * Set the personal name. If the name contains non US-ASCII     * characters, then the name will be encoded using the specified     * charset as per RFC 2047. If the name contains only US-ASCII     * characters, no encoding is done and the name is used as is. <p>     *     * @param	name 	personal name     * @param	charset	MIME charset to be used to encode the name as      *			per RFC 2047     * @see 	#setPersonal(String)     * @exception UnsupportedEncodingException if the charset encoding     *		  fails.     */    public void setPersonal(String name, String charset)				throws UnsupportedEncodingException {	personal = name;	if (name != null)	    encodedPersonal = MimeUtility.encodeWord(name, charset, null);	else	    encodedPersonal = null;    }    /**     * Set the personal name. If the name contains non US-ASCII     * characters, then the name will be encoded using the platform's      * default charset. If the name contains only US-ASCII characters,     * no encoding is done and the name is used as is. <p>     *     * @param	name 	personal name     * @see 	#setPersonal(String name, String charset)     * @exception UnsupportedEncodingException if the charset encoding     *		  fails.     */    public void setPersonal(String name) 		throws UnsupportedEncodingException {	personal = name;	if (name != null)	    encodedPersonal = MimeUtility.encodeWord(name);	else	    encodedPersonal = null;    }    /**     * Get the email address.     * @return	email address     */    public String getAddress() {	return address;    }    /**     * Get the personal name. If the name is encoded as per RFC 2047,     * it is decoded and converted into Unicode. If the decoding or     * conversion fails, the raw data is returned as is.     *     * @return	personal name     */    public String getPersonal() {	if (personal != null)	    return personal;		if (encodedPersonal != null) {	    try {		personal = MimeUtility.decodeText(encodedPersonal);		return personal;	    } catch (Exception ex) {		// 1. ParseException: either its an unencoded string or		//	it can't be parsed		// 2. UnsupportedEncodingException: can't decode it.		return encodedPersonal;	    }	}	// No personal or encodedPersonal, return null	return null;    }    /**     * 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() {	if (encodedPersonal == null && personal != null)	    try {		encodedPersonal = MimeUtility.encodeWord(personal);	    } catch (UnsupportedEncodingException ex) { }		if (encodedPersonal != null)	    return quotePhrase(encodedPersonal) + " <" + 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 + ">";    }    /*     * quotePhrase() quotes the words within a RFC822 phrase.     *     * This is tricky, since a phrase is defined as 1 or more     * RFC822 words, separated by LWSP. Now, a word that contains     * LWSP is supposed to be quoted, and this is exactly what the      * MimeUtility.quote() method does. However, when dealing with     * a phrase, any LWSP encountered can be construed to be the     * separator between words, and not part of the words themselves.     * To deal with this funkiness, we have the below variant of     * MimeUtility.quote(), which essentially ignores LWSP when     * deciding whether to quote a word.     *     * It aint pretty, but it gets the job done :)     */    private static final String rfc822phrase =	HeaderTokenizer.RFC822.replace(' ', '\0').replace('\t', '\0');    private static String quotePhrase(String phrase) {        int len = phrase.length();        boolean needQuoting = false;        for (int i = 0; i < len; i++) {            char c = phrase.charAt(i);            if (c == '"' || c == '\\') {                 // need to escape them and then quote the whole string                StringBuffer sb = new StringBuffer(len + 3);                sb.append('"');                for (int j = 0; j < len; j++) {                    char cc = phrase.charAt(j);                    if (cc == '"' || cc == '\\')                        // Escape the character                        sb.append('\\');                    sb.append(cc);                }                sb.append('"');                return sb.toString();            } else if ((c < 040 && c != '\r' && c != '\n' && c != '\t') || 			c >= 0177 || rfc822phrase.indexOf(c) >= 0)               // These characters cause the string to be quoted                needQuoting = true;        }        if (needQuoting) {

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美日韩精品一二三区| 欧美日韩国产精选| 色偷偷88欧美精品久久久| 久草在线在线精品观看| 成人动漫一区二区三区| 日本道精品一区二区三区| 欧美区一区二区三区| 5858s免费视频成人| 欧美国产日韩一二三区| 日韩高清一区在线| zzijzzij亚洲日本少妇熟睡| 欧美在线免费观看视频| 久久这里只有精品6| 亚洲免费大片在线观看| 久久99精品久久久久久久久久久久| 大胆欧美人体老妇| 欧美一区二区三区公司| 亚洲女与黑人做爰| 午夜影视日本亚洲欧洲精品| 狠狠色综合播放一区二区| 成人午夜激情片| 日韩网站在线看片你懂的| 亚洲精品成人悠悠色影视| 国产精品一二三| 717成人午夜免费福利电影| 久久天天做天天爱综合色| 亚洲国产精品尤物yw在线观看| 国产福利一区在线| 日韩一卡二卡三卡四卡| 亚洲成人免费观看| 欧美中文一区二区三区| 中文字幕一区二区三区在线不卡 | 国产乱子伦一区二区三区国色天香| 成人av动漫网站| 久久久夜色精品亚洲| 蜜桃视频一区二区三区| 制服丝袜中文字幕一区| 亚洲高清三级视频| 成人高清在线视频| 日韩三级精品电影久久久| 亚洲大型综合色站| 欧美三级电影网站| 亚洲线精品一区二区三区八戒| 粉嫩aⅴ一区二区三区四区五区| 精品成人在线观看| 国产原创一区二区三区| 26uuu精品一区二区| 久久99蜜桃精品| 精品免费视频.| 韩国欧美国产1区| 久久丝袜美腿综合| 国产风韵犹存在线视精品| 久久网这里都是精品| 国产精品中文字幕日韩精品| 久久久久久久综合日本| 粉嫩高潮美女一区二区三区| 国产精品视频你懂的| 成人动漫视频在线| 精品国产凹凸成av人导航| 久久99精品国产麻豆婷婷| 欧美另类变人与禽xxxxx| 免费在线观看日韩欧美| 久久久噜噜噜久久中文字幕色伊伊| 国产精品自拍网站| 综合欧美一区二区三区| 色偷偷久久一区二区三区| 亚洲国产日韩一级| 日韩久久久久久| 久久成人久久爱| 亚洲国产精品av| 色老汉一区二区三区| 亚洲成人一二三| 久久精品日产第一区二区三区高清版| 国产成人精品免费网站| ...中文天堂在线一区| 欧美视频在线一区| 国产精品自拍一区| 亚洲成人动漫一区| 国产日产欧产精品推荐色| 91高清在线观看| 韩国午夜理伦三级不卡影院| 136国产福利精品导航| 成人精品视频网站| 午夜一区二区三区视频| 成人午夜电影网站| 首页综合国产亚洲丝袜| 精品sm捆绑视频| 欧美性猛交xxxx乱大交退制版| 亚洲成a天堂v人片| 国产精品视频线看| 欧美成人精品福利| 91久久精品一区二区三区| 国产一区二区视频在线播放| 亚洲精品国产品国语在线app| 欧美白人最猛性xxxxx69交| 91色综合久久久久婷婷| 精品一区二区三区视频在线观看| 亚洲男人电影天堂| 久久久久久久久99精品| 91麻豆精品国产自产在线| 国产成人免费视频一区| 亚洲国产精品一区二区尤物区| 国产精品色呦呦| 欧美视频一区二区在线观看| 国产一区二区三区国产| 亚洲高清免费视频| 一区二区三区中文字幕| 久久综合av免费| 欧美日韩中文字幕一区| 99riav一区二区三区| 国模少妇一区二区三区| 蜜臀av国产精品久久久久| 亚洲一区日韩精品中文字幕| 成人免费在线视频| 中文字幕在线观看一区| 国产欧美精品区一区二区三区| 精品国精品自拍自在线| 日韩欧美在线观看一区二区三区| 成人h动漫精品一区二区 | 在线观看一区不卡| 99精品热视频| va亚洲va日韩不卡在线观看| 国产一区二区不卡在线| 蜜桃91丨九色丨蝌蚪91桃色| 亚洲成在人线免费| 天堂va蜜桃一区二区三区漫画版| 一区二区视频免费在线观看| 国产精品传媒入口麻豆| 中文字幕一区二区视频| 国产精品久久久久久久久搜平片| 欧美激情综合五月色丁香小说| 亚洲精品在线观| 欧美在线观看视频一区二区| 狠狠狠色丁香婷婷综合激情| 亚洲欧美另类久久久精品 | 91电影在线观看| 91国偷自产一区二区使用方法| 日本电影欧美片| 欧美日韩在线精品一区二区三区激情| 在线免费观看视频一区| 国产精品99久久久久久久女警| 国产伦精品一区二区三区视频青涩 | 欧美日韩午夜在线| 日本久久精品电影| 欧美亚洲国产bt| 欧美色网站导航| 欧美日韩综合一区| 成人黄色在线视频| 欧美性生活久久| 欧美大胆一级视频| 国产丝袜在线精品| 一区二区三区精品视频在线| 亚洲激情av在线| 麻豆91免费观看| 亚洲一二三区在线观看| 老司机一区二区| 99精品黄色片免费大全| 7777精品伊人久久久大香线蕉的| 精品久久久久99| 国产精品久久久久久妇女6080 | 99久久久免费精品国产一区二区| 国产成人免费xxxxxxxx| 91丝袜美腿高跟国产极品老师| 一本大道久久a久久综合| 一区二区三区四区亚洲| 亚洲一区av在线| www.日韩大片| 91精品一区二区三区在线观看| 久久久99免费| 亚洲v精品v日韩v欧美v专区| 国产精品资源在线看| 欧美一级一区二区| 亚洲图片另类小说| 国产一区二区视频在线| 欧美亚洲国产一区在线观看网站| 2020国产成人综合网| 一区二区三区小说| 成人精品小蝌蚪| 欧美成人精品3d动漫h| 亚洲精品大片www| 国产成人精品影院| 91国偷自产一区二区三区观看 | 久久国产精品一区二区| 色综合天天做天天爱| 精品福利av导航| 日韩影院在线观看| 久久精品国产亚洲一区二区三区| 欧洲一区在线电影| 中文字幕在线一区| 国产寡妇亲子伦一区二区| 在线综合亚洲欧美在线视频| 亚洲精品国久久99热| 972aa.com艺术欧美| 国产欧美精品区一区二区三区| 国产真实乱子伦精品视频| 欧美一级专区免费大片| 亚洲国产视频网站| 一道本成人在线| 亚洲国产欧美一区二区三区丁香婷| 成人精品在线视频观看|