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

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

?? bodypart.java

?? 手機郵箱撒的方式方式方式的
?? JAVA
?? 第 1 頁 / 共 2 頁
字號:
/*MujMail - Simple mail client for J2MECopyright (C) 2008 David Hauzar <david.hauzar.mujmail@gmail.com>Copyright (C) 2006 Nguyen Son Tung <n.sontung@gmail.com>Copyright (C) 2006 Martin Stefan <martin.stefan@centrum.cz>This program is free software; you can redistribute it and/or modifyit under the terms of the GNU General Public License as published bythe Free Software Foundation; either version 2 of the License, or(at your option) any later version.This program is distributed in the hope that it will be useful,but WITHOUT ANY WARRANTY; without even the implied warranty ofMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See theGNU General Public License for more details.You should have received a copy of the GNU General Public Licensealong with this program; if not, write to the Free SoftwareFoundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */package mujmail;import mujmail.util.Functions;import java.io.DataInputStream;import java.io.DataOutputStream;import javax.microedition.lcdui.StringItem;/** * Represents an email part - email body or email attachment. Contains * information about the body part such as it's name, encoding etc. * Does not store the content of the body part but contains object * of type {@link ContentStorage} that stores the content. *  * This object is stored persistently in RMS database. It's loading * and saving does object of instance {@link MessageHeader} that * contains this body part. *  */public class BodyPart {        public static final String SOURCE_FILE = "BodyPart";        //body state constants    public static final byte BS_COMPLETE = 0;    public static final byte BS_PARTIAL = 1;    public static final byte BS_EMPTY = 2;        //types of MIME body part, separated only to these types    //for more detailed information of the type use bodyPart.getBpExtension	    public static final byte TYPE_TEXT = 2;    public static final byte TYPE_HTML = 4;    public static final byte TYPE_MULTIMEDIA = 8; //image audio video    public static final byte TYPE_APPLICATION = 16;//pdf, postscrips...	    public static final byte TYPE_OTHER = 32;//model, xworld,... - will never be supported by mujmail        // bodypart transfer encodings    public static final byte ENC_NORMAL = 0; //7bit    public static final byte ENC_BASE64 = 1;    public static final byte ENC_QUOTEDPRINTABLE = 2;    public static final byte ENC_8BIT = 4;	//8bit 		    //bodypart text charset    public static final byte CH_NORMAL = 0; //ASCII and whatever    public static final byte CH_ISO88591 = 1;    public static final byte CH_ISO88592 = 2;    public static final byte CH_WIN1250 = 3;    public static final byte CH_UTF8 = 4;    public static final byte CH_USASCII = 5;        private boolean convertedContentMode = false;    public MessageHeader getMessageHeader() {        return messageHeader;    }    public void setOrder(    byte order) {        this.order = order;    }    public byte getOrder() {        return order;    }        /**     * Manages displaying body part in the sendmail form.     */    public class SendMailDisplayer {        public SendMailDisplayer() {};                /** The number of items of attachment info in sendmail form.         * Used when removing attachments from the form. */        public static final int numberOfItemsInForm = 2;                /** The string item in which is displayed the size of the file in Sendmail form */        private final StringItem siSize = new StringItem(Lang.get(Lang.SM_FILE_SIZE), "");                /**         * Displays this body part in the sendmail form.         * @param sendmail the form to which add information about this body part         */        public void addAttachmentToForm(SendMail sendmail) {            // the name of the attachment            StringItem siFileNameAttached = new                     StringItem(Lang.get(Lang.SM_ATTACHMENT), getHeader().getName() + "\n");            sendmail.append(siFileNameAttached);            // the size of the attachment            sendmail.append(siSize);            updateSize();        }                        /**         * Updates size of the body part in the SendMail form.         */        public void updateSize() {            System.out.println("Updating size");            siSize.setText(Functions.formatNumberByteorKByte(getSize()) + "\n");        }    }        /**     * Returns true if the body state is at least partial - this means complete     * or partial.     * @return true if the body state is at least partial - this means complete     * or partial     */    public boolean atLeastPartial() {        return (bodyState == BS_COMPLETE || bodyState == BS_PARTIAL) ? true : false;    }        /**     * Contains information about the storage of this body part.     */    private ContentStorage contentStorage;        /**     * Contains information about the storage of this body part.     */    private ContentStorage convertedContentStorage;            /** Contains information about body part header */    private Header bodyPartHeader;            private byte order = 0; //the order of the bodypart in a mail body    /** Manages displaying this bodypart in sendmail form */    private SendMailDisplayer sendMailDisplayer = new SendMailDisplayer();        /**     * The message header of message to which this body part belongs.     */    private MessageHeader messageHeader;        /**     * Gets the box in which this body part is.     * @return     */    public PersistentBox getBox() {return getMessageHeader().getBox();}        /**     * Gets the object which manages displaying this bodypart on the SendMail form.     * @return the object which manages displaying this bodypart on the SendMail      *  form.     */    public SendMailDisplayer getSendMailDisplayer() { return sendMailDisplayer; }        /**         * Indicates whether body part is partially downloaded or decoded.         * BS_COMPLETE         * BS_PARTIAL         * BS_EMPTY         */        private byte bodyState = BS_COMPLETE;                public byte getBodyState() { return bodyState; }        public void setBodyState(byte bodyState) { this.bodyState = bodyState; }    /**     * Creates new instance of body part belonging to header header with the     * order and body part header the same as body part copy and with the     * same storage type as body part copy.     * Note that it just creates the storage of the same type as BodyPart copy     * but does not copy it's content!!     * @param header     * @param copy     * @param copyMode copy mode of the content of the body part     */    public BodyPart(MessageHeader header, BodyPart copy, ContentStorage.CopyingModes copyMode) {        this.messageHeader = header;        contentStorage =             copy.getStorage().copy(this, copyMode);                bodyPartHeader = new Header(copy.bodyPartHeader);                        order = copy.order;    //don't copy bodyState. because InProtocol may be downloading the old incomplete bodyPart,     //and by marking this new bodyPart also incomplete bodyPart by default would confuse InProtocol    //and make it unable to replace the old one with the new one    }        /**     * Creates new body part which belongs to the message with header header.     * The storage type will be determined according to mujMail settings.     * @param header the header of the message to which this body part belongs     */    public BodyPart(MessageHeader header) {        // TODO: determine the storage type according to mujMail settings        this.messageHeader = header;        bodyPartHeader = new Header();        contentStorage = new RMSStorage(this);    }    //#ifdef MUJMAIL_FS    /**     * Creates new instance of body part with content stored in FSStorage.     * @param messageHeader     * @param fileURL     * @param fileName     * @param name     * @param size     */    public BodyPart(MessageHeader messageHeader, String fileURL, String fileName, String name, long size) {        this.messageHeader = messageHeader;        contentStorage = new FSStorage(this, size, fileURL);                bodyPartHeader = new Header();        bodyPartHeader.setName(name);    }    //#endif    //create this when sending a mail    public BodyPart(MessageHeader messageHeader, String name) {        this.messageHeader = messageHeader;                // TODO: create storage according to global settings of mujMail        contentStorage = new RMSStorage(this);        bodyPartHeader = new Header();        bodyPartHeader.setName(name);    }    //we can call this constructor after a complete parsing and storing a content    public BodyPart(MessageHeader messageHeader, String nm, byte encoding, byte type, byte charset) {        this.messageHeader = messageHeader;        // TODO: create storage according to global settings of mujMail        contentStorage = new RMSStorage(this);                bodyPartHeader = new Header(nm, type, charset, encoding);    }        public BodyPart(MessageHeader messageHeader, Header bodyPartHeader) {        this.messageHeader = messageHeader;        // TODO: create storage according to global settings of mujMail        contentStorage = ContentStorage.createStorageInstance(this, ContentStorage.StorageTypes.RMS_STORAGE.getStorageTypeNumber());        this.bodyPartHeader = bodyPartHeader;    }        /**     * Gets viewing mode of this bodypart determined from the content and header     * of the bodypart.     * @return the viewing mode of this bodypart determined from it's content and header     */    public MailForm.BPViewingModes.ViewingModesWithActions getAutoViewingMode() {        if ( getHeader().getBodyPartContentType() == BodyPart.TYPE_HTML ) {         	return MailForm.BPViewingModes.HTML;        } else if ( getHeader().getBodyPartContentType() == BodyPart.TYPE_TEXT) {            return MailForm.BPViewingModes.PLAIN_TEXT;        }        if (getHeader().getBodyPartContentType() == BodyPart.TYPE_MULTIMEDIA &&                (getHeader().getName().toLowerCase().endsWith("jpg") ||                 getHeader().getName().toLowerCase().endsWith("jpeg") ||                 getHeader().getName().toLowerCase().endsWith("gif") || 

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
99麻豆久久久国产精品免费优播| 欧美丰满一区二区免费视频| 久久综合国产精品| 国产日韩精品一区| 亚洲国产欧美在线| 成人午夜又粗又硬又大| 欧美一卡二卡三卡| 亚洲一区二区三区国产| 成人亚洲一区二区一| 日韩欧美国产小视频| 亚洲一卡二卡三卡四卡无卡久久| 国产黄人亚洲片| 日韩一区国产二区欧美三区| 亚洲女厕所小便bbb| 国产原创一区二区| 精品入口麻豆88视频| 天天爽夜夜爽夜夜爽精品视频| 97超碰欧美中文字幕| 中文字幕免费在线观看视频一区| 久久精品国产**网站演员| 欧美日韩夫妻久久| 午夜精品久久久久久久99水蜜桃| 91丝袜美女网| 亚洲免费观看在线观看| av成人免费在线观看| 国产精品女主播在线观看| 国产精品影视在线| 26uuu精品一区二区在线观看| 久久 天天综合| 久久免费国产精品| 黑人巨大精品欧美一区| 精品三级av在线| 国产乱一区二区| 国产欧美日本一区视频| 成人国产精品免费| 亚洲欧美日韩精品久久久久| 91香蕉视频黄| 亚洲风情在线资源站| 欧美日韩成人综合| 日本视频中文字幕一区二区三区| 欧美日本在线播放| 精品午夜久久福利影院| 久久久电影一区二区三区| 国产精品综合网| 国产精品久久久久久久久免费樱桃| www.亚洲国产| 亚洲综合色婷婷| 91精品国产综合久久小美女| 国内精品久久久久影院薰衣草| 精品国产欧美一区二区| 99热精品国产| 午夜影视日本亚洲欧洲精品| 日韩免费观看高清完整版| 国产精品一卡二| 一区二区三区色| 欧美一区二区三区四区视频| 国产乱子轮精品视频| 国产精品久久久久久久午夜片| 91福利视频久久久久| 日韩高清在线观看| 国产欧美精品一区二区色综合朱莉| 91免费版在线看| 日本一道高清亚洲日美韩| 欧美经典一区二区| 欧美日韩免费观看一区二区三区 | 欧美精品电影在线播放| 极品少妇xxxx精品少妇| 亚洲三级免费观看| 日韩免费视频线观看| 91社区在线播放| 麻豆国产精品777777在线| 亚洲三级免费观看| 国产午夜精品一区二区三区嫩草 | 亚洲柠檬福利资源导航| 日韩一区和二区| 91丨porny丨蝌蚪视频| 伦理电影国产精品| 亚洲夂夂婷婷色拍ww47| 久久蜜桃香蕉精品一区二区三区| 欧美性大战久久久久久久| 国产福利91精品一区| 亚洲一区二区三区四区在线免费观看| 日韩欧美视频一区| 精品视频在线看| 成人av网站免费观看| 久久精品国产**网站演员| 一区二区三区四区av| 国产精品久久毛片| 久久久久久久久久久久电影| 在线电影欧美成精品| 91香蕉国产在线观看软件| 国产成人啪午夜精品网站男同| 亚洲成年人影院| 亚洲精品久久7777| 国产精品亲子乱子伦xxxx裸| 欧美成人精精品一区二区频| 欧美在线三级电影| 一本色道综合亚洲| 成人久久视频在线观看| 国产在线视频精品一区| 久久不见久久见免费视频7| 亚洲二区在线观看| 一区二区成人在线视频| 亚洲同性同志一二三专区| 国产欧美精品一区二区色综合朱莉| 日韩精品中文字幕在线不卡尤物| 欧美高清www午色夜在线视频| 99re6这里只有精品视频在线观看| 国产成人av一区| 国产成人av影院| 国产成人精品影院| 国产露脸91国语对白| 国产精品自拍在线| 国产精品资源网站| 国产a级毛片一区| 成人性视频免费网站| 欧美色网站导航| 欧美久久婷婷综合色| 91精品午夜视频| 日韩亚洲欧美一区| 久久亚洲二区三区| 国产欧美一区二区精品仙草咪| 久久精品亚洲麻豆av一区二区| 久久欧美中文字幕| 国产精品久久久久久久蜜臀| 亚洲日本电影在线| 香蕉成人啪国产精品视频综合网| 日本大胆欧美人术艺术动态| 久久99久久久欧美国产| 国产成人一级电影| 色婷婷国产精品| 欧美乱妇一区二区三区不卡视频| 日韩一区二区在线观看视频| 精品福利一区二区三区免费视频| 久久久久久日产精品| 国产精品久久久久三级| 亚洲永久免费视频| 久久99精品一区二区三区| 国产精品综合视频| 欧美在线不卡一区| 精品99999| 亚洲美女视频在线观看| 日韩不卡一区二区三区| 成人午夜在线免费| 欧美精品1区2区| 日本一区二区三区国色天香| 亚洲黄色免费网站| 精久久久久久久久久久| 一本一道波多野结衣一区二区| 欧美一区二区观看视频| 国产精品盗摄一区二区三区| 午夜精品久久一牛影视| 粗大黑人巨茎大战欧美成人| 欧美日韩国产综合视频在线观看| 久久先锋影音av鲁色资源网| 亚洲少妇最新在线视频| 黄页网站大全一区二区| 欧美色倩网站大全免费| 欧美高清在线一区| 日日摸夜夜添夜夜添精品视频 | 日韩中文字幕区一区有砖一区| 久久精品99国产精品| 91行情网站电视在线观看高清版| 精品电影一区二区| 亚洲国产视频在线| 成人av资源在线观看| 日韩一区二区在线看| 亚洲一区二区三区四区中文字幕| 国产一区美女在线| 91精品一区二区三区在线观看| 国产精品家庭影院| 国产精品一区二区男女羞羞无遮挡| 欧美三级电影一区| 自拍av一区二区三区| 国产成人综合在线观看| 日韩一区二区三区四区五区六区| 亚洲天堂网中文字| 粉嫩蜜臀av国产精品网站| www国产精品av| 热久久久久久久| 欧美日本不卡视频| 亚洲综合在线免费观看| 99久久99久久精品国产片果冻 | av成人免费在线观看| 久久综合99re88久久爱| 男人的j进女人的j一区| 欧美日韩免费高清一区色橹橹| 亚洲欧美日韩系列| 99久久婷婷国产| 国产精品盗摄一区二区三区| 不卡av在线网| 国产精品久久久久久久久免费丝袜 | youjizz国产精品| 国产欧美日韩精品在线| 国产麻豆午夜三级精品| 国产视频一区在线播放| 国产一区二区精品久久99| 国产亚洲一区二区三区| 国产盗摄视频一区二区三区| 久久久精品人体av艺术|