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

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

?? inprotocol.java

?? 手機郵箱撒的方式方式方式的
?? JAVA
?? 第 1 頁 / 共 5 頁
字號:
     * <p>     * If the email is plain (not multipart) in such lines are information about     * the header of email body. Thats why it is needed to pass body part header     * and fill it with information from these lines.     * If the email is multipart, we need to extract only body part boundary.     * </p>     *      * @param bpHeader if the email is plain, in content lines are information     *        about the body of the mail, fill it     * @return body part boundary if the email is multipart,     *         null if the message is plain text     * @throws MyException when there is error in getting line from connection     *         or in decoding     */    private String parseContentLines(BodyPart.Header bpHeader) throws MyException {        StringBuffer buff = new StringBuffer();        String bodyPartBoundary = null;        String line = connection.getLine();          if (DEBUG) System.out.print( "DEBUG InProtocol.parseContentLines(BodyPart.Header) - line: " + line);        String lower = line.toLowerCase();        int i;        while ( line.charAt(0) == ' ' || line.charAt(0) == '\t' || line.toLowerCase().startsWith("content-") ) {        	i = lower.indexOf( "boundary=" );        	if ( i >= 0 ) {        		bodyPartBoundary = "--" + getBoundaryParamValue( i, line );        	}              if (DEBUG) System.out.println("DEBUG InProtocol.parseContentLines(BodyPart.Header) - bodyPartBoundary: " + bodyPartBoundary);            i = lower.indexOf("name=");            if (i != -1) {                bpHeader.setName(Decode.decodeHeaderField(line.substring(i + 5)).trim());                if (bpHeader.getName().charAt(0) == '"') {                    bpHeader.setName( bpHeader.getName().substring(1, bpHeader.getName().indexOf('"', 2)));                } else if (bpHeader.getName().indexOf(';', 1) != -1) {                    bpHeader.setName( bpHeader.getName().substring(0, bpHeader.getName().indexOf(';', 1)) );                }                //let's remove the filename from the string preventing detecting bad charset,                 //in case the filename itself is named as some charset like windows-1250.txt                lower = lower.substring(0, i) + lower.substring(i + 5 + bpHeader.getName().length());            }            buff.append(lower);                        line = connection.getLine();              if (DEBUG) System.out.print( "DEBUG InProtocol.parseContentLines(BodyPart.Header) - line: " + line);            lower = line.toLowerCase();        }        connection.unGetLine();        //we may be searching in the big String lower, but only once, making it a little faster        lower = buff.toString();        if (lower.indexOf("windows-1250") != -1) {            bpHeader.setCharSet (BodyPart.CH_WIN1250);        } else if (lower.indexOf("iso-8859-1") != -1) {            bpHeader.setCharSet( BodyPart.CH_ISO88591 );        } else if (lower.indexOf("iso-8859-2") != -1) {            bpHeader.setCharSet( BodyPart.CH_ISO88592 );        } else if (lower.indexOf("utf-8") != -1) {            bpHeader.setCharSet( BodyPart.CH_UTF8 );        }                if (lower.indexOf("image/") != -1 || lower.indexOf("video/") != -1 || lower.indexOf("audio/") != -1) {            bpHeader.setBodyPartContentType( BodyPart.TYPE_MULTIMEDIA );        } else if (lower.indexOf("application/") != -1) {            bpHeader.setBodyPartContentType( BodyPart.TYPE_APPLICATION );        } else if (lower.indexOf("text/html") != -1) {            bpHeader.setBodyPartContentType( BodyPart.TYPE_HTML );        } else if (lower.indexOf("text/") == -1 && lower.indexOf("content-type") != -1) {            bpHeader.setBodyPartContentType( BodyPart.TYPE_OTHER );        }                int j = lower.indexOf("content-transfer-encoding:");        if (j != -1) {            j += 26;            if (lower.indexOf("base64", j) != -1) {                bpHeader.setEncoding( BodyPart.ENC_BASE64 );            } else if (lower.indexOf("quoted-printable", j) != -1) {                bpHeader.setEncoding( BodyPart.ENC_QUOTEDPRINTABLE );            } else if (lower.indexOf("8bit", j) != -1) {                bpHeader.setEncoding( BodyPart.ENC_8BIT );            }        }                  if (DEBUG) System.out.println("DEBUG InProtocol.parseContentLines(BodyPart.Header) - returning bodyPartBoundary: " + bodyPartBoundary);        return bodyPartBoundary;    }    /**     * Parses the header of body part in multiparted messages.     * If the message is plain, the information about the header of body are     * parsed from the lines begining with word content in the header of the     * message. See parseContentLines.     * @param bpHeader     * @return the boundary of the body part header     * @throws MyException     * @see parseContentLines     */    private String parseBodyPartHeader(BodyPart.Header bpHeader) throws MyException {          if (DEBUG) { System.out.println("DEBUG InProtocol.parseBodyPartHeader - before execution"); }        String line = connection.getLine();        String lower;        String bodyPartBoundary = null;        while ( ! "\r\n".equals(line) ) {            lower = line.toLowerCase();            if (lower.startsWith("content-")) {            	  // return line back, because parseContentLines() needs it                connection.unGetLine();                bodyPartBoundary = parseContentLines(bpHeader);            }            line = connection.getLine();        }        return bodyPartBoundary;    }    /**     * Parses and sets charset, types... of header.     *      * According to MIME, if the message is plain, the information about the body      * of such message are in the lines of the message header beginning with     * the word content. So such information are parsed during parsing of the     * message header.      * Thats why when the message is plain, also bodypart is created and added to     * the header. See method parseContentLines() for more details.     *      * @param header the header to be parsed     * @throws MyException     */    protected void parseHeaders(MessageHeader header) throws MyException {        try {            String line, lower;            //if downloading the whole mail is required then we'll create a BodyPart            //because of for a plain (non-mulitpart) mail some information like Charset, MIME encoding are stored in headers lines            BodyPart.Header bpHeader = (Settings.downWholeMail && !Settings.safeMode) ? new BodyPart.Header() : null;                while (!(line = connection.getLine()).equals("\r\n")) {                lower = line.toLowerCase();                    if (lower.startsWith("from:")) {                    header.setFrom(Decode.decodeHeaderField(line.substring(5)).trim());                } else if (lower.startsWith("to:") || lower.startsWith("cc:") || lower.startsWith("bcc:")) {                    // parse a multiline recipients                    StringBuffer line2 = new StringBuffer();                    do {                        line2.append(line);                        line = connection.getLine();                    } while (line.startsWith("\t") || line.startsWith(" "));                    connection.unGetLine();                    String rcps = line2.toString().trim();                    if (rcps.length() > 0) {                        header.addRecipient(Decode.decodeHeaderField(line2.toString()).trim());                    }                    } else if (lower.startsWith("subject:")) {                    // parse a multiline subject                    StringBuffer line2 = new StringBuffer();                    do {                        line2.append(line);                        line = connection.getLine();                    } while (line.startsWith("\t") || line.startsWith(" "));                    header.setSubject(Decode.decodeHeaderField(line2.toString().substring(8)).trim());                    connection.unGetLine();                } else if (lower.startsWith("date:")) {                    header.setTime(Functions.getStrToLongTime(lower.substring(5)));                } else if (lower.startsWith("status:") && line.indexOf("R", 7) != -1) { //this is not defined by rfc, doesnt work on all servers                    header.markAsRead();                } else if (lower.startsWith("x-status:") && line.indexOf("A", 9) != -1) { //this is not defined by rfc, doesnt work on all servers                    header.markAsReplied();                } else if (lower.startsWith("content-")) {                    do {                        if (lower.indexOf("multipart") != -1) {                            header.markAsMultipart();                        }                        final int index = lower.indexOf("boundary=");                        if ( index != -1) {                            setBoundary( header, index, line, lower );                        }                                                // if we for the present don't know whether the mail is multipart                        // and we want to download whole mail (bp != null -- safer than checking Settings.downloadWholeMail).                        else if (bpHeader != null) {                            // if the message is plain, the information about the body are                            // stored in the header of the message so we need to parse                            // it and store it to the bpHeader                            // if the message is multipart, we need only,the boundary                             // of body parts (and we don't need bpHeader)                            connection.unGetLine();                            String tmpBoundary = parseContentLines(bpHeader);                              if (DEBUG) System.out.println( "DEBUG parseHeaders(MessageHeader) - " + tmpBoundary );                            if (tmpBoundary != null) { //if it has a boundary                                 header.markAsMultipart();// then it must be multipart mail                                header.setBoundary(tmpBoundary);                            }//else we have parsed usefull info for nonmutli mail like content transfer, charset..						                        }                            line = connection.getLine();                        lower = line.toLowerCase();                    } while (lower.startsWith(" ") || lower.startsWith("\t"));                    connection.unGetLine();                } else if ( lower.startsWith( "message-id" ) ) {                    int startIndex = lower.indexOf("<");                    int endIndex = lower.indexOf(">", startIndex);                    if ( startIndex > -1 ) {                        final String threadingMessageID = line.substring( startIndex + 1, endIndex );                        header.setThreadingMessageID( threadingMessageID );                          if (DEBUG) { System.out.println("DEBUG InProtocol.parseHeaders(MessageHeader)[message-id] - " + threadingMessageID); }                    }                } else if ( lower.startsWith( "in-reply-to" ) ) {                    int startIndex = lower.indexOf("<");                    int endIndex = lower.indexOf(">", startIndex);                    if ( startIndex > -1 ) {                        final Vector parentIDs = header.getParentIDs();                          if (DEBUG) { System.out.println("DEBUG InProtocol.parseHeaders(MessageHeader)[in-reply-to] - parentIDs: " + parentIDs); }                        final String parentID = line.substring( startIndex + 1, endIndex);                          if (DEBUG) { System.out.println("DEBUG InProtocol.parseHeaders(MessageHeader)[in-reply-to] - parentID: " + parentID); }                        header.setParentID( parentID );                          if (DEBUG) { System.out.println("DEBUG InProtocol.parseHeaders(MessageHeader)[in-reply-to] - parentID set"); }                        if (parentIDs == null) {                            if (DEBUG) { System.out.println("DEBUG InProtocol.parseHeaders(MessageHeader)[in-reply-to] - parentIDs vector is null !"); }                        }                    }                } else if (lower.startsWith("references") ) {                    int startIndex = lower.indexOf("<");                    int endIndex = lower.indexOf(">", startIndex);                    final Vector/*<String>*/ parentIDs = header.getParentIDs();                      if (DEBUG) { System.out.println("DEBUG InProtocol.parseHeaders(MessageHeader)[references] - parentIDs: " + parentIDs); }                    String parentID;                    while ( startIndex > -1) {                        parentID = line.substring(startIndex + 1, endIndex);                          if (DEBUG) { System.out.println("DEBUG InProtocol.parseHeaders(MessageHeader)[references] - parentID: " + parentID); }                        if ( !parentIDs.contains( parentID ) ) {                            parentIDs.addElement( parentID );                        }                        startIndex = lower.indexOf("<", endIndex);                          // when startIndex is -1 end index points to first                          //   occurrence of '>', but it doesn't matter, because                          //   loop ends when startIndex = -1                        endIndex = lower.indexOf(">", startIndex);                    } // while                } // if            }                        header.ensureRecipient(account.getEmail());                        //if we want to download whole mail (bp != null) and the message is plain            // we have already parsed information about body part header from the             // message header. So insert the prepared bodypart bp for latter parseBody() call            if (bpHeader != null && header.isPlain()) {                BodyPart bp = new BodyPart(header, bpHeader);                header.addBodyPart(bp);            }            header.setAccountID(account.getEmail());            header.ensureRecipient(account.getEmail());                        //if we want to download whole mail (bp != null) and the message is plain            // we have already parsed information about body part header from the             // message header. So insert the prepared bodypart bp for latter parseBody() call            if (bpHeader != null && header.isPlain()) {                BodyPart bp = new BodyPart(header, bpHeader);                header.addBodyPart(bp);            }            header.setAccountID(account.getEmail());              // references field sometimes doesn't contain parentID              //   (In-Reply-To) field, so we add this one to the references            final Vector parentIDs = header.getParentIDs();            final String parentID = header.getParentID();            if ( ! "".equals( parentID ) && ! parentIDs.contains( parentID ) ) {                parentIDs.addElement( parentID );                  if (DEBUG) { System.out.println("DEBUG InProtocol.parseHeaders(MessageHeader)[in-reply-to] - parentID added to parentIDs vector"); }            }              // "Message-ID" filed from e-mail header is optional              //   when it's missing, it's replaced with messageID            String threadingMessageID = header.getThreadingMessageID();            if ( threadingMessageID == null                    || "".equals( threadingMessageID ) ) {                header.setThreadingMessageID( header.getMessageID() );            }        } catch (RuntimeException re) {            if (DEBUG) { System.err.println("ERROR InProtocol.parseHeader() - uncautched exception"); }            re.printStackTrace();            throw re;        }            }

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品一品视频| 欧美成人三级电影在线| 欧美一区二区三区免费视频| 中文字幕免费一区| 极品少妇一区二区三区精品视频 | 色成年激情久久综合| 日韩欧美一二三区| 亚洲高清视频中文字幕| av福利精品导航| 国产欧美日本一区视频| 久久国产婷婷国产香蕉| 777精品伊人久久久久大香线蕉| 亚洲视频在线一区| 国产一区二区影院| 日韩精品一区二区三区中文不卡 | 亚洲精品国产精华液| 国产一区久久久| 欧美一二三区在线观看| 午夜影院在线观看欧美| 在线观看亚洲一区| 一区二区三区91| 在线观看中文字幕不卡| 成人欧美一区二区三区视频网页| 丰满岳乱妇一区二区三区| 国产婷婷一区二区| 激情图片小说一区| 精品国产乱码久久| 国产麻豆视频一区二区| 久久综合久久99| 国产麻豆视频一区| 国产精品网友自拍| 99精品视频一区| 亚洲视频一区二区在线| 99久久综合色| 一区二区三区加勒比av| 欧美日韩一区二区在线视频| 亚洲福利一二三区| 欧美一区二区三区视频在线| 看电视剧不卡顿的网站| 337p日本欧洲亚洲大胆色噜噜| 狠狠色狠狠色综合| 欧美国产精品一区二区| 99视频国产精品| 亚洲成人激情自拍| 精品毛片乱码1区2区3区| 国内精品自线一区二区三区视频| 久久蜜臀中文字幕| kk眼镜猥琐国模调教系列一区二区 | 国产日韩高清在线| 99综合电影在线视频| 一区二区三区美女视频| 欧美一区二区在线播放| 国产中文字幕一区| 亚洲精品视频在线观看网站| 欧美日韩一区二区三区不卡| 麻豆精品在线播放| 亚洲色图视频网站| 欧美肥妇bbw| 高清不卡在线观看| 亚洲福中文字幕伊人影院| 欧美成人精品3d动漫h| 成人免费精品视频| 三级欧美韩日大片在线看| 国产亚洲精品7777| 欧美日韩国产bt| 国产成人亚洲综合a∨猫咪| 亚洲一区在线观看视频| 久久久噜噜噜久久中文字幕色伊伊 | 国产麻豆精品视频| 亚洲免费在线电影| 精品国产露脸精彩对白| 91久久精品日日躁夜夜躁欧美| 美女一区二区视频| 亚洲老司机在线| 精品入口麻豆88视频| 日本韩国欧美一区| 国模少妇一区二区三区| 一区二区三区国产精品| 久久久三级国产网站| 欧美另类z0zxhd电影| 成人av电影观看| 极品美女销魂一区二区三区免费| 亚洲黄色小视频| 中文字幕精品一区二区精品绿巨人| 欧美在线小视频| 白白色亚洲国产精品| 国产毛片精品视频| 美腿丝袜一区二区三区| 午夜伊人狠狠久久| 亚洲综合成人在线| 亚洲欧洲av另类| 久久婷婷国产综合精品青草| 欧美高清你懂得| 欧美性猛片aaaaaaa做受| av爱爱亚洲一区| 成人激情小说网站| 成人综合在线视频| 国产精品资源在线观看| 韩国一区二区三区| 国产一区欧美日韩| 国产做a爰片久久毛片| 久久电影网站中文字幕| 日韩国产精品久久久久久亚洲| 一区二区三区不卡在线观看 | 欧美日韩精品免费| 欧美吻胸吃奶大尺度电影| 99精品桃花视频在线观看| 成人亚洲精品久久久久软件| 国产精品一二三在| 国产精品一二三四五| 国产精品主播直播| 丁香婷婷综合色啪| 波波电影院一区二区三区| 成人手机在线视频| 不卡在线视频中文字幕| 不卡av在线免费观看| 99v久久综合狠狠综合久久| 成人avav在线| 91福利视频在线| 欧美三级蜜桃2在线观看| 欧美日韩大陆一区二区| 日韩三级在线免费观看| 欧美成va人片在线观看| 久久综合九色综合欧美亚洲| 久久一区二区三区四区| 国产亚洲一二三区| 亚洲色图在线播放| 亚洲国产va精品久久久不卡综合| 午夜精品福利久久久| 久久精品国产一区二区三区免费看| 极品少妇一区二区三区精品视频 | 一色桃子久久精品亚洲| 亚洲免费在线视频| 日日夜夜精品视频天天综合网| 美女国产一区二区| 不卡影院免费观看| 7777精品久久久大香线蕉| 亚洲精品一区二区精华| 一区二区中文视频| 午夜精品福利一区二区三区av| 国产真实乱对白精彩久久| 91免费视频观看| 日韩午夜电影av| 国产精品久久久久9999吃药| 亚洲国产一二三| 国产精品香蕉一区二区三区| 色综合视频在线观看| 欧美一区二区三区婷婷月色| 国产欧美一区二区精品仙草咪| 亚洲精品国产无天堂网2021| 看电影不卡的网站| 91黄色免费版| 久久精品免视看| 午夜日韩在线电影| 成人aa视频在线观看| 日韩午夜在线观看视频| 亚洲欧美在线另类| 国精产品一区一区三区mba视频 | 国产欧美一区视频| 亚洲一区二区三区四区不卡| 极品少妇xxxx精品少妇| 欧美在线免费播放| 欧美国产精品专区| 激情综合五月婷婷| 欧美日韩国产小视频在线观看| 国产色产综合色产在线视频| 日韩精品1区2区3区| 91最新地址在线播放| www日韩大片| 视频一区二区不卡| 欧美天堂一区二区三区| 国产精品免费久久| 国产精品资源站在线| 日韩女优毛片在线| 午夜欧美在线一二页| 91精彩视频在线| 亚洲欧洲精品天堂一级| 国产精品自产自拍| 精品福利一二区| 日韩电影在线免费观看| 91成人国产精品| 亚洲精品福利视频网站| 成人午夜大片免费观看| 26uuu精品一区二区在线观看| 日韩电影一区二区三区| 欧美日韩国产综合久久| 一区二区三区在线免费观看| 成人做爰69片免费看网站| 国产拍欧美日韩视频二区| 国产精品一品二品| 日本一区二区三区国色天香| 国产一区二区三区在线观看免费视频 | 91在线国内视频| 国产精品女人毛片| av高清久久久| 亚洲欧美怡红院| 色天天综合色天天久久| 亚洲精品中文字幕在线观看| 97se亚洲国产综合自在线不卡| 亚洲精品日韩一|