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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? pop3.java

?? 手機郵箱撒的方式方式方式的
?? JAVA
?? 第 1 頁 / 共 2 頁
字號:
package mujmail.protocols;/*MujMail - Simple mail client for J2MECopyright (C) 2006 Nguyen Son Tung <n.sontung@gmail.com>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. */import java.util.Hashtable;import java.util.Stack;import java.util.Timer;import java.util.TimerTask;import java.util.Vector;import mujmail.Lang;import mujmail.MessageHeader;import mujmail.MujMail;import mujmail.MyException;import mujmail.Settings;import mujmail.account.MailAccount;import mujmail.tasks.BackgroundTask;import mujmail.threading.Algorithm;import mujmail.util.Functions;/** * Implements InProtocol using POP3. * All operations can be invoked at once and we have shared resource  * BasicConnection. So we must synchronize the method run. we use lock() instead  * of making run() synchronized in order to allow forced disconnecting from  * servers even some job are still running. */public class POP3 extends InProtocol {    /** The name of this source file */    private static final String SOURCE_FILE = "POP3";    /** Flag signals if we want to print debug prints */    private static final boolean DEBUG = false;        Hashtable deleted;    Timer connectionKeeper;    private void resolveMyExceptionWhileRunning(MyException ex) {        if (ex.getErrorCode() == MyException.COM_HALTED) {            connection.unQuit();        }        resolveExceptions(ex.getDetails() + "/ " + account.getEmail(), SOURCE_FILE);    }    private class Keeper extends TimerTask {        public void run() { //sends a command to check and keeps the connection alive to avoid long reconnecting              if (DEBUG) System.out.println(account.getEmail() + ": keeping connection alive...");            if (isBusy()) {                return;            }            lock();            if (!isConnected()) {                _close(null);            }            unlock();        }    }    public POP3(MailAccount account) {        super(account);        END_OF_MAIL = ".\r\n";        deleted = new Hashtable();    }    //add a mail to a queue of mails that are going to be deleted from the server    public void addDeleted(MessageHeader header) {        deleted.put(header.getMessageID(), header);    }    public boolean isConnected() {        try {            if (connection.isConnected()) {                connection.clearInput();                connection.sendCRLF("NOOP");                if (connection.getLine().startsWith("+OK")) {                    return true;                }            }        } catch (Exception ex) {            connection.close();            //TODO: Close connection        }        return false;    }    public int countNew() throws MyException {        connection.sendCRLF("STAT");        String reply = connection.getLine();        if (!reply.startsWith("+OK")) {            return 0;        }        return Integer.parseInt(reply.substring(4, reply.lastIndexOf(' ')).trim());    }    private int getSize(int msgNum) throws MyException {        connection.sendCRLF("LIST " + msgNum);        String reply = connection.getLine();        if (!reply.startsWith("+OK")) {            return 0;        }        return Integer.parseInt(reply.substring(reply.lastIndexOf(' ') + 1).trim());    }    private String getMsgID(int index) throws MyException {        connection.sendCRLF("UIDL " + index);        String reply = connection.getLine();        if (reply.startsWith("+OK")) {            return reply.substring(reply.lastIndexOf(' ') + 1).trim();        } else {            return "";        }    }    /**     * Gets the index of given mail on the server.     * @param header the header of the mail     * @return the index of the mail on the server     * @throws MyException     */    private String getMsgNum(MessageHeader header) throws MyException {        String reply, ID, num;        String index = (String) mailsOnServer.get(header.getMessageID());        if (index != null) {            connection.sendCRLF("UIDL " + index); //lets try if the mail is from actual session		            reply = connection.getLine();            if (reply.startsWith("+OK")) {                ID = reply.substring(reply.lastIndexOf(' ') + 1).trim();                if (ID.equals(header.getMessageID())) {                    return index;                }            }        }        //we have to test and update info about all mails :(        //note: if a message is marked as deleted or as read by pop3 , it will never be listed by UIDL again and we can get it anymore?        connection.sendCRLF("UIDL");        connection.getLine();        boolean found = false;        while (!(reply = connection.getLine()).startsWith(".")) {            ID = reply.substring(reply.indexOf(' ') + 1).trim();            num = reply.substring(0, reply.indexOf(' '));            if (mailsOnServer.containsKey(ID)) //let's remove old information            {                mailsOnServer.remove(ID);            }            mailsOnServer.put(ID, num);            if (ID.equals(header.getMessageID())) {                found = true;            }        }        return found ? (String) mailsOnServer.get(header.getMessageID()) : "0";    }    // Note task can be null for polling task, getUrl    protected boolean open(BackgroundTask task) throws MyException {        if (isConnected()) {            return true;        }        _close(task); //we'd better close inactive connections        try {            if (task != null) { task.setTitle(Lang.get(Lang.ALRT_PL_CONNECTING) + " " + account.getEmail()); }            connection.open(account.getServer() + ":" + account.getPort(),account.isSSL(), account.getSSLType());            if (!connection.getLine().startsWith("+OK")) {                if (task != null) { task.setTitle(Lang.get(Lang.ALRT_PL_CONNECTING) + account.getEmail() + Lang.get(Lang.FAILED)); }                return false;            }            connection.sendCRLF("USER " + account.getUserName());            if (!connection.getLine().startsWith("+OK")) {                connection.unGetLine();                getReportBox().report("100: " + Lang.get(Lang.PL_NOTAUTHORIZED) + account.getUserName() + "/ " + connection.getLine(), SOURCE_FILE);                return false;            }            connection.sendCRLF("PASS " + account.getPassword());            if (!connection.getLine().startsWith("+OK")) {                getReportBox().report("100: " + Lang.get(Lang.PL_NOTAUTHORIZED) + account.getUserName(), SOURCE_FILE);                return false;            }            if (task != null) { task.setTitle(Lang.get(Lang.ALRT_PL_CONNECTING) + account.getEmail() + Lang.get(Lang.SUCCESS)); }            connectionKeeper = new Timer();            connectionKeeper.scheduleAtFixedRate(new Keeper(), Settings.noopPeriod, Settings.noopPeriod);            return true;        } catch (MyException e) {            if (task != null) { task.setTitle(Lang.get(Lang.ALRT_PL_CONNECTING) + account.getEmail() + Lang.get(Lang.FAILED)); }            throw e;        } catch (Exception e) {            if (task != null) { task.setTitle(Lang.get(Lang.ALRT_PL_CONNECTING) + account.getEmail() + Lang.get(Lang.FAILED)); }            throw new MyException(MyException.COM_UNKNOWN, "100: " + e);        }    }    // Note task can be null (background Keeper task)    protected synchronized void _close(BackgroundTask task, boolean waitForReply) {        if (!connection.isConnected()) {            return;        }        if (task != null) { task.setTitle(Lang.get(Lang.ALRT_PL_CLOSING) + account.getEmail()); }        if (connectionKeeper != null) {            connectionKeeper.cancel();        }        connectionKeeper = null;        forcedDisc = false;        try {            connection.sendCRLF("QUIT");        } catch (MyException e) {            if (task != null) { task.setTitle(Lang.get(Lang.ALRT_PL_CLOSING) + account.getEmail() + ": " + e.getDetails()); }        }        try {            connection.close();        } catch (Exception e) {            if (task != null) { task.setTitle(Lang.get(Lang.ALRT_PL_CLOSING) + account.getEmail() + ": " + e); }        }        if (task != null) { task.setTitle(Lang.get(Lang.ALRT_PL_CLOSING) + account.getEmail() + Lang.get(Lang.SUCCESS)); }    }    protected void findFirstNewMailWhilePolling() throws MyException {        int count = countNew();        for (; count > 0; --count) {            String ID = getMsgID(count);            if (ID.length() > 0) {                if (handleMailDiscoveredByPolling(ID)) break;            }        }    }    protected void getNewMails() {        try {            // TODO: data overheads when we want to receive only X new mails?            // check out countNew(), while (actual < max) {...} and            //  while (actual > 0) {..}            // the same is in IMAP4            long startTime = System.currentTimeMillis();            if (!open(inProtocolTask)) { //in case of server->inbox sync we need to notify about this error                //otherwise the synchronization will think that no mails are on the server                //throw new MyException(MyException.PROTOCOL_CANNOT_CONNECT);            	return;            }            if (getTargetBox().isSyncRunning()) {                mailsOnServer.clear();            }//we need to recreate a new mailsOnServer lists            _close(null);            open(null);            int newMailsCount = countNew();            int max = newMailsCount;            if (!targetBox.isSyncRunning() &&            	Settings.maxMailsRetrieve > 0 && newMailsCount >= Settings.maxMailsRetrieve) //limit exceeded

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美美女一区二区| 亚洲gay无套男同| 欧美性猛交xxxxxxxx| 一区二区三区免费| 精品福利av导航| 在线观看亚洲专区| 九九**精品视频免费播放| 在线观看亚洲精品视频| 欧美写真视频网站| 波多野洁衣一区| 国产一区二区三区av电影| 一区二区三区在线视频观看| 中文字幕精品三区| 欧美一区二区三区免费大片| 久久免费国产精品| 6080国产精品一区二区| av一本久道久久综合久久鬼色| 国产一区二区在线影院| 日韩亚洲欧美中文三级| 2023国产精品| 日韩丝袜美女视频| 欧美日韩免费电影| 免费人成精品欧美精品| 国产主播一区二区三区| 亚洲五月六月丁香激情| 一区二区三区**美女毛片| 国产精品伦一区二区三级视频| 欧美日韩国产小视频| 欧美视频中文一区二区三区在线观看| 成人av影视在线观看| 成人性生交大片免费看中文| 久久精品噜噜噜成人88aⅴ| 国产很黄免费观看久久| 91在线国产观看| 亚洲在线视频一区| 中文字幕在线视频一区| 欧美成人女星排行榜| 日韩一级在线观看| 欧美一区二区三区影视| 7777精品伊人久久久大香线蕉| 在线精品视频一区二区三四| 免费精品视频在线| 日本一区中文字幕| 国内精品免费**视频| 极品美女销魂一区二区三区| 韩日欧美一区二区三区| 国产一区二区日韩精品| 波多野结衣的一区二区三区| 亚洲精品国产一区二区三区四区在线| 蜜桃久久久久久| 国内精品伊人久久久久影院对白| 国产精品资源站在线| 床上的激情91.| 日本中文一区二区三区| 免费成人小视频| 亚洲自拍偷拍图区| 99免费精品视频| 菠萝蜜视频在线观看一区| 欧洲一区在线观看| 欧美一区二区三区日韩| 精品国产一区二区三区久久久蜜月 | 亚洲精品日韩综合观看成人91| 美洲天堂一区二卡三卡四卡视频| 国产一区二区三区免费在线观看 | 欧美视频一区二| 欧美在线视频日韩| 综合久久给合久久狠狠狠97色| 五月天欧美精品| 久久99久久精品| 色狠狠综合天天综合综合| 中文字幕av资源一区| 亚洲成人av电影在线| 国产精品亚洲午夜一区二区三区 | 欧美精品一区二区三区视频| 国产精品久久免费看| 亚洲午夜免费电影| av中文一区二区三区| www.亚洲激情.com| 亚洲欧美一区二区在线观看| 久久99精品久久久久| 色噜噜狠狠成人中文综合 | 精品成人一区二区三区| 亚洲男女毛片无遮挡| 精品人伦一区二区色婷婷| 免费一级片91| av一二三不卡影片| 国产片一区二区| 免费高清在线一区| 欧美日韩视频在线第一区| 久久精品视频一区| 图片区小说区国产精品视频| 国产91综合一区在线观看| 在线观看91视频| 亚洲欧美日韩国产另类专区| 国产福利一区在线| 91精品国产丝袜白色高跟鞋| 国产精品超碰97尤物18| 日本中文在线一区| 欧美精品亚洲一区二区在线播放| 国产欧美1区2区3区| 国产一区二区三区在线观看免费 | 粉嫩嫩av羞羞动漫久久久| 国产精品自拍三区| 久久综合久久综合九色| 天堂影院一区二区| 日本韩国一区二区三区视频| 久久久久久一二三区| 国产精品一区免费在线观看| 欧美一卡二卡在线| 亚洲电影视频在线| 91久久精品一区二区| 国产精品美女久久久久久久| 懂色中文一区二区在线播放| 337p粉嫩大胆噜噜噜噜噜91av| 婷婷久久综合九色国产成人| 欧美美女bb生活片| 亚洲一级电影视频| 欧美自拍偷拍午夜视频| 国产精品国产a| 成人h动漫精品一区二区| 国产精品毛片久久久久久| 亚洲成人av一区二区| 国产精品久久免费看| 色av成人天堂桃色av| 亚洲大型综合色站| 国产综合久久久久久久久久久久| 欧美午夜精品久久久久久孕妇 | 亚洲精品国产一区二区精华液| 日韩亚洲欧美成人一区| a4yy欧美一区二区三区| 国模大尺度一区二区三区| 亚洲欧美区自拍先锋| 久久久影视传媒| 91在线视频在线| 日韩三级伦理片妻子的秘密按摩| 欧美日韩在线播放三区| 日本成人中文字幕| 一区二区三区四区蜜桃| 国产精品久久久久aaaa| 色国产综合视频| 99re6这里只有精品视频在线观看| 免费在线观看一区| 久久免费电影网| 成人精品小蝌蚪| 亚洲免费视频成人| 国产精品久久久一本精品| 欧美在线视频不卡| 国产精品一区二区你懂的| 亚洲激情自拍视频| 日韩精品中文字幕在线不卡尤物| 一区二区三区精品视频| 久久一二三国产| 欧美调教femdomvk| 国产宾馆实践打屁股91| 中文字幕免费观看一区| 国产欧美一区二区精品仙草咪| 欧美性生活影院| 成人免费不卡视频| 美女视频免费一区| 欧美成人官网二区| 久久无码av三级| 欧美乱熟臀69xxxxxx| 日韩国产在线一| 久久欧美中文字幕| 日韩一区二区电影在线| 91久久国产最好的精华液| 成人精品亚洲人成在线| 国产精品福利一区二区| 亚洲精品成人在线| 久久久精品黄色| 日韩精品专区在线影院观看| 欧美日韩一本到| 日本欧美一区二区三区乱码 | 日本在线不卡一区| 一区二区三区波多野结衣在线观看| 亚洲精品视频在线看| 在线日韩国产精品| 91精品久久久久久久99蜜桃| 国产麻豆精品在线观看| 美女一区二区视频| 国产成人精品免费在线| 日韩国产成人精品| 国产不卡视频在线播放| 午夜精品影院在线观看| 国产在线日韩欧美| 久久久久久久久久美女| 欧美国产综合色视频| 欧美国产在线观看| 国产午夜精品一区二区三区四区| 欧美高清一级片在线观看| 久久麻豆一区二区| 中文字幕在线观看一区| 精品视频资源站| 91精品国产综合久久小美女| 欧美一区二区精品久久911| 在线一区二区观看| 91精品国产欧美一区二区成人| 欧美色网站导航| 91麻豆精品国产91久久久 | 一级特黄大欧美久久久|