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

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

?? messageheader.java

?? 手機郵箱撒的方式方式方式的
?? JAVA
?? 第 1 頁 / 共 3 頁
字號:
     * recipient
     * @param defaultRecipient the recipient to be added if no recipient is yet
     *  specified.
     */
    public void ensureRecipient(String defaultRecipient) {
        if (recipients.startsWith("+")) {
            // TODO (Betlista): what is the difference between this call and 
            // addRecipient(defaultRecipient)
            // I know, the result is different, there is missing " *" at the end
            // but is that important ?
            recipients = defaultRecipient;
        }
    }
    
    /**
     * Marks this message as read.
     */
    public void markAsReplied() {
        sendStatus = REPLIED;
    }
    
    /**
     * Marks this message as read.
     */
    public void markAsDeleted() {
        deleted = true;
    }
    
    /**
     * Was this message deleted?
     * @return true if this message was deleted.
     */
    public boolean wasDeleted() {
        return deleted;
    }
    
    /**
     * Marks this message as read.
     */
    public void markAsFlagged() {
        flagged = true;
    }

    
    /**
     * Saves the header of the message and of all bodyparts to the RMS database.
     * Does not save the content of the message.
     * If the status of the message is header.DBStatus == MessageHeader.STORED
     * saves the header to existing record in the database (just updates it)
     * @return the record ID under which the header is saved
     * @throws mujmail.MyException
     */
    public int  saveHeader() throws MyException {
        return box.getMailDB().saveHeader(this);
    }

    /**
     * Gets the message id without special characters.
     * @return message id without special characters
     */
    public String getMessageIDWithoutSpecCharacters() {
        String tempID = messageID.replace('/', '1');
        tempID = tempID.replace('\\', '2');
        tempID = tempID.replace('.', '3');
        tempID = tempID.replace(MessageHeader.MSG_ID_SEPARATOR, '4');
        
        return tempID;
    }

    /** ...and then start adding body parts headers to it
     *
     * The method adds a <code>BodyPart</code> to the message header to cache info about each mail part, but this method doesn't store it in the <code>RecordStore</code>.
     * Its called only when the real content is stored and so we have a proper functioning recordID
     * Note: Storing the real content is done in the <code>saveBodyPart</code> method in <code>MailDb</code> class.
     * @see #MailDB
     */
    public void addBodyPart(BodyPart bpHeader) {
        bodyParts.addElement(bpHeader);
    }

    /* Add attachment file info to Vector (in <code>MessageHeader</code>) 
     *
     * The method adds an <code>AttachmentPart</code> to the message header to store the attachment file info.
     * Only the file url, name, and size are stored.
     * @param apHeader <code>AttachmentPart</code> with attachment file info
     */
