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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? mailaddress.java

?? 基于UDP的可靠郵件系統(tǒng)
?? JAVA
?? 第 1 頁 / 共 2 頁
字號(hào):
/*********************************************************************** * Copyright (c) 2000-2004 The Apache Software Foundation.             * * All rights reserved.                                                * * ------------------------------------------------------------------- * * Licensed under the Apache License, Version 2.0 (the "License"); you * * may not use this file except in compliance with the License. You    * * may obtain a copy of the License at:                                * *                                                                     * *     http://www.apache.org/licenses/LICENSE-2.0                      * *                                                                     * * Unless required by applicable law or agreed to in writing, software * * distributed under the License is distributed on an "AS IS" BASIS,   * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or     * * implied.  See the License for the specific language governing       * * permissions and limitations under the License.                      * ***********************************************************************/package org.hwmhere.email.mailet;import java.util.Locale;/** * A representation of an email address. * <p> * This class encapsulates functionalities to access to different parts of an * email address without dealing with its parsing. * </p> *  * <p> * A MailAddress is an address specified in the MAIL FROM and RCPT TO commands * in SMTP sessions. These are either passed by an external server to the * mailet-compliant SMTP server, or they are created programmatically by the * mailet-compliant server to send to another (external) SMTP server. Mailets * and matchers use the MailAddress for the purpose of evaluating the sender and * recipient(s) of a message. * </p> *  * <p> * MailAddress parses an email address as defined in RFC 821 (SMTP) p. 30 and 31 * where addresses are defined in BNF convention. As the mailet API does not * support the aged "SMTP-relayed mail" addressing protocol, this leaves all * addresses to be a <mailbox>, as per the spec. The MailAddress's "user" is the * <local-part> of the <mailbox> and "host" is the <domain> of the mailbox. * </p> *  * <p> * This class is a good way to validate email addresses as there are some valid * addresses which would fail with a simpler approach to parsing address. It * also removes parsing burden from mailets and matchers that might not realize * the flexibility of an SMTP address. For instance, "serge@home"@lokitech.com * is a valid SMTP address (the quoted text serge@home is the user and * lokitech.com is the host). This means all current parsing to date is * incorrect as we just find the first @ and use that to separate user from * host. * </p> *  * <p> * This parses an address as per the BNF specification for <mailbox> from RFC * 821 on page 30 and 31, section 4.1.2. COMMAND SYNTAX. * http://www.freesoft.org/CIE/RFC/821/15.htm * </p> *  * @version 1.0 */public class MailAddress implements java.io.Serializable {	// We hardcode the serialVersionUID so that from James 1.2 on,	// MailAddress will be deserializable (so your mail doesn't get lost)	public static final long serialVersionUID = 2779163542539434916L;	private final static char[] SPECIAL = { '<', '>', '(', ')', '[', ']', '\\',			'.', ',', ';', ':', '@', '\"' };	private String user = null;	private String host = null;	// Used for parsing	private int pos = 0;	/**	 * <p>	 * Construct a MailAddress parsing the provided <code>String</code>	 * object.	 * </p>	 * 	 * <p>	 * The <code>personal</code> variable is left empty.	 * </p>	 * 	 * @param address	 *            the email address compliant to the RFC822 format	 * @throws ParseException	 *             if the parse failed	 */	public MailAddress(String address) throws Exception {		address = address.trim();		int i = address.indexOf('@');		if (1 == i) {		}		user = address.substring(0, i);		host = address.substring(i + 1);		// StringBuffer userSB = new StringBuffer();		// StringBuffer hostSB = new StringBuffer();		// //Begin parsing		// //<mailbox> ::= <local-part> "@" <domain>		//		// try {		// //parse local-part		// //<local-part> ::= <dot-string> | <quoted-string>		// if (address.charAt(pos) == '\"') {		// userSB.append(parseQuotedLocalPart(address));		// } else {		// userSB.append(parseUnquotedLocalPart(address));		// }		// if (userSB.toString().length() == 0) {		// throw new Exception("No local-part (user account) found at position "		// + (pos + 1));		// }		//		// //find @		// if (pos >= address.length() || address.charAt(pos) != '@') {		// throw new Exception("Did not find @ between local-part and domain at		// position " + (pos + 1));		// }		// pos++;		//		// //parse domain		// //<domain> ::= <element> | <element> "." <domain>		// //<element> ::= <name> | "#" <number> | "[" <dotnum> "]"		// while (true) {		// if (address.charAt(pos) == '#') {		// hostSB.append(parseNumber(address));		// } else if (address.charAt(pos) == '[') {		// hostSB.append(parseDotNum(address));		// } else {		// hostSB.append(parseDomainName(address));		// }		// if (pos >= address.length()) {		// break;		// }		// if (address.charAt(pos) == '.') {		// hostSB.append('.');		// pos++;		// continue;		// }		// break;		// }		//		// if (hostSB.toString().length() == 0) {		// throw new Exception("No domain found at position " + (pos + 1));		// }		// } catch (IndexOutOfBoundsException ioobe) {		// throw new Exception("Out of data at position " + (pos + 1));		// }		//		// user = userSB.toString();		// host = hostSB.toString();	}	/**	 * Construct a MailAddress with the provided personal name and email	 * address.	 * 	 * @param user	 *            the username or account name on the mail server	 * @param host	 *            the server that should accept messages for this user	 * @throws Exception	 *             if the parse failed	 */	public MailAddress(String newUser, String newHost) throws Exception {		/* NEEDS TO BE REWORKED TO VALIDATE EACH CHAR */		user = newUser;		host = newHost;	}	/**	 * Constructs a MailAddress from a JavaMail InternetAddress, using only the	 * email address portion, discarding the personal name.	 */	// public MailAddress(InternetAddress address) throws Exception {	// this(address.getAddress());	// }	/**	 * Return the host part.	 * 	 * @return a <code>String</code> object representing the host part of this	 *         email address. If the host is of the dotNum form (e.g.	 *         [yyy.yyy.yyy.yyy]) then strip the braces first.	 */	public String getHost() {		if (!(host.startsWith("[") && host.endsWith("]"))) {			return host;		} else {			return host.substring(1, host.length() - 1);		}	}	/**	 * Return the user part.	 * 	 * @return a <code>String</code> object representing the user part of this	 *         email address.	 * @throws AddressException	 *             if the parse failed	 */	public String getUser() {		return user;	}	public String toString() {		StringBuffer addressBuffer = new StringBuffer(128).append(user).append(				"@").append(host);		return addressBuffer.toString();	}	// public InternetAddress toInternetAddress() {	// try {	// return new InternetAddress(toString());	// } catch (javax.mail.internet.AddressException ae) {	// //impossible really	// return null;	// }	// }	public boolean equals(Object obj) {		if (obj == null) {			return false;		} else if (obj instanceof String) {			String theString = (String) obj;			return toString().equalsIgnoreCase(theString);		} else if (obj instanceof MailAddress) {			MailAddress addr = (MailAddress) obj;			return getUser().equalsIgnoreCase(addr.getUser())					&& getHost().equalsIgnoreCase(addr.getHost());		}		return false;	}	/**	 * Return a hashCode for this object which should be identical for addresses	 * which are equivalent. This is implemented by obtaining the default	 * hashcode of the String representation of the MailAddress. Without this	 * explicit definition, the default hashCode will create different hashcodes	 * for separate object instances.	 * 

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
婷婷综合另类小说色区| 欧美一区二区三区免费| 国产精品人妖ts系列视频| 久久国产成人午夜av影院| 日韩一区二区视频| 久久 天天综合| 精品久久久影院| 久草精品在线观看| 日本一区二区三区视频视频| 9色porny自拍视频一区二区| 中文字幕亚洲综合久久菠萝蜜| 99综合影院在线| 一区二区三区 在线观看视频| 欧美午夜电影在线播放| 香蕉av福利精品导航| 欧美一区二区在线观看| 亚洲成a天堂v人片| 欧美三级乱人伦电影| 婷婷六月综合亚洲| 在线观看免费视频综合| 天天av天天翘天天综合网| 欧美日韩美少妇| 天堂一区二区在线免费观看| 欧美久久久久久久久| 奇米色一区二区| 久久亚洲二区三区| 成人午夜免费视频| 亚洲三级在线播放| 欧美剧在线免费观看网站| 麻豆91精品91久久久的内涵| 久久女同性恋中文字幕| 国产成人精品一区二区三区四区| 日韩欧美中文一区| 成人午夜在线视频| 亚洲高清免费视频| 欧美日韩一级视频| 黑人巨大精品欧美黑白配亚洲| 亚洲国产精品成人综合色在线婷婷| 91麻豆福利精品推荐| 日本系列欧美系列| 国产丝袜欧美中文另类| 91麻豆免费视频| 日韩国产欧美三级| 日本一区二区电影| 欧美理论片在线| 大美女一区二区三区| 亚洲一区中文在线| 精品免费国产二区三区| 99国产精品99久久久久久| 天天爽夜夜爽夜夜爽精品视频| 精品久久久久久久一区二区蜜臀| 成人伦理片在线| 日日骚欧美日韩| 国产亚洲成av人在线观看导航| 欧美优质美女网站| 国产v综合v亚洲欧| 亚洲va欧美va国产va天堂影院| 国产夜色精品一区二区av| 一本色道综合亚洲| 精品一区二区国语对白| 中文字幕不卡一区| 日韩一级完整毛片| 色吊一区二区三区| 国产精品一二三| 人人狠狠综合久久亚洲| 亚洲精品综合在线| 国产午夜精品一区二区三区嫩草| 欧美色网一区二区| 成人动漫视频在线| 国产一区二区在线视频| 日韩精彩视频在线观看| 亚洲免费观看高清完整版在线观看| 欧美肥妇毛茸茸| 日本高清不卡在线观看| 高清不卡在线观看| 精品亚洲成a人| 午夜精品视频一区| 亚洲精品国产品国语在线app| 久久人人超碰精品| 欧美大度的电影原声| 欧美日韩一区二区不卡| 在线免费不卡视频| 一本色道综合亚洲| 色综合亚洲欧洲| 97精品电影院| 国产91精品入口| 国产精品一二二区| 国产精品一区二区无线| 国产一区二区精品在线观看| 蜜桃一区二区三区在线| 蜜桃一区二区三区四区| 日韩中文字幕亚洲一区二区va在线 | 亚洲欧洲精品一区二区三区 | 亚洲国产精品影院| 亚洲视频一区二区在线观看| 国产欧美日韩亚州综合| 久久久噜噜噜久久中文字幕色伊伊 | 欧美日韩和欧美的一区二区| 91国内精品野花午夜精品| 91麻豆福利精品推荐| 91在线观看下载| 国产成人综合在线| 成人avav在线| 欧美又粗又大又爽| 欧美日韩一级二级| 欧美一级黄色大片| www成人在线观看| 中文子幕无线码一区tr| 亚洲男人的天堂网| 伊人夜夜躁av伊人久久| 一区二区三区四区五区视频在线观看 | 亚洲综合免费观看高清完整版在线| 亚洲精品乱码久久久久久日本蜜臀| 亚洲自拍偷拍欧美| 日韩精品成人一区二区在线| 久久激情五月婷婷| 国产精品亚洲人在线观看| 国产一区二区在线观看视频| 久久国产夜色精品鲁鲁99| 国产一区二区三区久久久| 色哟哟国产精品| 日韩欧美在线影院| 国产蜜臀av在线一区二区三区| 成人免费在线视频| 香港成人在线视频| 国产精品亚洲成人| 在线影院国内精品| 欧美电影精品一区二区| 亚洲国产精品二十页| 亚洲国产成人tv| 奇米色777欧美一区二区| 国内精品伊人久久久久av影院 | 亚洲精品一区在线观看| 最近中文字幕一区二区三区| 亚洲精品高清在线观看| 麻豆视频一区二区| 91一区二区在线| 欧美精品高清视频| 国产婷婷色一区二区三区在线| 一区二区三区av电影| 国产一区二区三区| 一本大道久久a久久综合婷婷| 日韩久久久精品| 亚洲日本乱码在线观看| 老司机精品视频在线| 91蜜桃免费观看视频| 久久综合狠狠综合久久综合88| 一区二区视频在线| 国产精品123区| 91精品国产高清一区二区三区蜜臀| 国产亚洲欧美一区在线观看| 偷拍自拍另类欧美| 国产福利一区在线| 欧美日韩国产123区| 亚洲欧美综合另类在线卡通| 韩国女主播一区| 91麻豆精品国产91久久久使用方法| 亚洲国产精品av| 麻豆成人av在线| 91麻豆精品91久久久久同性| 中文字幕五月欧美| 国产一二三精品| 欧美电视剧免费观看| 亚洲成国产人片在线观看| 91污片在线观看| 久久久久国产精品麻豆ai换脸 | 国产精品77777竹菊影视小说| 91精品国产91久久综合桃花| 国产精品高潮久久久久无| 激情综合亚洲精品| 欧美疯狂性受xxxxx喷水图片| 亚洲国产精品一区二区www | 亚洲一区二区三区激情| 不卡欧美aaaaa| 亚洲精品一区二区三区蜜桃下载| 无码av中文一区二区三区桃花岛| 成人avav在线| 中文字幕一区二区不卡 | 日韩视频免费观看高清完整版| 亚洲线精品一区二区三区| 成人aaaa免费全部观看| 欧美精品一区二区三区在线播放| 日韩影院在线观看| 欧美精品日日鲁夜夜添| 亚洲免费视频中文字幕| 91免费版在线| 亚洲天堂2014| 91麻豆国产福利精品| 亚洲精品国产高清久久伦理二区| 99精品欧美一区二区蜜桃免费| 国产精品欧美久久久久无广告| 福利一区二区在线观看| 国产日韩欧美高清| 国产成人鲁色资源国产91色综| 欧美激情在线一区二区三区| 高清beeg欧美| 亚洲免费在线电影| 欧美精品一卡二卡| 久久黄色级2电影| 精品国产一区久久|