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

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

?? multipartreport.java

?? java Email you can use it to send email to others
?? JAVA
字號:
/* * 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. *//* * @(#)MultipartReport.java	1.7 07/05/04 */package com.sun.mail.dsn;import java.io.*;import java.util.Vector;import javax.activation.*;import javax.mail.*;import javax.mail.internet.*;/** * A multipart/report message content, as defined in * <A HREF="http://www.ietf.org/rfc/rfc3462.txt">RFC 3462</A>. * A multipart/report content is a container for mail reports * of any kind, and is most often used to return a delivery * status report.  This class only supports that most common * usage. <p> * * A MultipartReport object is a special type of MimeMultipart * object with a restricted set of body parts.  A MultipartReport * object contains: * <ul> * <li>[Required] A human readable text message describing the * reason the report was generated.</li> * <li>[Required] A {@link DeliveryStatus} object containing the * details for why the report was generated.</li> * <li>[Optional] A returned copy of the entire message, or just * its headers, which caused the generation of this report. * </ul> * Many of the normal MimeMultipart operations are restricted to * ensure that the MultipartReport object always follows this * structure. */public class MultipartReport extends MimeMultipart {    protected boolean constructed; // true when done with constructor    /**     * Construct a multipart/report object with no content.     */    public MultipartReport() throws MessagingException {	super("report");	// always at least two body parts	MimeBodyPart mbp = new MimeBodyPart();	setBodyPart(mbp, 0);	mbp = new MimeBodyPart();	setBodyPart(mbp, 1);	constructed = true;    }    /**     * Construct a multipart/report object with the specified plain     * text and delivery status to be returned to the user.     */    public MultipartReport(String text, DeliveryStatus status)				throws MessagingException {	super("report");	ContentType ct = new ContentType(contentType);	ct.setParameter("report-type", "delivery-status");	contentType = ct.toString();	MimeBodyPart mbp = new MimeBodyPart();	mbp.setText(text);	setBodyPart(mbp, 0);	mbp = new MimeBodyPart();	mbp.setContent(status, "message/delivery-status");	setBodyPart(mbp, 1);	constructed = true;    }    /**     * Construct a multipart/report object with the specified plain     * text, delivery status, and original message to be returned to the user.     */    public MultipartReport(String text, DeliveryStatus status,				MimeMessage msg) throws MessagingException {	this(text, status);	if (msg != null) {	    MimeBodyPart mbp = new MimeBodyPart();	    mbp.setContent(msg, "message/rfc822");	    setBodyPart(mbp, 2);	}    }    /**     * Construct a multipart/report object with the specified plain     * text, delivery status, and headers from the original message     * to be returned to the user.     */    public MultipartReport(String text, DeliveryStatus status,				InternetHeaders hdr) throws MessagingException {	this(text, status);	if (hdr != null) {	    MimeBodyPart mbp = new MimeBodyPart();	    mbp.setContent(new MessageHeaders(hdr), "text/rfc822-headers");	    setBodyPart(mbp, 2);	}    }    /**     * Constructs a MultipartReport object and its bodyparts from the      * given DataSource. <p>     *     * @param	ds	DataSource, can be a MultipartDataSource     */    public MultipartReport(DataSource ds) throws MessagingException {	super(ds);	parse();	constructed = true;	/*	 * Can't fail to construct object because some programs just	 * want to treat this as a Multipart and examine the parts.	 *	if (getCount() < 2 || getCount() > 3)	// XXX allow extra parts	    throw new MessagingException(		"Wrong number of parts in multipart/report: " + getCount());	 */    }    /**     * Get the plain text to be presented to the user, if there is any.     * Rarely, the message may contain only HTML text, or no text at     * all.  If the text body part of this multipart/report object is     * of type text/plain, or if it is of type multipart/alternative     * and contains a text/plain part, the text from that part is     * returned.  Otherwise, null is return and the {@link #getTextBodyPart     * getTextBodyPart} method may be used to extract the data.     */    public synchronized String getText() throws MessagingException {	try {	    BodyPart bp = getBodyPart(0);	    if (bp.isMimeType("text/plain"))		return (String)bp.getContent();	    if (bp.isMimeType("multipart/alternative")) {		Multipart mp = (Multipart)bp.getContent();		for (int i = 0; i < mp.getCount(); i++) {		    bp = mp.getBodyPart(i);		    if (bp.isMimeType("text/plain"))			return (String)bp.getContent();		}	    }	} catch (IOException ex) {	    throw new MessagingException("Exception getting text content", ex);	}	return null;    }    /**     * Set the message to be presented to the user as just a text/plain     * part containing the specified text.     */    public synchronized void setText(String text) throws MessagingException {	MimeBodyPart mbp = new MimeBodyPart();	mbp.setText(text);	setBodyPart(mbp, 0);    }    /**     * Return the body part containing the message to be presented to     * the user, usually just a text/plain part.     */    public synchronized MimeBodyPart getTextBodyPart()				throws MessagingException {	return (MimeBodyPart)getBodyPart(0);    }    /**     * Set the body part containing the text to be presented to the     * user.  Usually this a text/plain part, but it might also be     * a text/html part or a multipart/alternative part containing     * text/plain and text/html parts.  Any type is allowed here     * but these types are most common.     */    public synchronized void setTextBodyPart(MimeBodyPart mbp)				throws MessagingException {	setBodyPart(mbp, 0);    }    /**     * Get the delivery status associated with this multipart/report.     */    public synchronized DeliveryStatus getDeliveryStatus()				throws MessagingException {	if (getCount() < 2)	    return null;	BodyPart bp = getBodyPart(1);	if (!bp.isMimeType("message/delivery-status"))	    return null;	try {	    return (DeliveryStatus)bp.getContent();	} catch (IOException ex) {	    throw new MessagingException("IOException getting DeliveryStatus",					ex);	}    }    /**     * Set the delivery status associated with this multipart/report.     */    public synchronized void setDeliveryStatus(DeliveryStatus status)				throws MessagingException {	MimeBodyPart mbp = new MimeBodyPart();	mbp.setContent(status, "message/delivery-status");	setBodyPart(mbp, 2);	ContentType ct = new ContentType(contentType);	ct.setParameter("report-type", "delivery-status");	contentType = ct.toString();    }    /**     * Get the original message that is being returned along with this     * multipart/report.  If no original message is included, null is     * returned.  In some cases only the headers of the original     * message will be returned as an object of type MessageHeaders.     */    public synchronized MimeMessage getReturnedMessage()				throws MessagingException {	if (getCount() < 3)	    return null;	BodyPart bp = getBodyPart(2);	if (!bp.isMimeType("message/rfc822") &&		!bp.isMimeType("text/rfc822-headers"))	    return null;	try {	    return (MimeMessage)bp.getContent();	} catch (IOException ex) {	    throw new MessagingException("IOException getting ReturnedMessage",					ex);	}    }    /**     * Set the original message to be returned as part of the     * multipart/report.  If msg is null, any previously set     * returned message or headers is removed.     */    public synchronized void setReturnedMessage(MimeMessage msg)				throws MessagingException {	if (msg == null) {	    BodyPart part = (BodyPart)parts.elementAt(2);	    super.removeBodyPart(2);	    return;	}	MimeBodyPart mbp = new MimeBodyPart();	if (msg instanceof MessageHeaders)	    mbp.setContent(msg, "text/rfc822-headers");	else	    mbp.setContent(msg, "message/rfc822");	setBodyPart(mbp, 2);    }    private synchronized void setBodyPart(BodyPart part, int index) 				throws MessagingException {	if (parts == null)	// XXX - can never happen?	    parts = new Vector();	if (index < parts.size())	    super.removeBodyPart(index);	super.addBodyPart(part, index);    }    // Override Multipart methods to preserve integrity of multipart/report.    /**     * Set the subtype.  Throws MessagingException.     *     * @param	subtype		Subtype     * @exception	MessagingException	always; can't change subtype     */    public synchronized void setSubType(String subtype) 			throws MessagingException {	throw new MessagingException("Can't change subtype of MultipartReport");    }    /**     * Remove the specified part from the multipart message.     * Not allowed on a multipart/report object.     *     * @param   part	The part to remove     * @exception	MessagingException always     */    public boolean removeBodyPart(BodyPart part) throws MessagingException {	throw new MessagingException(	    "Can't remove body parts from multipart/report");    }    /**     * Remove the part at specified location (starting from 0).     * Not allowed on a multipart/report object.     *     * @param   index	Index of the part to remove     * @exception	MessagingException	always     */    public void removeBodyPart(int index) throws MessagingException {	throw new MessagingException(	    "Can't remove body parts from multipart/report");    }    /**     * Adds a Part to the multipart.     * Not allowed on a multipart/report object.     *     * @param  part  The Part to be appended     * @exception       MessagingException	always     */    public synchronized void addBodyPart(BodyPart part) 		throws MessagingException {	// Once constructor is done, don't allow this anymore.	if (!constructed)	    super.addBodyPart(part);	else	    throw new MessagingException(		"Can't add body parts to multipart/report 1");    }    /**     * Adds a BodyPart at position <code>index</code>.     * Not allowed on a multipart/report object.     *     * @param  part  The BodyPart to be inserted     * @param  index Location where to insert the part     * @exception       MessagingException	always     */    public synchronized void addBodyPart(BodyPart part, int index) 				throws MessagingException {	throw new MessagingException(	    "Can't add body parts to multipart/report 2");    }}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美一区二区在线视频| 亚洲精品中文字幕在线观看| 欧美激情一区二区在线| 亚洲国产精品一区二区www在线| 狠狠色丁香久久婷婷综合丁香| 一本大道久久a久久综合| 日韩一区二区三区在线观看 | 亚洲精品乱码久久久久久黑人| 日本不卡视频在线| 色国产综合视频| 国产精品免费aⅴ片在线观看| 天堂在线一区二区| 色哟哟欧美精品| 国产精品高清亚洲| 经典一区二区三区| 7777精品伊人久久久大香线蕉经典版下载 | 国产91色综合久久免费分享| 欧美一区二区观看视频| 一区二区在线看| heyzo一本久久综合| 精品成人在线观看| 老司机免费视频一区二区三区| 欧美日韩一级视频| 亚洲精品乱码久久久久久日本蜜臀| 国产98色在线|日韩| 国产日韩亚洲欧美综合| 精品亚洲免费视频| 欧美本精品男人aⅴ天堂| 日韩国产欧美视频| 欧美剧情电影在线观看完整版免费励志电影| 亚洲欧美日韩国产手机在线| 91丝袜国产在线播放| 国产精品久久久久一区| 成人在线一区二区三区| 国产精品久久久久久久久免费相片 | 成人av在线电影| 国产精品动漫网站| 成人福利视频在线看| 日韩一区欧美一区| av电影一区二区| 亚洲综合一区在线| 欧美日韩一区小说| 日韩av一区二区在线影视| 欧美一二区视频| 国产剧情在线观看一区二区| 国产三级久久久| 99国产精品国产精品毛片| 亚洲自拍偷拍欧美| 欧美电影在哪看比较好| 激情综合五月天| 欧美国产精品一区| 色综合 综合色| 午夜视频在线观看一区二区三区 | 日本麻豆一区二区三区视频| 日韩三级在线观看| 国产精品羞羞答答xxdd| 亚洲桃色在线一区| 欧美三级电影精品| 国内精品伊人久久久久av影院 | 国产精品麻豆网站| 欧美午夜精品一区二区蜜桃| 麻豆成人91精品二区三区| 久久精品一二三| 在线观看日韩毛片| 另类小说综合欧美亚洲| 日韩美女视频19| 69av一区二区三区| 成人网在线播放| 日本美女视频一区二区| 亚洲欧美在线另类| 日韩一区二区在线观看视频| 色综合咪咪久久| 国产精品一区二区在线观看网站| 自拍av一区二区三区| 欧美成人猛片aaaaaaa| 色88888久久久久久影院野外| 精品中文字幕一区二区| 亚洲精选免费视频| 国产日韩欧美激情| 欧美日韩国产三级| 成人一级片在线观看| 日韩高清一级片| 亚洲欧美色综合| 精品久久久久久久人人人人传媒| 欧美在线免费播放| 国产91精品在线观看| 日韩不卡一二三区| 日韩毛片在线免费观看| 久久久久久久一区| 日韩欧美一区在线| 在线亚洲高清视频| 99久久婷婷国产精品综合| 国产中文字幕精品| 日韩高清在线一区| 亚洲国产另类av| 一二三四区精品视频| 国产精品麻豆欧美日韩ww| 日韩欧美一级在线播放| 欧美三级午夜理伦三级中视频| 北岛玲一区二区三区四区| 国产黄色91视频| 黄页网站大全一区二区| 日本不卡中文字幕| 丝袜美腿一区二区三区| 亚洲一区二区三区四区五区黄| 亚洲人成影院在线观看| 国产精品乱码一区二区三区软件| 久久综合五月天婷婷伊人| 精品国产一区二区三区不卡| 91精品国产美女浴室洗澡无遮挡| 欧美丝袜第三区| 欧美福利电影网| 欧美一区二区不卡视频| 制服丝袜激情欧洲亚洲| 欧美一区二区三区婷婷月色| 欧美精品丝袜中出| 欧美一区二区三区的| 日韩一卡二卡三卡| 精品入口麻豆88视频| 精品久久一二三区| 久久久久久久久久久久久女国产乱 | 国产xxx精品视频大全| 国产在线视频一区二区三区| 国内精品国产成人国产三级粉色| 国产一区二区电影| 岛国一区二区在线观看| 99这里只有久久精品视频| 日本久久电影网| 欧美一级高清片| 国产无人区一区二区三区| 欧美国产激情一区二区三区蜜月| 国产精品久久久久婷婷| 亚洲黄色小视频| 日本亚洲最大的色成网站www| 极品少妇一区二区三区精品视频| 国v精品久久久网| 色女孩综合影院| 91精品婷婷国产综合久久竹菊| 久久伊人中文字幕| 一区在线观看视频| 视频一区视频二区在线观看| 国产一区高清在线| a4yy欧美一区二区三区| 91精品一区二区三区在线观看| 国产亚洲福利社区一区| 亚洲天堂中文字幕| 日本网站在线观看一区二区三区| 国产成人亚洲精品青草天美| 在线免费视频一区二区| 精品99一区二区三区| 亚洲视频你懂的| 久久精品免费观看| 色综合天天视频在线观看| 欧美大度的电影原声| 亚洲日本成人在线观看| 理论电影国产精品| 91高清视频免费看| 久久久三级国产网站| 午夜精品视频在线观看| 成人网页在线观看| 日韩情涩欧美日韩视频| 亚洲欧美在线观看| 激情五月婷婷综合| 欧美在线制服丝袜| 国产欧美日韩中文久久| 石原莉奈一区二区三区在线观看| 成人免费高清在线观看| 日韩三级av在线播放| 亚洲综合色网站| 97se狠狠狠综合亚洲狠狠| 2欧美一区二区三区在线观看视频 337p粉嫩大胆噜噜噜噜噜91av | 久久久精品国产免费观看同学| 欧美国产日韩在线观看| 蜜桃一区二区三区四区| 色综合久久久久综合体桃花网| 精品国产乱码久久| 日韩中文字幕区一区有砖一区 | 亚洲国产精品传媒在线观看| 日韩成人午夜精品| 色婷婷激情久久| 国产精品人人做人人爽人人添| 麻豆国产欧美一区二区三区| 欧美日韩日日摸| 亚洲综合在线视频| 99久久久国产精品| 国产精品欧美精品| 国产成人午夜片在线观看高清观看| 欧美一区二区三区日韩| 一区二区三区日韩欧美| 99国内精品久久| 国产精品国产三级国产普通话蜜臀| 韩国午夜理伦三级不卡影院| 精品裸体舞一区二区三区| 蜜桃久久精品一区二区| 欧美福利电影网| 美女在线视频一区| 日韩精品专区在线影院观看| 久久国产婷婷国产香蕉| 欧美刺激午夜性久久久久久久| 日本不卡123|