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

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

?? connectioncompressed.java

?? 手機(jī)郵箱撒的方式方式方式的
?? JAVA
?? 第 1 頁 / 共 2 頁
字號:
package mujmail.connections;/*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.io.*;import javax.microedition.io.*;import mujmail.Lang;import mujmail.MyException;/** * Implements ConnectionInterface that compress data. (Compression filter) * Now using RLE "compression". * No output buffering, no flush. * InOut is line oriented */ public class ConnectionCompressed implements ConnectionInterface {    /** Flag signals if we want to print debug prints */    private static final boolean DEBUG = false;        /** Connection to sending compressed data */    private ConnectorInterface connector = null;    /** Indicates whether is connection open or close */    private boolean connected = false;    private boolean quit = false;        /** String that identify compression type.     *  Note: Pointer to one of predefined constants, no content comparison     */    private String compression = COMPRESSION_TYPE_NONE; // None have to be default        /** Compression type identification constants */    /** No compression is used for communication. */    public static final String COMPRESSION_TYPE_NONE    = "NONE";    //#ifdef MUJMAIL_COMPRESSED_CONNECTION    /** Communication with server is compressed by RLE compression. */    public static final String COMPRESSION_TYPE_RLE     = "RLE";    /** Communication from server is compressed by GZIP compression. */    public static final String COMPRESSION_TYPE_GZIP    = "GZIP";    /** Communication initialization constants */    private static final String INIT_HELLO = "Xmujmail-compression";    private static final String INIT_VERSION = "0.5";    //#endif    /** Counts changes of compression type */    private static int counter = 0;        /** Count send data. Data incoming from higher level into send method */    private int dataSendIn = 0;    /** Count read data. Data gets to higher level from getLine method */    private int dataReadIn = 0;        private static final int BUFFER_LEN = 256;    /** Buffer for outgoing compression data */    private InOutBuffer buff = null;        private Object syncIn = new Object();    private Object syncOut = new Object();    /** Last that was take back */    private StringBuffer lastLine = new StringBuffer();    /** Mark whether we want to get the last line back or new data from buffer */    private boolean backMark;    /*** RLE Compression specifies stuff */    // Hold state of RLE from last stop    private char RLE_Char;    private int  RLE_Count = 0; // How many times put into output    /** Creates new socket connection.      * <p>{@link mujmail.connections.ConnectorSocket} are used for communication.     * <p>No compression is set at first.     */    public ConnectionCompressed() {        connector = new ConnectorSocket();        buff = new InOutBuffer( BUFFER_LEN, connector);    }    /**     * Construct connection proxy     * @param _connector Connector used for data delivery.      *          If null standard ConnectorSocket will be used.     * @param _compression Initial type of compression     *      */    public ConnectionCompressed(ConnectorInterface _connector, String _compression) {        if (_connector != null)             connector = _connector;        else            connector = new ConnectorSocket();        compression = _compression;        buff = new InOutBuffer( BUFFER_LEN, connector);    }            public synchronized void close() {        connected = false;        buff.InSkipBuffer(); // Flushing buffer        try {            if (connector != null) connector.close();        } catch (IOException ex) {            // Connection closing problem, let is connection closed by timeout        }        }    public synchronized void open(String url, boolean ssl, byte sslType) throws MyException {        if (connector == null) return;        compression = COMPRESSION_TYPE_NONE;        try {            connector.open(url, ssl, sslType);        } catch (ConnectionNotFoundException ex) {            ex.printStackTrace();            throw new MyException(MyException.COM_UNKNOWN, Lang.get( Lang.EXP_COM_UNKNOWN) + " Server not found." + ex.getMessage()); // Try to open invalid location        } catch (EOFException ex) {            ex.printStackTrace();            throw new MyException(MyException.COM_HALTED);        } catch (IOException ex) {            //System.out.println(ex.getMessage());            //ex.printStackTrace();            ex.printStackTrace();            throw new MyException(MyException.COM_HALTED, ex);        }        connected = true;    }        //#ifdef MUJMAIL_COMPRESSED_CONNECTION     /**      * Sets new compression type     *      * @param newCompression Compression type to uses.      *      It have to be one from predefined strings in class.     *      Test is done string addressed (not content)     * <p>     * Note: Checks if server counter support compression. Sends data into output.     */    public void changeCompression(String newCompression) throws MyException {        if (connector == null) return;    // Check if newCompression is supported         // Note not comparing strings but addresses        if ( (newCompression != COMPRESSION_TYPE_NONE) &&             (newCompression != COMPRESSION_TYPE_RLE) &&             (newCompression != COMPRESSION_TYPE_GZIP) ) {            return;        }        // GZIP compression cann't be changed unsupported        if ( (compression == COMPRESSION_TYPE_GZIP) &&              (newCompression != COMPRESSION_TYPE_GZIP) ) {            return;        }        // Place for preinitialization               // Setting compression        String tag = "compress" + counter++ + " ";        String command = tag + INIT_HELLO + " " + INIT_VERSION + " " + newCompression; // Add necessary compression type initialization informations if needed        String result = null;        String oldCompression = compression;        try {            sendCRLF(command);            result = getLine(); // Last line in old compression            while (!result.startsWith(tag)) { //multiline response                result = getLine();            }                        result = result.substring(tag.length());            if (result.startsWith("OK")) { // All correct - set parameters                compression = newCompression; // This have to be set here, to connector.flush works correctly                if (compression == COMPRESSION_TYPE_GZIP) {                    connector = new ConnectorGZip(connector, buff);                    buff.changeConnector(connector);                    connector.flush();                }                getLine(); // To read server reply "* compression OK"            }        } catch ( IOException ex) {            // We need close connection immediately,             //   because each side tries to use different compression            compression = oldCompression;            throw new MyException( MyException.COM_UNKNOWN, ex);         }    }    //#endif        public void sendCRLF(String command) throws MyException {        send((command + CRLF).getBytes());    }    /**     * Send line (or multiline) to server.     * @param command The line to be written.     * @throws MyException If connection is closed or transmission error     */    public void send(String command) throws MyException {       send(command.getBytes());    }         /**     * Buffer to server.     * @param command bytes to be sent     * @throws MyException if connection is closed or transmission error     * Note: Have to be synchronized ... share one instance of output buffer     */    public void send(byte[] command) throws MyException {        if (connector == null ) return;        if (command == null || command.length == 0) return;        if (quit) {            throw new MyException(MyException.COM_HALTED);        }                synchronized (syncIn) {            // Counting send (uncompressed)data             dataSendIn += command.length;                        //#ifdef MUJMAIL_COMPRESSED_CONNECTION            if (compression == COMPRESSION_TYPE_RLE) {                try {                    byte prevByte = command[0];                    int inBufPos = 1; // Position in input buffer -- command                    int prevByteCount = 1;                    while (inBufPos < command.length) {                        if (command[inBufPos] == prevByte) {                            // Same character as before                            inBufPos++;                            prevByteCount++;                                                        // Test if length of same char in not too long                            if (prevByteCount == 18) {                                // To many same character, put out sequence                                buff.OutAddByte((byte)(0xFF)); // Writes 17times same char                                buff.OutAddByte(prevByte);                                prevByteCount = 1;                            }                        } else {                            // Different character in the input --> write current run                            if ((command[inBufPos] & 0xF0) == 0xF0 || prevByteCount > 1) {                                // Longer run or problematic char --> double char code                                buff.OutAddByte((byte)(0xF0 + prevByteCount - 1));                                buff.OutAddByte(prevByte);                            } else {                                // Single non problematic char (not binary 1111????) -> one byte code                                buff.OutAddByte(prevByte);                             }                            // Read next char from input                            prevByte = command[inBufPos];                            prevByteCount = 1;                            inBufPos++;                        }

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
成人性生交大片免费看视频在线| 香蕉久久一区二区不卡无毒影院| 国产盗摄一区二区| 久久香蕉国产线看观看99| 国产传媒久久文化传媒| 中文字幕一区av| 一本高清dvd不卡在线观看| 一区二区三区**美女毛片| 欧美三级日韩在线| 久久99日本精品| 国产精品久久久久久久久搜平片| 91啪九色porn原创视频在线观看| 亚欧色一区w666天堂| 欧美精品一区二区三区四区 | 天堂一区二区在线| 欧美成人精精品一区二区频| 成人免费视频网站在线观看| 亚洲国产精品综合小说图片区| 精品国产一区二区三区四区四| 成人爱爱电影网址| 三级影片在线观看欧美日韩一区二区| 日韩精品一区二区三区蜜臀| gogogo免费视频观看亚洲一| 香蕉成人伊视频在线观看| 久久久高清一区二区三区| 91啪亚洲精品| 国产精品一区2区| 午夜久久久久久久久久一区二区| 久久综合色8888| 欧美午夜精品理论片a级按摩| 久久99日本精品| 亚洲综合成人在线视频| 国产欧美一区二区精品性色| 精品视频免费在线| 国产超碰在线一区| 日韩电影在线免费看| 亚洲三级视频在线观看| 精品久久久久av影院| 在线视频中文字幕一区二区| 粉嫩蜜臀av国产精品网站| 免费人成精品欧美精品 | 日本一区二区三级电影在线观看| 欧美精品久久99久久在免费线 | 欧美日韩一二三| fc2成人免费人成在线观看播放| 免费成人在线视频观看| 亚洲国产精品一区二区www在线| 欧美激情在线一区二区| 精品国产乱子伦一区| 91精品免费在线观看| 日本丰满少妇一区二区三区| 成人av中文字幕| 国产一区二区免费看| 日本欧美韩国一区三区| 亚洲一级二级在线| 亚洲特级片在线| 国产精品午夜春色av| 久久久久国产精品免费免费搜索| 91精品在线免费| 欧美日韩三级一区二区| 欧美在线观看视频在线| 91啪在线观看| 日本乱人伦一区| 在线观看国产精品网站| 91丝袜高跟美女视频| 91视频观看视频| 99久久伊人精品| 97精品视频在线观看自产线路二| 风流少妇一区二区| 成人自拍视频在线| a4yy欧美一区二区三区| 不卡的看片网站| aaa亚洲精品| 色婷婷久久久久swag精品| 91丨porny丨国产入口| 91香蕉视频mp4| 色婷婷亚洲一区二区三区| 91精品福利在线| 欧美日韩久久一区二区| 欧美精品在线视频| 日韩午夜在线影院| 精品99一区二区三区| 久久综合九色综合久久久精品综合| 26uuu色噜噜精品一区二区| 欧美精品一区二区三区高清aⅴ | 欧美精品一区二区三区蜜桃视频 | a亚洲天堂av| 日本道免费精品一区二区三区| 欧美色中文字幕| 日韩一区二区免费高清| 2017欧美狠狠色| 国产精品久久久爽爽爽麻豆色哟哟 | 亚洲大片一区二区三区| 美女mm1313爽爽久久久蜜臀| 国产在线精品不卡| 国产aⅴ综合色| 在线精品视频小说1| 日韩一区二区三区精品视频 | 日韩一级片网站| 久久久久99精品国产片| 亚洲三级在线观看| 美日韩一级片在线观看| 成人动漫视频在线| 欧美日韩中字一区| 久久久高清一区二区三区| 亚洲精选免费视频| 麻豆91精品91久久久的内涵| 成人国产视频在线观看| 欧美剧情电影在线观看完整版免费励志电影 | 久久先锋影音av| 中文字幕亚洲不卡| 美女视频黄久久| 色综合激情久久| 精品国产免费人成电影在线观看四季 | 高清视频一区二区| 欧美日韩亚洲综合一区| 久久久久97国产精华液好用吗| 一区二区国产盗摄色噜噜| 久久99久国产精品黄毛片色诱| 91色乱码一区二区三区| 日韩精品一区二区三区swag| 亚洲欧美日韩成人高清在线一区| 精品一区二区在线免费观看| 欧美怡红院视频| 国产欧美一区二区精品忘忧草| 亚洲午夜久久久久| 成人黄色综合网站| 日韩精品最新网址| 亚洲在线观看免费视频| 成人黄页在线观看| 久久色视频免费观看| 亚洲大型综合色站| 91丨porny丨在线| 国产人久久人人人人爽| 美腿丝袜亚洲综合| 欧美日韩不卡一区二区| 亚洲三级免费观看| 国产成人精品三级| 欧美成人一区二区三区在线观看| 亚洲成人精品一区二区| 91丨九色丨黑人外教| 亚洲国产精品精华液2区45| 精品一区二区三区在线播放 | 成人app下载| 国产亚洲人成网站| 日韩不卡一区二区三区| 在线视频一区二区免费| 亚洲人成精品久久久久久| 成人免费黄色在线| 欧美国产激情一区二区三区蜜月 | av午夜一区麻豆| 国产偷v国产偷v亚洲高清| 精品在线免费观看| 日韩美女天天操| 久久99精品国产.久久久久| 制服视频三区第一页精品| 性做久久久久久| 欧美老年两性高潮| 天天操天天干天天综合网| 欧美美女视频在线观看| 亚洲一级电影视频| 欧美日韩在线免费视频| 亚洲一区二区欧美激情| 欧美性猛交xxxx乱大交退制版| 尤物av一区二区| 欧美视频日韩视频在线观看| 亚洲国产一区视频| 7878成人国产在线观看| 日本欧美加勒比视频| 日韩午夜激情电影| 国产综合久久久久久久久久久久| 亚洲精品在线免费观看视频| 国产精品中文字幕日韩精品| 国产欧美日韩三级| 91视视频在线观看入口直接观看www| 18成人在线观看| 欧美午夜理伦三级在线观看| 日韩在线播放一区二区| 日韩女优电影在线观看| 国产精品一级在线| 亚洲欧美一区二区三区国产精品 | 欧美日韩一区国产| 青青草精品视频| 久久久99精品久久| 99re成人精品视频| 亚洲一区二区免费视频| 欧美一区二区三区视频免费| 国产在线麻豆精品观看| 1024精品合集| 91精品在线观看入口| 国产成人免费视| 亚洲在线成人精品| 欧美刺激脚交jootjob| 福利一区在线观看| 亚洲二区视频在线| 久久女同性恋中文字幕| 色综合天天综合| 麻豆91精品视频| 亚洲图片欧美激情| 欧美va天堂va视频va在线|