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

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

?? mimemultipart.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. *//* * @(#)MimeMultipart.java	1.48 07/05/15 */package javax.mail.internet;import javax.mail.*;import javax.activation.*;import java.util.*;import java.io.*;import com.sun.mail.util.LineOutputStream;import com.sun.mail.util.LineInputStream;import com.sun.mail.util.ASCIIUtility;/** * The MimeMultipart class is an implementation of the abstract Multipart * class that uses MIME conventions for the multipart data. <p> * * A MimeMultipart is obtained from a MimePart whose primary type * is "multipart" (by invoking the part's <code>getContent()</code> method) * or it can be created by a client as part of creating a new MimeMessage. <p> * * The default multipart subtype is "mixed".  The other multipart * subtypes, such as "alternative", "related", and so on, can be * implemented as subclasses of MimeMultipart with additional methods * to implement the additional semantics of that type of multipart * content. The intent is that service providers, mail JavaBean writers * and mail clients will write many such subclasses and their Command * Beans, and will install them into the JavaBeans Activation * Framework, so that any JavaMail implementation and its clients can * transparently find and use these classes. Thus, a MIME multipart * handler is treated just like any other type handler, thereby * decoupling the process of providing multipart handlers from the * JavaMail API. Lacking these additional MimeMultipart subclasses, * all subtypes of MIME multipart data appear as MimeMultipart objects. <p> * * An application can directly construct a MIME multipart object of any * subtype by using the <code>MimeMultipart(String subtype)</code> * constructor.  For example, to create a "multipart/alternative" object, * use <code>new MimeMultipart("alternative")</code>. <p> * * The <code>mail.mime.multipart.ignoremissingendboundary</code> * property may be set to <code>false</code> to cause a * <code>MessagingException</code> to be thrown if the multipart * data does not end with the required end boundary line.  If this * property is set to <code>true</code> or not set, missing end * boundaries are not considered an error and the final body part * ends at the end of the data. <p> * * The <code>mail.mime.multipart.ignoremissingboundaryparameter</code> * System property may be set to <code>false</code> to cause a * <code>MessagingException</code> to be thrown if the Content-Type * of the MimeMultipart does not include a <code>boundary</code> parameter. * If this property is set to <code>true</code> or not set, the multipart * parsing code will look for a line that looks like a bounary line and * use that as the boundary separating the parts. * * @version 1.48, 07/05/15 * @author  John Mani * @author  Bill Shannon * @author  Max Spivak */public class MimeMultipart extends Multipart {    private static boolean ignoreMissingEndBoundary = true;    private static boolean ignoreMissingBoundaryParameter = true;    private static boolean bmparse = true;    static {	try {	    String s = System.getProperty(			"mail.mime.multipart.ignoremissingendboundary");	    // default to true	    ignoreMissingEndBoundary =			s == null || !s.equalsIgnoreCase("false");	    s = System.getProperty(			"mail.mime.multipart.ignoremissingboundaryparameter");	    // default to true	    ignoreMissingBoundaryParameter =			s == null || !s.equalsIgnoreCase("false");	    s = System.getProperty(			"mail.mime.multipart.bmparse");	    // default to true	    bmparse = s == null || !s.equalsIgnoreCase("false");	} catch (SecurityException sex) {	    // ignore it	}    }    /**     * The DataSource supplying our InputStream.     */    protected DataSource ds = null;    /**     * Have we parsed the data from our InputStream yet?     * Defaults to true; set to false when our constructor is     * given a DataSource with an InputStream that we need to     * parse.     */    protected boolean parsed = true;    /**     * Have we seen the final bounary line?     */    private boolean complete = true;    /**     * The MIME multipart preamble text, the text that     * occurs before the first boundary line.     */    private String preamble = null;    /**     * Default constructor. An empty MimeMultipart object     * is created. Its content type is set to "multipart/mixed".     * A unique boundary string is generated and this string is     * setup as the "boundary" parameter for the      * <code>contentType</code> field. <p>     *     * MimeBodyParts may be added later.     */    public MimeMultipart() {	this("mixed");    }    /**     * Construct a MimeMultipart object of the given subtype.     * A unique boundary string is generated and this string is     * setup as the "boundary" parameter for the      * <code>contentType</code> field. <p>     *     * MimeBodyParts may be added later.     */    public MimeMultipart(String subtype) {	super();	/*	 * Compute a boundary string.	 */	String boundary = UniqueValue.getUniqueBoundaryValue();	ContentType cType = new ContentType("multipart", subtype, null);	cType.setParameter("boundary", boundary);	contentType = cType.toString();    }    /**     * Constructs a MimeMultipart object and its bodyparts from the      * given DataSource. <p>     *     * This constructor handles as a special case the situation where the     * given DataSource is a MultipartDataSource object.  In this case, this     * method just invokes the superclass (i.e., Multipart) constructor     * that takes a MultipartDataSource object. <p>     *     * Otherwise, the DataSource is assumed to provide a MIME multipart      * byte stream.  The <code>parsed</code> flag is set to false.  When     * the data for the body parts are needed, the parser extracts the     * "boundary" parameter from the content type of this DataSource,     * skips the 'preamble' and reads bytes till the terminating     * boundary and creates MimeBodyParts for each part of the stream.     *     * @param	ds	DataSource, can be a MultipartDataSource     */    public MimeMultipart(DataSource ds) throws MessagingException {	super();	if (ds instanceof MessageAware) {	    MessageContext mc = ((MessageAware)ds).getMessageContext();	    setParent(mc.getPart());	}	if (ds instanceof MultipartDataSource) {	    // ask super to do this for us.	    setMultipartDataSource((MultipartDataSource)ds);	    return;	}	// 'ds' was not a MultipartDataSource, we have	// to parse this ourself.	parsed = false;	this.ds = ds;	contentType = ds.getContentType();    }    /**     * Set the subtype. This method should be invoked only on a new     * MimeMultipart object created by the client. The default subtype     * of such a multipart object is "mixed". <p>     *     * @param	subtype		Subtype     */    public synchronized void setSubType(String subtype) 			throws MessagingException {	ContentType cType = new ContentType(contentType);		cType.setSubType(subtype);	contentType = cType.toString();    }    /**     * Return the number of enclosed BodyPart objects.     *     * @return		number of parts     */    public synchronized int getCount() throws MessagingException {	parse();	return super.getCount();    }    /**     * Get the specified BodyPart.  BodyParts are numbered starting at 0.     *     * @param index	the index of the desired BodyPart     * @return		the Part     * @exception       MessagingException if no such BodyPart exists     */    public synchronized BodyPart getBodyPart(int index) 			throws MessagingException {	parse();	return super.getBodyPart(index);    }    /**     * Get the MimeBodyPart referred to by the given ContentID (CID).      * Returns null if the part is not found.     *     * @param  CID 	the ContentID of the desired part     * @return          the Part     */    public synchronized BodyPart getBodyPart(String CID) 			throws MessagingException {	parse();	int count = getCount();	for (int i = 0; i < count; i++) {	   MimeBodyPart part = (MimeBodyPart)getBodyPart(i);	   String s = part.getContentID();	   if (s != null && s.equals(CID))		return part;    	}	return null;    }    /**     * Remove the specified part from the multipart message.     * Shifts all the parts after the removed part down one.     *     * @param   part	The part to remove     * @return		true if part removed, false otherwise     * @exception	MessagingException if no such Part exists     * @exception	IllegalWriteException if the underlying     *			implementation does not support modification     *			of existing values     */    public boolean removeBodyPart(BodyPart part) throws MessagingException {	parse();	return super.removeBodyPart(part);    }    /**     * Remove the part at specified location (starting from 0).     * Shifts all the parts after the removed part down one.     *     * @param   index	Index of the part to remove     * @exception	MessagingException     * @exception       IndexOutOfBoundsException if the given index     *			is out of range.     * @exception	IllegalWriteException if the underlying     *			implementation does not support modification     *			of existing values     */    public void removeBodyPart(int index) throws MessagingException {	parse();	super.removeBodyPart(index);    }    /**     * Adds a Part to the multipart.  The BodyPart is appended to      * the list of existing Parts.     *     * @param  part  The Part to be appended     * @exception       MessagingException     * @exception	IllegalWriteException if the underlying     *			implementation does not support modification     *			of existing values     */    public synchronized void addBodyPart(BodyPart part) 		throws MessagingException {	parse();	super.addBodyPart(part);    }    /**     * Adds a BodyPart at position <code>index</code>.     * If <code>index</code> is not the last one in the list,     * the subsequent parts are shifted up. If <code>index</code>     * is larger than the number of parts present, the     * BodyPart is appended to the end.     *     * @param  part  The BodyPart to be inserted     * @param  index Location where to insert the part     * @exception       MessagingException     * @exception	IllegalWriteException if the underlying     *			implementation does not support modification     *			of existing values     */    public synchronized void addBodyPart(BodyPart part, int index) 				throws MessagingException {	parse();	super.addBodyPart(part, index);    }    /**     * Return true if the final boundary line for this     * multipart was seen.  When parsing multipart content,     * this class will (by default) terminate parsing with     * no error if the end of input is reached before seeing     * the final multipart boundary line.  In such a case,     * this method will return false.  (If the System property     * "mail.mime.multipart.ignoremissingendboundary" is set to     * false, parsing such a message will instead throw a     * MessagingException.)     *     * @return	true if the final boundary line was seen     * @since		JavaMail 1.4     */    public synchronized boolean isComplete() throws MessagingException {	parse();	return complete;    }    /**     * Get the preamble text, if any, that appears before the     * first body part of this multipart.  Some protocols,     * such as IMAP, will not allow access to the preamble text.     *     * @return		the preamble text, or null if no preamble     * @since		JavaMail 1.4     */    public synchronized String getPreamble() throws MessagingException {

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
一区二区三区免费| 日韩中文字幕不卡| 日韩毛片高清在线播放| 一区二区三国产精华液| 韩国成人精品a∨在线观看| 成人免费观看av| 精品久久国产老人久久综合| 国产精品久久久久久久久久免费看| 亚洲综合一区二区三区| 国产呦萝稀缺另类资源| 91久久线看在观草草青青| 精品日韩欧美一区二区| 一区二区在线观看视频| 亚洲高清中文字幕| 成人福利电影精品一区二区在线观看| 国产乱码精品一区二区三区忘忧草 | 激情五月激情综合网| 国产精品91一区二区| jizzjizzjizz欧美| 91麻豆精品国产91久久久久久久久 | 91浏览器打开| 欧美在线免费播放| 国产精品免费看片| 老司机午夜精品| 91网站最新地址| 51精品久久久久久久蜜臀| 国产精品视频一二| 亚洲综合无码一区二区| 色综合天天做天天爱| 国产欧美日韩在线| 久久狠狠亚洲综合| 色噜噜久久综合| 国产精品美女久久久久久久网站| 国产福利不卡视频| 91蜜桃网址入口| 久久综合精品国产一区二区三区| 免费xxxx性欧美18vr| 欧美色大人视频| 亚洲欧美综合另类在线卡通| 精品写真视频在线观看 | 久久久不卡网国产精品一区| 蜜臀va亚洲va欧美va天堂| 欧美日韩国产精选| 亚洲一区在线视频| 在线看国产一区二区| 亚洲综合色噜噜狠狠| 在线视频欧美区| 一区二区三区色| 精品视频1区2区| 亚洲精品视频在线观看网站| 91精品在线观看入口| 免费成人在线观看| 久久久激情视频| 欧美96一区二区免费视频| 欧美电视剧在线观看完整版| 亚洲电影你懂得| 国产香蕉久久精品综合网| 国产丶欧美丶日本不卡视频| 国产精品五月天| 99精品黄色片免费大全| 一卡二卡三卡日韩欧美| 成人app在线观看| 青草国产精品久久久久久| 久久久久久久久99精品| 91一区一区三区| 另类成人小视频在线| 亚洲人成人一区二区在线观看 | 欧美日本一区二区| 久久99国产精品免费网站| 亚洲国产激情av| 日韩视频一区二区在线观看| www.欧美.com| 蜜臀av亚洲一区中文字幕| 2022国产精品视频| 91久久精品国产91性色tv| 久久精品国产亚洲高清剧情介绍| 久久久91精品国产一区二区三区| 国产成人午夜精品影院观看视频 | 91网站在线播放| 色欧美88888久久久久久影院| 欧美在线免费视屏| 精品国产亚洲在线| 一区av在线播放| 男人的天堂久久精品| 不卡的电视剧免费网站有什么| 波多野洁衣一区| 欧美疯狂做受xxxx富婆| 久久久久久久久久久99999| 亚洲综合在线电影| 国产在线不卡视频| 91精品国产综合久久久久| 欧美国产精品v| 日韩二区在线观看| 色综合天天综合网国产成人综合天| 日韩美女在线视频| 亚洲国产一区二区三区青草影视| 美女网站色91| 这里只有精品视频在线观看| 亚洲夂夂婷婷色拍ww47| 97久久精品人人做人人爽50路| 久久日一线二线三线suv| 亚洲成人在线网站| 欧美亚洲综合一区| 亚洲欧美另类小说| k8久久久一区二区三区| 久久久久久亚洲综合| 国产一区二区美女| 久久久久久久电影| 久久91精品久久久久久秒播| 欧美高清视频在线高清观看mv色露露十八| 亚洲欧洲精品天堂一级| av成人免费在线观看| 日韩欧美你懂的| 99国产精品久久久久久久久久| 精品国产乱码久久久久久久久 | 亚洲人成伊人成综合网小说| 欧美日韩中字一区| 亚洲成av人**亚洲成av**| 欧美色视频在线观看| 亚洲成av人综合在线观看| 欧美在线一二三四区| 日韩精品电影在线观看| 精品福利av导航| 国产不卡视频在线播放| 亚洲免费高清视频在线| 色成人在线视频| 男女视频一区二区| 欧美激情艳妇裸体舞| 91成人免费在线| 奇米色一区二区三区四区| 亚洲欧洲在线观看av| 日韩一级在线观看| 欧美在线免费观看视频| 亚洲第一在线综合网站| 国产香蕉久久精品综合网| 欧美日韩国产在线观看| 大尺度一区二区| 美国av一区二区| 亚洲一区二区三区四区的| 久久久三级国产网站| 色天天综合久久久久综合片| 精品亚洲国产成人av制服丝袜| 亚洲一区二区免费视频| 国产精品天干天干在观线| 日韩三级免费观看| 国产91精品久久久久久久网曝门 | 在线播放91灌醉迷j高跟美女| 国产剧情av麻豆香蕉精品| 三级欧美韩日大片在线看| 亚洲日本一区二区三区| 亚洲免费在线播放| 国产成人在线视频网站| 欧美精品vⅰdeose4hd| 蜜乳av一区二区| 男女男精品视频| 日本不卡高清视频| 亚洲欧美视频一区| 国产精品色噜噜| 国产日本欧美一区二区| 久久久久国色av免费看影院| 日韩欧美一区在线观看| 日韩精品在线一区二区| 日韩一区国产二区欧美三区| 欧美一区二区三区视频| 精品少妇一区二区| 欧美激情综合在线| 亚洲精品免费在线观看| 午夜激情综合网| 国产成人久久精品77777最新版本| 视频在线观看一区| 国产成人一区在线| 色综合久久久久综合| 欧美日韩一区二区在线观看视频| 欧美一卡在线观看| 国产欧美日韩精品一区| 洋洋av久久久久久久一区| 毛片av一区二区三区| 99视频热这里只有精品免费| 欧美在线不卡视频| 91精品婷婷国产综合久久| 日韩一区二区三区视频在线| 精品欧美一区二区久久| 亚洲三级视频在线观看| 日韩av一级电影| 色偷偷久久人人79超碰人人澡| 色av一区二区| 日韩精品在线一区| 亚洲精品乱码久久久久久| 九色综合狠狠综合久久| 日本高清视频一区二区| 国产精品午夜电影| 国内精品不卡在线| 欧美日韩国产系列| 国产精品你懂的在线欣赏| 蜜桃传媒麻豆第一区在线观看| av成人老司机| 午夜伦欧美伦电影理论片| 国产一区不卡视频| 精品国产一区二区三区忘忧草 | 欧美精品久久99久久在免费线 |