//    public void addAttachFilePart(AttachmentPart apHeader) {
//        attachFileParts.addElement(apHeader);
//    }

    public BodyPart getBodyPart(int index) {
        return (BodyPart) bodyParts.elementAt(index);
    }
    
    /**
     * Removes all body parts.
     */
    public void deleteAllBodyParts() {
        bodyParts.removeAllElements();
    }
    
    /**
     * Replaces the body of this message
     * @param bodyPart
     */
    public void replaceBody(BodyPart newBody) {
        bodyParts.setElementAt(newBody, 0);
    }
    
    /**
     * Replaces the attachment at given index with new attachment.
     * @param newAttachment the attachment which replaces the old attachment
     * @param i the index of attachment to be replaced
     */
    public void replaceAttachment(BodyPart newAttachment, int i) {
        bodyParts.setElementAt(newAttachment, i+1);
    }
    
    /**
     * Replaces the body part at given index with new body part.
     * @param newBodyPart the body part which replaces the old body part
     * @param i the index of the body part to be replaced
     */
    public void replaceBodyPart(BodyPart newBodyPart, int i) {
        bodyParts.setElementAt(newBodyPart, i);
    }
    
    //#ifdef MUJMAIL_SEARCH
    /**
     * Sets the result of searching to this message.
     * @param searchResult the result of searching.
     */
    public void setSearchResult(MessageSearchResult searchResult) {
        this.searchResult = searchResult;
    }
    //#endif
    
    //#ifdef MUJMAIL_SEARCH
    /**
     * Gets the result of searching in this message.
     * @return the result of searching in this message.
     *  if this message have not been searched yet, alwayes returns
     * {@link mujmail.search.MessageSearchResult.NO_MATCH}.
     */
    public MessageSearchResult getSearchResult() {
        return searchResult;
    }
    //#endif
    
    /**
     * Insert the bodypart to the list of body parts. Each body part with an index
     * greater or equal is shifted upward to have an index one greater than the 
     * value it had previously.
     * @param bodyPart
     * @param i
     */
    public void insertBodyPartAt(BodyPart bodyPart, int i) {
        bodyParts.insertElementAt(bodyPart, i);
    }
    
    /**
     * Deletes this message from database and the box to which the message belongs.
     * @param reportBox the box to which should be reported warning messages.
     * @param  trashMode describes the storing of deleted mail to trash
     */
    public void deleteFromDBAndBox(TheBox reportBox, Trash.TrashModes trashMode) {
        deleted = true;
        MujMail.mujmail.getTrash().storeToTrash(this, trashMode);
        if ( getMailDB() != null) {
            // Delete from DB, here comes only persistent folders
            getMailDB().deleteMail(this, (PersistentBox)reportBox);
        }
        MujMail.mujmail.getMailDBManager().removeMessage(this); // Remove from Boxes
    }
    
    /**
     * Ads the body to this email. Note that the body should not be already
     * inserted.
     * @param body the body part representing the body of the mail
     */
    public void addBody(BodyPart body) {
        if (bodyParts.size() == 0) bodyParts.addElement(body);
        else insertBodyPartAt(body, 0);
    }

    /*
     * Get the attachment file info (path, name, and size) from <code>MessageHeader</code>
     * @param index	Element in <code>AttachmentPart</code> Vector (in <code>MessageHeader</code>
     * @return	<code>AttachmentPart</code> with attachment file path, name, and size
     */
