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

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

?? maildb.java

?? 手機郵箱撒的方式方式方式的
?? JAVA
?? 第 1 頁 / 共 3 頁
字號:
        if (DEBUG) {            System.out.println("body part content loaded");        }        return body;    }    /**     * By this method we get the real content a body part. Can be used by a class that displays mails     * @param dbFileName     * @param recordID     * @return     * @throws MyException     *      * @see RMSStorage     */    static String loadFragmentOfBodypartContent(String dbFileName, int recordID) throws MyException {        String body = null;        if (DEBUG) {            System.out.println("DEBUG MailDB.loadBodypartContent(String, int) - Loading body part content from database " + dbFileName);        }        RecordStore bodyRS = Functions.openRecordStore(dbFileName, true);        if (DEBUG) {            System.out.println("DEBUG MailDB.loadBodypartContent(String, int) - Database opened");        }        // getRecord returns null if the bodypart is empty        try {            byte[] data = new byte[bodyRS.getRecordSize(recordID)];            bodyRS.getRecord(recordID, data, 0);            DataInputStream inputStream = new DataInputStream(new ByteArrayInputStream(data));            //body = new String(data, 0, data.length); // TODO: this does not read unicode (i.e. czech diacritics) correctly!!            body = inputStream.readUTF(); //TODO: here is an EOF while reading HTML attachment            if (DEBUG) {                System.out.println("DEBUG MailDB.loadBodypartContent(String, int) - loadBodypartContent body='" + body + "'");            }            inputStream.close();            data = null;        } catch (NullPointerException npex) {            System.out.println("DEBUG MailDB.loadBodypartContent(String, int) - null pointer exception");            body = "";        } catch (Exception ex) {            System.out.println("DEBUG MailDB.loadBodypartContent(String, int) - exception ");            ex.printStackTrace();            throw new MyException(MyException.DB_CANNOT_LOAD_BODY);        } finally {            Functions.closeRecordStore(bodyRS);        }        if (DEBUG) {            System.out.println("DEBUG MailDB.loadBodypartContent(String, int) - body part content loaded");        }        return body;    }    private static final String NULL_STRING = "\\";    /**     * This method serves as translator for string values.     * If value of string is null, it is replaced with "\\" (one backslash).     * If value is not null and first character is backslash this backslash     * is doubled otherwise original string is returned.     *      * @param str string to be translated      * @return escaped string     */    public static String saveNullable( final String str ) {        if ( str == null ) {            return NULL_STRING;        }        final int length = str.length();        if ( length == 0 ) {            return "";        } else {              // if first char is backslash             if ( str.charAt( 0 ) == '\\' ) {                  // add one backslash at the beginning                 return "\\" + str;            } else {                  // return original String                return str;            }        }    }    /**     * Oposite for {@link #saveNullable(String)} method.     *      */    public static String loadNullable( final String str ) {        if ( NULL_STRING.equals( str ) ) {            return null;        }        final int length = str.length();        if ( length == 0 ) {            return "";        } else {            final char c1 = str.charAt( 0 );            if ( c1 == '\\' ) {                return str.substring( 1 );            } else {                return str;            }        }    }    /**     * Handles the situation when message header cannot be saved.     *     * @throws MyException if the header was not saved and cannot be saved now     * @throws Exception if there was exception while saving the header     */    private RecordStore handleProblemWithSavingHeader(final MessageHeader header, RecordStore headerRS) throws Exception {        if (Settings.deleteMailsWhenHeaderDBIsFull) {            // delete some and than try to save the header again            headerRS.closeRecordStore();            header.getBox().deleteOldestMails(NUM_HEADERS_TO_DELETE_IF_DB_FULL);//            headerRS = Functions.openRecordStore(dbName + "_H", true);//            saveHeader(headerRS, header);//                       throw new MyException(MyException.DB_CANNOT_SAVE_HEADER);        } else {            // ask user whether delete some mails.            DeleteOldMails deleteOldMailsAndSaveHeader = new DeleteOldMails(headerRS, header);            OKCancelDialog dialog = new OKCancelDialog("Not enough space in database", "There is not enough space to store header of this mail. Do you want to delete " + NUM_HEADERS_TO_DELETE_IF_DB_FULL + " oldest mails?", deleteOldMailsAndSaveHeader);            dialog.showScreen(StartupModes.IN_NEW_THREAD);            throw new MyException(MyException.DB_CANNOT_SAVE_HEADER);        }        //return headerRS;    }    private class DeleteOldMails implements Callback {//        private final RecordStore headerRS;        private final MessageHeader messageHeader;        public DeleteOldMails(RecordStore headerRS, MessageHeader messageHeader) {//            this.headerRS = headerRS;            this.messageHeader = messageHeader;        }        public void callback(Object called, Object message) {            messageHeader.getBox().deleteOldestMails(NUM_HEADERS_TO_DELETE_IF_DB_FULL);//            try {//                saveHeader(headerRS, messageHeader);//            } catch (Exception ex2) {//                throw new RuntimeException();//            }        }            }      /**     * Saves the header of the message and header 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)     * @param header the header of the message which will be saved     * @return the record ID under which the header is saved     * @throws mujmail.MyException     */    public int saveHeader(final MessageHeader header) throws MyException {        if (DEBUG) {            System.out.println("DEBUG MailDB.saveHeader(MessageHeader) - saving header: " + header);        }        RecordStore headerRS = Functions.openRecordStore(dbName + "_H", true);        if (DEBUG) {            System.out.println("DEBUG MailDB.saveHeader(MessageHeader) - to database: " + this.dbName);        }                try {            if (headerRS.getSizeAvailable() <= FREE_SPACE_IN_HEADER_DB_WHEN_DELETE_HEADERS) {            //if ( header.getBox().storage.getSize() >= 3 ) {                headerRS = handleProblemWithSavingHeader(header, headerRS);            } else {                saveHeader(headerRS, header);            }        } catch (MyException myex) {            // cannot recover from this            myex.printStackTrace();            throw myex;        } catch (Exception ex) {            // try to recover            ex.printStackTrace();            try {                headerRS = handleProblemWithSavingHeader(header, headerRS);            } catch (Exception ex1) {                ex1.printStackTrace();            }        } finally {            try {              if (DEBUG) System.out.println( "DEBUG MailDB.saveHeader(MessageHeader) - Record store size = " + headerRS.getRecordSize(header.getRecordID()) );            } catch (RecordStoreNotOpenException ex) {                ex.printStackTrace();            } catch (InvalidRecordIDException ex) {                ex.printStackTrace();            } catch (RecordStoreException ex) {                ex.printStackTrace();            }            Functions.closeRecordStore(headerRS);        }        if (DEBUG) {            System.out.println("DEBUG MailDB.saveHeader(MessageHeader) - header saved");        }        return header.getRecordID();    }     //its static called by a class that displays mails, therefor its static    //to let user markAsDeleted a attachment from a mail    public static void deleteStorageContent(String dbFileName, int recordID) throws MyException {        if (DEBUG) {            System.out.println("Deleting body part");        }        RecordStore bodyRecordStore = Functions.openRecordStore(dbFileName, true);        try {            bodyRecordStore.deleteRecord(recordID);        } catch (Exception ex) {            throw new MyException(MyException.DB_CANNOT_DEL_BODY);        } finally {            Functions.closeRecordStore(bodyRecordStore);        }        if (DEBUG) {            System.out.println("Body part deleted");        }    }    public static int bodyRecordSize(String dbFileName, int recordID) {        RecordStore store = null;        int size = -1;        try {            store = RecordStore.openRecordStore(dbFileName, true);            size = store.getRecordSize(recordID);        } catch (Exception ex) {        }        Functions.closeRecordStore(store);        return size;    }        /**     * Get space in bytes that database take place in persistent storage.     * @return Size of database.     */    public int getOccupiedSpace() {        RecordStore db = null;        int size = 0;        try {            // Headers            db = RecordStore.openRecordStore(dbName + "_H", true);            size += db.getSize();            db.closeRecordStore();            // Bodies            db = RecordStore.openRecordStore(dbName, true);            size += db.getSize();            db.closeRecordStore();        } catch (Exception ex) {} // Non existent database         return size;    }    /**     * This method loads a Vector of headers from the <code>RecordStore</code> with name nameRs.     */    private void loadHeaders(MailDBTask progress) throws MyException {        if (DEBUG) {            System.out.println("DEBUG MailDB.loadHeaders() - start - " + dbName);        }        RecordStore headerRS = Functions.openRecordStore(dbName + "_H", true);        if (DEBUG) {            System.out.println("DEBUG MailDB.loadHeaders() - Record box opened");        }        try {            if (DEBUG) {                System.out.println("DEBUG MailDB.loadHeaders() - number of records: " + headerRS.getNumRecords());            }            if (headerRS.getNumRecords() > 0) {                RecordEnumeration enumeration = headerRS.enumerateRecords(null, null, false);                byte[] data = new byte[250];                DataInputStream inputStream = new DataInputStream(new ByteArrayInputStream(data));                int recordsNumber = enumeration.numRecords();                byte bodyPartsCount;                int id, sizeOfRecord;                progress.setTitle(Lang.get(Lang.ALRT_LOADING) + progress.actionInvoker.getName());                progress.updateProgress(recordsNumber, 0);                //hdrRefer.ensureCapacity(numRcds);

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
538prom精品视频线放| 亚洲成人1区2区| 在线观看精品一区| av一区二区久久| 久久狠狠亚洲综合| 亚洲精品国产精品乱码不99| 久久人人爽爽爽人久久久| 色欲综合视频天天天| 国产高清久久久久| 久久机这里只有精品| 午夜久久电影网| 亚洲综合在线五月| 最新热久久免费视频| 欧美xxxx在线观看| 日韩欧美在线一区二区三区| 欧美日韩国产一区二区三区地区| 国产成人精品影视| 日韩电影在线观看一区| 一卡二卡欧美日韩| 玉米视频成人免费看| 国产精品视频九色porn| 精品久久久久久久久久久久包黑料| 欧美在线不卡视频| 在线观看欧美精品| 在线观看免费视频综合| 91麻豆国产香蕉久久精品| 99久久精品一区| 99精品欧美一区| 91美女精品福利| 欧美系列日韩一区| 欧美精选在线播放| 欧美电视剧在线看免费| 精品国产伦一区二区三区观看体验| 日韩欧美精品三级| 欧美α欧美αv大片| 久久免费电影网| 国产精品成人免费| 伊人色综合久久天天人手人婷| 欧美—级在线免费片| 成人免费一区二区三区在线观看| 久久久国产精品不卡| 国产午夜精品理论片a级大结局| 久久蜜桃av一区精品变态类天堂| 国产精品素人一区二区| 一区二区三区资源| 激情综合一区二区三区| 国产91丝袜在线播放0| 在线观看精品一区| 国产欧美日韩精品在线| 亚洲国产成人av好男人在线观看| 日韩av一级电影| 色综合天天性综合| 国产亚洲视频系列| 日韩av中文字幕一区二区三区 | 国产欧美一区二区三区鸳鸯浴 | 一区二区三区美女视频| 蜜桃精品视频在线| 一本色道久久加勒比精品 | 欧美又粗又大又爽| 中文字幕在线不卡国产视频| 日韩国产欧美一区二区三区| 欧美性生活大片视频| 国产农村妇女精品| 国产成人在线视频播放| 欧美一区二区福利视频| 亚洲国产综合色| 色天天综合色天天久久| 国产精品久久久久aaaa| 久久99精品国产麻豆婷婷| 在线不卡欧美精品一区二区三区| 亚洲男同性恋视频| 色天使色偷偷av一区二区| 1024成人网色www| 97se亚洲国产综合自在线| 国产精品美女久久久久aⅴ | 欧美tickle裸体挠脚心vk| 丝袜亚洲另类欧美| 日韩亚洲欧美一区二区三区| 性做久久久久久久久| 欧美日韩国产高清一区二区三区| 婷婷成人综合网| 日韩欧美国产综合在线一区二区三区| 日本免费新一区视频| 日韩精品一区二区三区视频在线观看| 麻豆国产精品一区二区三区 | 久久综合色天天久久综合图片| 九色综合狠狠综合久久| 久久品道一品道久久精品| 91亚洲永久精品| 日产国产高清一区二区三区| 国产色91在线| 欧美无砖砖区免费| 国产一区二区美女诱惑| 综合分类小说区另类春色亚洲小说欧美| 99re热视频这里只精品| 亚洲第一主播视频| 欧美激情综合五月色丁香 | 色88888久久久久久影院野外| 亚洲综合色在线| 久久久三级国产网站| 欧美日韩中字一区| av高清久久久| 狠狠色综合色综合网络| 亚洲va韩国va欧美va| 国产精品每日更新| 久久久久久久综合日本| 欧美这里有精品| 成人小视频免费观看| 麻豆精品一区二区| 日本少妇一区二区| 亚洲大片在线观看| 亚洲第一精品在线| 亚洲国产精品天堂| 亚洲男同1069视频| 亚洲欧美欧美一区二区三区| 中文字幕不卡三区| 国产欧美一区二区精品久导航| 日韩欧美国产综合| 7799精品视频| 538在线一区二区精品国产| 欧美丰满高潮xxxx喷水动漫| 欧美日韩你懂得| 欧美tickling挠脚心丨vk| 精品国一区二区三区| 欧美肥妇free| 精品国产1区二区| 欧美激情一区二区三区蜜桃视频 | 久久综合久久综合亚洲| 欧美精品一区二区三区蜜桃| 久久久久久影视| 国产精品久久久久aaaa| 亚洲精品国产一区二区精华液| 亚洲精品久久久蜜桃| 图片区日韩欧美亚洲| 麻豆国产精品视频| 99视频有精品| 久久精品在线观看| 久久亚洲精华国产精华液| 国产日韩精品一区二区浪潮av| 国产精品视频看| 蜜臀久久99精品久久久久宅男| 国产成人午夜精品影院观看视频| 波多野结衣在线一区| 色欧美日韩亚洲| 2020日本不卡一区二区视频| 亚洲欧洲www| 久久99久久99精品免视看婷婷 | 亚洲成人午夜电影| 国产成人激情av| 精品视频一区二区不卡| 精品久久久久久亚洲综合网| 亚洲摸摸操操av| 粉嫩av亚洲一区二区图片| 69久久夜色精品国产69蝌蚪网| 中文字幕av一区二区三区| 一个色综合av| 99久久久久久| 欧美—级在线免费片| 国产主播一区二区三区| 制服.丝袜.亚洲.另类.中文 | 日本视频一区二区三区| 欧美亚洲禁片免费| 自拍偷拍亚洲综合| 不卡视频在线观看| 欧美国产一区视频在线观看| 美女脱光内衣内裤视频久久影院| 欧美写真视频网站| 五月天一区二区| 欧美人xxxx| 日韩在线播放一区二区| 欧美另类z0zxhd电影| 天天av天天翘天天综合网| 欧美日本一道本| 人禽交欧美网站| 欧美大度的电影原声| 理论片日本一区| 久久久精品国产免大香伊| 国产福利电影一区二区三区| 国产片一区二区| gogo大胆日本视频一区| 亚洲视频在线观看一区| 欧美在线观看禁18| 久久精品国产99| 国产精品丝袜久久久久久app| 成人av中文字幕| 亚洲va在线va天堂| 精品国产免费人成在线观看| 成人黄色网址在线观看| 一区二区三区久久| 精品播放一区二区| 成人精品视频一区二区三区尤物| 亚洲综合在线免费观看| 欧美一区永久视频免费观看| 国产在线精品免费| 夜夜爽夜夜爽精品视频| 日韩欧美国产精品| 色综合婷婷久久| 国产一区二区三区免费观看| 亚洲主播在线观看| 国产精品久久久久久久蜜臀|