//    public AttachmentPart getAttachmentPart(byte index) {
//        if (!attachFileParts.isEmpty()) {
//			return (AttachmentPart)attachFileParts.elementAt(index);
//		} else {
//			return (AttachmentPart)null;
//		}
//    }

    public String getBodyPartContent(byte index) {
        try {
            BodyPart bp = (BodyPart) bodyParts.elementAt(index);
            return bp.getStorage().getContent();
        } catch (Throwable ex) {
            ex.printStackTrace();
            System.out.println("exception in get body part content");
            return "This bodypart was not yet downloaded or deleted. To see it, redownload it.";
        }
    }

    /**
     * Gets converted bodypart content.
     * @param index		ID of bodypart of the email
     * @return			content as String
     */
    public String getConvertedBodyPartContent(byte index) {
        BodyPart bp = (BodyPart) bodyParts.elementAt(index);
        try {
            bp.switchToConvertedContent();
            
            if (DEBUG) System.out.println("DEBUG MessageHeader.getConvertedBodyPartContent Bodypart chosen="+(index+1));
			
            String extension = bp.getHeader().getExtension(); 
            if (!("pdf".equals(extension) || "jpg".equals(extension))) {
            	MujMail.mujmail.alert.setAlert(Lang.get(Lang.ALRT_MF_UNSUPPORTED_CONVERSION), AlertType.ERROR);
            	return "";
            }

            if (bp.getStorage() == null) {
            	/*** Download converted bodypart ***/
            	//TODO: Check if this message comes from mujMail server account
            	if (DEBUG) System.out.println("DEBUG MessageHeader.getConvertedBodyPartContent - Retrieving converted body");
            	if (!(getBox() instanceof InBox)) throw new MyException(0, "Only inbox can retrive converted bodies");
                ((MailAccount)MujMail.mujmail.getMailAccounts().get(this.accountID)).getProtocol().
            		getConvertedBody(this, index, (InBox)getBox());
            	if (DEBUG) System.out.println("DEBUG MessageHeader.getConvertedBodyPartContent - Converted body retrieved");
            	/*** Save the bodypart ***/
            }

			while (bp.getStorage() == null) {
				bp = (BodyPart)bodyParts.elementAt(index);
				synchronized (bp) {
					if (DEBUG) {
						System.out.println("DEBUG MessageHeader.getConvertedBodyPartContent - Waiting while converted body retrieved");
					}
					bp.wait();
				}
				if (DEBUG) {
	            	System.out.println("DEBUG MessageHeader.getConvertedBodyPartContent - Still waiting ...");					
				}
            }
            
			if (DEBUG) System.out.println("DEBUG MessageHeader.getConvertedBodyPartContent - Finished waiting, storage instance = " + bp.getStorage());
			bp.switchToConvertedContent();
           	return bp.getStorage().getContent();
        } catch (Throwable ex) {
        	ex.printStackTrace();
            System.out.println("exception in get body part content");
            return "";
        } finally {
            bp.switchToNotConvertedContent();
        }
    }    
    
    public byte[] getBodyPartContentRaw(byte index) {
        try {
            return ((BodyPart) bodyParts.elementAt(index)).getStorage().getContentRaw();
        } catch (Exception ex) {
            return new byte[0];
        }
    }

    public byte getBodyPartCount() {
        return (byte) bodyParts.size(); //byte because we never have more bodyparts than 127
    }
    
    /**
     * Removes body part at specified index.
     * @param i
     */
    public void removeBodyPart(int i) { // TODO (Betlista): this (int) is inconsistent with getBodyPartContent(byte index)
        bodyParts.removeElementAt(i);
    }
    
    /**
     * Gets the body of the mail with this header.
     * @return the body of the mail with this header
     */
    public BodyPart getBody() {
        return (BodyPart) bodyParts.elementAt(0);
    }
    
    /**
     * Gets the number of attachments.
     * @return the number of attachments
     */
    public int getAttachementCount() {
        return bodyParts.size()-1;
    }
    
    //#ifdef MUJMAIL_FS
    /**
     * Removes all filesystem attachments (not others!).
     */
    public void removeFSAttachments() {
        Vector toRemove = new Vector();
        for (int i = 0; i < getAttachementCount(); i++) {
            BodyPart bp = getAttachement(i);
            if (bp.getStorage().getStorageType() == ContentStorage.StorageTypes.FS_STORAGE) {
                toRemove.addElement(bp);
            }
        }
        
        for (int i = 0; i < toRemove.size(); i++) {
            bodyParts.removeElement(toRemove.elementAt(i));
        }
    }
    //#endif
    
    /**
     * Removes the attachment with index i (the attachment got by calling
     * getAttachement(i)).
     * @param i
     */
    private void removeAttachment(int i) {
        bodyParts.removeElementAt(i);
    }
    
    /**
     * Gets recipients of the message (field "To").
     * @return the recipients of the message.
     */
    public String getRecipients() {
        return recipients;
    }
    
    /**
     * Gets the sender of the message (field "From").
     * @return the sender of the message.
     */
    public String getSender() {
        return from;
    }
    
    /**
     * Gets the subject of the message.
     * @return the subject of the message
     */
    public String getSubject() {
        return subject;
    }
    
    /**
     * Gets the i-th attachment
     * @param i the number of attachment to get
     * @return the i-th attachment
     */
    public BodyPart getAttachement(int i) {
        return (BodyPart) bodyParts.elementAt(i+1);
    }
    
    /**
     * Returns true if this message is plain.
     * @return true if this message is plain.
     */
    public boolean isPlain() {
        return messageFormat == FRT_PLAIN;
    }

    public byte getBpEncoding(byte i) {
        return ((BodyPart) bodyParts.elementAt(i)).getHeader().getEncoding();
    }

    public byte getBpType(byte i) {
        return ((BodyPart) bodyParts.elementAt(i)).getHeader().getBodyPartContentType();
    }

    public String getBpName(byte i) {
        return ((BodyPart) bodyParts.elementAt(i)).getHeader().getName();
    }

    public String getBpExtension(byte i) {
        String name = ((BodyPart) bodyParts.elementAt(i)).getHeader().getName();
        byte j = (byte) name.lastIndexOf('.');
        return (j == -1) ? name : name.substring(j + 1);
    }

    public byte getBpCharSet(byte i) {
        return ((BodyPart) bodyParts.elementAt(i)).getHeader().getCharSet();
    }

    public long getBpSize(byte i) {
        return ((BodyPart) bodyParts.elementAt(i)).getStorage().getSize();
    }

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
eeuss影院一区二区三区| 久久精品人人做人人爽97| 日韩欧美一区二区视频| 国产精品乱码久久久久久| 婷婷久久综合九色综合绿巨人| 国产精品影视天天线| 欧美精品三级日韩久久| 亚洲国产精品99久久久久久久久| 日韩精品一区第一页| 91免费观看在线| 中文字幕av一区二区三区高| 日本成人中文字幕在线视频| 日本久久一区二区三区| 国产精品久久久久久久久免费桃花 | 国产mv日韩mv欧美| 日韩欧美的一区| 天天色图综合网| 欧美午夜电影网| 一区二区三区精密机械公司| www.激情成人| 亚洲国产精品黑人久久久| 狠狠色综合日日| 欧美一级二级在线观看| 日韩电影在线观看一区| 4438x亚洲最大成人网| 亚洲一区视频在线观看视频| 色狠狠色噜噜噜综合网| 尤物在线观看一区| 在线日韩国产精品| 亚洲成av人在线观看| 欧美日韩一级片网站| 丝袜美腿亚洲色图| 日韩一区二区高清| 激情六月婷婷久久| 久久精品人人爽人人爽| 国产成人三级在线观看| 国产欧美一区二区精品婷婷| 成人国产亚洲欧美成人综合网| 欧美国产日韩一二三区| 不卡一区二区在线| 依依成人精品视频| 欧美日韩成人综合天天影院 | 欧美激情综合在线| 成人av免费在线播放| 亚洲激情六月丁香| 911精品国产一区二区在线| 另类中文字幕网| 国产人成亚洲第一网站在线播放 | 久久99精品国产.久久久久| 精品少妇一区二区三区免费观看 | 中国色在线观看另类| 99这里都是精品| 亚洲午夜成aⅴ人片| 日韩视频免费观看高清完整版| 国产久卡久卡久卡久卡视频精品| 国产精品欧美久久久久无广告 | 91麻豆精品91久久久久同性| 日韩av电影免费观看高清完整版| 日韩欧美久久久| 成人网页在线观看| 亚洲一二三区在线观看| xf在线a精品一区二区视频网站| 成人免费看的视频| 天堂蜜桃一区二区三区 | 欧美一区2区视频在线观看| 国产传媒日韩欧美成人| 亚洲欧美一区二区三区久本道91 | 中文文精品字幕一区二区| 91麻豆6部合集magnet| 美美哒免费高清在线观看视频一区二区| 精品理论电影在线观看 | 粉嫩av一区二区三区| 亚洲国产高清不卡| www.综合网.com| 国产成人午夜精品影院观看视频 | 91在线观看成人| 手机精品视频在线观看| 久久久不卡影院| 欧美色网站导航| 丁香六月综合激情| 久久精品久久精品| 一区二区三区av电影| 亚洲精品一区二区三区99| 欧亚洲嫩模精品一区三区| 久久99九九99精品| 亚洲狠狠爱一区二区三区| 国产欧美一区二区精品久导航| 欧美精品色一区二区三区| 91在线观看成人| 国产成人午夜视频| 激情偷乱视频一区二区三区| 亚洲综合另类小说| 一区在线观看视频| 国产欧美va欧美不卡在线| 日韩精品一区二区三区swag| 欧美三级电影精品| 成人综合在线网站| 国产精品一区专区| 青娱乐精品视频| 日韩精品欧美精品| 亚洲一区二区黄色| 夜夜嗨av一区二区三区网页| 最新国产精品久久精品| 国产亚洲一区二区三区在线观看| 日韩免费视频一区| 欧美一级爆毛片| 在线播放欧美女士性生活| 在线免费观看日韩欧美| 91极品视觉盛宴| 91福利视频网站| 91精彩视频在线| 欧美视频一区在线| 欧美三区免费完整视频在线观看| 欧美中文字幕久久| 欧美日韩国产在线观看| 欧美性感一类影片在线播放| 日本高清不卡一区| 在线免费观看成人短视频| 欧美性受极品xxxx喷水| 欧美在线观看视频在线| 欧美另类z0zxhd电影| 91精品国产综合久久久久久| 日韩欧美视频一区| 日韩欧美成人激情| 欧美精品一区男女天堂| 久久久久久久精| 国产精品亲子乱子伦xxxx裸| 中文字幕日本不卡| 亚洲综合丁香婷婷六月香| 亚洲成人av一区二区| 人禽交欧美网站| 久久99九九99精品| www.欧美.com| 欧美日韩不卡一区二区| 日韩精品一区二区三区四区视频| 国产亚洲欧美色| 亚洲摸摸操操av| 免费成人在线影院| 国产成人av电影免费在线观看| 91一区在线观看| 欧美一区二区三区视频在线 | 69堂精品视频| 久久这里只精品最新地址| 国产精品久久久久影院| 亚洲成人1区2区| 国产一区二区三区黄视频| 97久久精品人人爽人人爽蜜臀| 欧美中文一区二区三区| 久久亚洲综合色| 夜夜揉揉日日人人青青一国产精品| 美女在线观看视频一区二区| 不卡视频一二三| 91精品国产高清一区二区三区蜜臀 | 中文字幕在线播放不卡一区| 亚洲国产精品久久不卡毛片| 国产一区二区三区免费| 欧美在线观看18| 国产日产亚洲精品系列| 亚洲一区二区三区视频在线播放| 国产伦精一区二区三区| 欧美日韩在线观看一区二区| 26uuu久久天堂性欧美| 亚洲最大色网站| 国产乱码精品一品二品| 欧美色电影在线| 中国av一区二区三区| 久久不见久久见免费视频1| 91丝袜高跟美女视频| 国产亚洲一本大道中文在线| 丝袜美腿高跟呻吟高潮一区| 91丨porny丨蝌蚪视频| 亚洲精品一区二区精华| 日韩精品电影在线| 色琪琪一区二区三区亚洲区| 国产香蕉久久精品综合网| 日韩电影在线一区| 精品1区2区3区| 一区二区三区四区在线免费观看 | 欧美性一区二区| 成人欧美一区二区三区在线播放| 久久av中文字幕片| 欧美人xxxx| 亚洲国产成人va在线观看天堂| 成人久久久精品乱码一区二区三区| 精品美女一区二区| 轻轻草成人在线| 日韩欧美自拍偷拍| 日韩成人一区二区| 欧美日韩国产综合草草| 免费成人av资源网| 欧美理论片在线| 婷婷综合久久一区二区三区| 欧美无乱码久久久免费午夜一区| 亚洲女子a中天字幕| 色综合久久综合网欧美综合网| 国产精品国模大尺度视频| 成人午夜伦理影院| 欧美国产视频在线| 91一区二区三区在线观看| 亚洲品质自拍视频网站|