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

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

?? cookiespecbase.java

?? 高性能分詞算法
?? JAVA
?? 第 1 頁 / 共 2 頁
字號:
/* * $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//httpclient/src/java/org/apache/commons/httpclient/cookie/CookieSpecBase.java,v 1.28 2004/11/06 19:15:42 mbecke Exp $ * $Revision: 5562 $ * $Date: 2007-11-16 00:53:10 +0000 (Fri, 16 Nov 2007) $ * * ==================================================================== * *  Copyright 2002-2004 The Apache Software Foundation * *  Licensed under the Apache License, Version 2.0 (the "License"); *  you may not use this file except in compliance with the License. *  You may obtain a copy of the License at * *      http://www.apache.org/licenses/LICENSE-2.0 * *  Unless required by applicable law or agreed to in writing, software *  distributed under the License is distributed on an "AS IS" BASIS, *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. *  See the License for the specific language governing permissions and *  limitations under the License. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation.  For more * information on the Apache Software Foundation, please see * <http://www.apache.org/>. * */ package org.apache.commons.httpclient.cookie;import java.util.Collection;import java.util.Date;import java.util.Iterator; // <- IA/HERITRIX CHANGEimport java.util.LinkedList;import java.util.List;import java.util.SortedMap; // <- IA/HERITRIX CHANGEimport org.apache.commons.httpclient.Cookie;import org.apache.commons.httpclient.Header;import org.apache.commons.httpclient.HeaderElement;import org.apache.commons.httpclient.NameValuePair;import org.apache.commons.httpclient.util.DateParseException;import org.apache.commons.httpclient.util.DateUtil;import org.apache.commons.logging.Log;import org.apache.commons.logging.LogFactory;import com.sleepycat.collections.StoredIterator; // <- IA/HERITRIX CHANGE/** *  * Cookie management functions shared by all specification. * * @author  B.C. Holmes * @author <a href="mailto:jericho@thinkfree.com">Park, Sung-Gu</a> * @author <a href="mailto:dsale@us.britannica.com">Doug Sale</a> * @author Rod Waldhoff * @author dIon Gillard * @author Sean C. Sullivan * @author <a href="mailto:JEvans@Cyveillance.com">John Evans</a> * @author Marc A. Saegesser * @author <a href="mailto:oleg@ural.ru">Oleg Kalnichevski</a> * @author <a href="mailto:mbowler@GargoyleSoftware.com">Mike Bowler</a> *  * @since 2.0  */@SuppressWarnings("unchecked") // <- IA/HERITRIX CHANGEpublic class CookieSpecBase implements CookieSpec {        /** Log object */    protected static final Log LOG = LogFactory.getLog(CookieSpec.class);    /** Valid date patterns */    private Collection datepatterns = null;        /** Default constructor */    public CookieSpecBase() {        super();    }    /**      * Parses the Set-Cookie value into an array of <tt>Cookie</tt>s.      *      * <P>The syntax for the Set-Cookie response header is:      *      * <PRE>      * set-cookie      =    "Set-Cookie:" cookies      * cookies         =    1#cookie      * cookie          =    NAME "=" VALUE * (";" cookie-av)      * NAME            =    attr      * VALUE           =    value      * cookie-av       =    "Comment" "=" value      *                 |    "Domain" "=" value      *                 |    "Max-Age" "=" value      *                 |    "Path" "=" value      *                 |    "Secure"      *                 |    "Version" "=" 1*DIGIT      * </PRE>      *      * @param host the host from which the <tt>Set-Cookie</tt> value was      * received      * @param port the port from which the <tt>Set-Cookie</tt> value was      * received      * @param path the path from which the <tt>Set-Cookie</tt> value was      * received      * @param secure <tt>true</tt> when the <tt>Set-Cookie</tt> value was      * received over secure conection      * @param header the <tt>Set-Cookie</tt> received from the server      * @return an array of <tt>Cookie</tt>s parsed from the Set-Cookie value      * @throws MalformedCookieException if an exception occurs during parsing      */    public Cookie[] parse(String host, int port, String path,         boolean secure, final String header)         throws MalformedCookieException {                    LOG.trace("enter CookieSpecBase.parse("             + "String, port, path, boolean, Header)");        if (host == null) {            throw new IllegalArgumentException(                "Host of origin may not be null");        }        if (host.trim().equals("")) {            throw new IllegalArgumentException(                "Host of origin may not be blank");        }        if (port < 0) {            throw new IllegalArgumentException("Invalid port: " + port);        }        if (path == null) {            throw new IllegalArgumentException(                "Path of origin may not be null.");        }        if (header == null) {            throw new IllegalArgumentException("Header may not be null.");        }        if (path.trim().equals("")) {            path = PATH_DELIM;        }        host = host.toLowerCase();        String defaultPath = path;            int lastSlashIndex = defaultPath.lastIndexOf(PATH_DELIM);        if (lastSlashIndex >= 0) {            if (lastSlashIndex == 0) {                //Do not remove the very first slash                lastSlashIndex = 1;            }            defaultPath = defaultPath.substring(0, lastSlashIndex);        }        HeaderElement[] headerElements = null;        boolean isNetscapeCookie = false;         int i1 = header.toLowerCase().indexOf("expires=");        if (i1 != -1) {            i1 += "expires=".length();            int i2 = header.indexOf(";", i1);            if (i2 == -1) {                i2 = header.length();             }            try {                DateUtil.parseDate(header.substring(i1, i2), this.datepatterns);                isNetscapeCookie = true;             } catch (DateParseException e) {                // Does not look like a valid expiry date            }        }        if (isNetscapeCookie) {            headerElements = new HeaderElement[] {                    new HeaderElement(header.toCharArray())            };        } else {            headerElements = HeaderElement.parseElements(header.toCharArray());        }                Cookie[] cookies = new Cookie[headerElements.length];        for (int i = 0; i < headerElements.length; i++) {            HeaderElement headerelement = headerElements[i];            Cookie cookie = null;            try {                cookie = new Cookie(host,                                    headerelement.getName(),                                    headerelement.getValue(),                                    defaultPath,                                     null,                                    false);            } catch (IllegalArgumentException e) {                throw new MalformedCookieException(e.getMessage());             }            // cycle through the parameters            NameValuePair[] parameters = headerelement.getParameters();            // could be null. In case only a header element and no parameters.            if (parameters != null) {                for (int j = 0; j < parameters.length; j++) {                    parseAttribute(parameters[j], cookie);                }            }            cookies[i] = cookie;        }        return cookies;    }    /**      * Parse the <tt>"Set-Cookie"</tt> {@link Header} into an array of {@link      * Cookie}s.      *      * <P>The syntax for the Set-Cookie response header is:      *      * <PRE>      * set-cookie      =    "Set-Cookie:" cookies      * cookies         =    1#cookie      * cookie          =    NAME "=" VALUE * (";" cookie-av)      * NAME            =    attr      * VALUE           =    value      * cookie-av       =    "Comment" "=" value      *                 |    "Domain" "=" value      *                 |    "Max-Age" "=" value      *                 |    "Path" "=" value      *                 |    "Secure"      *                 |    "Version" "=" 1*DIGIT      * </PRE>      *      * @param host the host from which the <tt>Set-Cookie</tt> header was      * received      * @param port the port from which the <tt>Set-Cookie</tt> header was      * received      * @param path the path from which the <tt>Set-Cookie</tt> header was      * received      * @param secure <tt>true</tt> when the <tt>Set-Cookie</tt> header was      * received over secure conection      * @param header the <tt>Set-Cookie</tt> received from the server      * @return an array of <tt>Cookie</tt>s parsed from the <tt>"Set-Cookie"      * </tt> header      * @throws MalformedCookieException if an exception occurs during parsing      */    public Cookie[] parse(        String host, int port, String path, boolean secure, final Header header)        throws MalformedCookieException {                    LOG.trace("enter CookieSpecBase.parse("            + "String, port, path, boolean, String)");        if (header == null) {            throw new IllegalArgumentException("Header may not be null.");        }        return parse(host, port, path, secure, header.getValue());    }    /**      * Parse the cookie attribute and update the corresponsing {@link Cookie}      * properties.      *      * @param attribute {@link HeaderElement} cookie attribute from the      * <tt>Set- Cookie</tt>      * @param cookie {@link Cookie} to be updated      * @throws MalformedCookieException if an exception occurs during parsing      */    public void parseAttribute(        final NameValuePair attribute, final Cookie cookie)        throws MalformedCookieException {                    if (attribute == null) {            throw new IllegalArgumentException("Attribute may not be null.");        }        if (cookie == null) {            throw new IllegalArgumentException("Cookie may not be null.");        }        final String paramName = attribute.getName().toLowerCase();        String paramValue = attribute.getValue();        if (paramName.equals("path")) {            if ((paramValue == null) || (paramValue.trim().equals(""))) {                paramValue = "/";            }            cookie.setPath(paramValue);            cookie.setPathAttributeSpecified(true);        } else if (paramName.equals("domain")) {            if (paramValue == null) {                throw new MalformedCookieException(                    "Missing value for domain attribute");            }            if (paramValue.trim().equals("")) {                throw new MalformedCookieException(                    "Blank value for domain attribute");            }            cookie.setDomain(paramValue);            cookie.setDomainAttributeSpecified(true);        } else if (paramName.equals("max-age")) {            if (paramValue == null) {                throw new MalformedCookieException(                    "Missing value for max-age attribute");            }            int age;            try {                age = Integer.parseInt(paramValue);            } catch (NumberFormatException e) {                throw new MalformedCookieException ("Invalid max-age "                    + "attribute: " + e.getMessage());            }            cookie.setExpiryDate(                new Date(System.currentTimeMillis() + age * 1000L));        } else if (paramName.equals("secure")) {            cookie.setSecure(true);        } else if (paramName.equals("comment")) {            cookie.setComment(paramValue);        } else if (paramName.equals("expires")) {            if (paramValue == null) {                throw new MalformedCookieException(                    "Missing value for expires attribute");            }            try {                cookie.setExpiryDate(DateUtil.parseDate(paramValue, this.datepatterns));            } catch (DateParseException dpe) {                LOG.debug("Error parsing cookie date", dpe);                throw new MalformedCookieException(                    "Unable to parse expiration date parameter: "                     + paramValue);            }        } else {            if (LOG.isDebugEnabled()) {                LOG.debug("Unrecognized cookie attribute: "                     + attribute.toString());            }        }    }        public Collection getValidDateFormats() {        return this.datepatterns;    }    public void setValidDateFormats(final Collection datepatterns) {        this.datepatterns = datepatterns;    }    /**      * Performs most common {@link Cookie} validation      *      * @param host the host from which the {@link Cookie} was received

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美视频中文字幕| 一区二区国产盗摄色噜噜| 亚洲男帅同性gay1069| 天天色综合天天| 国产精品一区二区久激情瑜伽| 91国产丝袜在线播放| 国产视频一区二区三区在线观看| 亚洲成人综合在线| 91网址在线看| 亚洲国产经典视频| 国模冰冰炮一区二区| 欧美日本一区二区在线观看| 中文字幕在线一区二区三区| 国内精品视频666| 91精品国产综合久久久久久| 亚洲欧洲综合另类| 成人av集中营| 久久色成人在线| 天堂久久一区二区三区| 91激情五月电影| 日韩理论在线观看| 9i在线看片成人免费| 国产女人水真多18毛片18精品视频 | 欧美丰满嫩嫩电影| 一区二区三区91| 色av成人天堂桃色av| 亚洲柠檬福利资源导航| 成人av网站在线观看| 国产精品家庭影院| 白白色亚洲国产精品| 国产精品高潮久久久久无| 成熟亚洲日本毛茸茸凸凹| 久久久99久久| 成人一区二区三区中文字幕| 国产欧美视频一区二区| 国产成人久久精品77777最新版本| 精品国产免费久久| 国内久久婷婷综合| 国产欧美一区二区三区鸳鸯浴| 国产一区在线视频| 中文字幕 久热精品 视频在线 | 国产精品日日摸夜夜摸av| 国产91丝袜在线18| 国产精品久久福利| 91一区一区三区| 亚洲一本大道在线| 91麻豆精品国产91久久久更新时间| 亚洲成人午夜影院| 91精品国产欧美一区二区| 久久精品二区亚洲w码| 国产午夜精品一区二区三区嫩草| 成人黄动漫网站免费app| 夜色激情一区二区| 日韩你懂的电影在线观看| 国产不卡在线播放| 一区二区三区四区不卡在线| 欧美三级中文字| 久久66热re国产| 中文字幕精品三区| 欧美日韩亚洲综合一区二区三区| 日本亚洲三级在线| 国产精品久久影院| 欧美视频中文字幕| 国产一区免费电影| 亚洲色图制服丝袜| 日韩一级完整毛片| 北条麻妃国产九九精品视频| 亚洲成av人片一区二区三区| xfplay精品久久| 91色视频在线| 久久爱另类一区二区小说| |精品福利一区二区三区| 欧美一区二区三区婷婷月色| 国产精品99久久久久久有的能看| 一区二区三区毛片| 久久久久国色av免费看影院| 在线中文字幕一区| 国内精品免费在线观看| 亚洲图片欧美综合| 欧美国产精品专区| 欧美福利视频一区| 成人aa视频在线观看| 日韩av电影免费观看高清完整版 | 97久久超碰国产精品电影| 另类小说一区二区三区| 一区二区三区**美女毛片| 欧美高清在线一区二区| 日韩午夜在线观看视频| 91成人看片片| eeuss鲁片一区二区三区在线观看| 亚洲国产成人av好男人在线观看| 国产欧美日韩视频在线观看| 欧美一级片在线看| 欧美亚洲国产一区二区三区| 国产成人精品网址| 久久国产三级精品| 亚洲国产综合人成综合网站| 亚洲欧洲99久久| 国产精品你懂的在线| 国产丝袜欧美中文另类| 久久亚洲精品小早川怜子| 6080午夜不卡| 精品视频免费在线| 99国产精品久久久久久久久久| 国产一区欧美二区| 国产原创一区二区| 久久精品国产色蜜蜜麻豆| 日本va欧美va精品| 免费不卡在线观看| 久久99精品国产麻豆不卡| 天天操天天干天天综合网| 亚洲成人中文在线| 日韩精品一二三四| 偷窥少妇高潮呻吟av久久免费| 洋洋成人永久网站入口| 五月天激情小说综合| 亚洲成国产人片在线观看| 亚洲成av人片www| 日欧美一区二区| 久久不见久久见免费视频1| 极品少妇一区二区| 粉嫩av亚洲一区二区图片| 97精品电影院| 91日韩精品一区| 91麻豆产精品久久久久久| 91麻豆免费在线观看| 欧美日韩中文字幕一区二区| 在线综合亚洲欧美在线视频| 日韩一区二区免费高清| 久久这里只精品最新地址| 1000部国产精品成人观看| 亚洲与欧洲av电影| 麻豆精品久久久| 波多野结衣中文字幕一区| 色综合久久久久久久久| 欧美午夜片在线观看| 日韩一区二区在线播放| 国产视频一区二区在线| 一区二区三区四区在线播放| 日本少妇一区二区| 国产成人精品1024| 在线观看av一区二区| 555www色欧美视频| 久久精品欧美日韩| 夜夜亚洲天天久久| 韩国精品在线观看| 欧洲一区二区三区在线| 精品国精品国产尤物美女| 亚洲人成网站精品片在线观看| 免费精品视频最新在线| 91丝袜呻吟高潮美腿白嫩在线观看| 欧美日韩亚洲综合在线 欧美亚洲特黄一级 | 精品粉嫩超白一线天av| 中文字幕一区二区三区在线观看| 亚洲一区二区三区视频在线播放| 九色综合国产一区二区三区| 91热门视频在线观看| 日韩精品一区二区三区蜜臀| 亚洲激情男女视频| 国产乱子伦一区二区三区国色天香| 在线视频欧美区| 久久久久9999亚洲精品| 香蕉久久夜色精品国产使用方法| 国产精品乡下勾搭老头1| 欧美视频在线播放| 国产精品二三区| 久久99最新地址| 欧美最猛性xxxxx直播| 久久精品免费在线观看| 日韩精品一区第一页| jizz一区二区| 日本一区二区三区在线观看| 日本午夜精品视频在线观看| 色悠悠久久综合| 亚洲男人都懂的| 不卡一区二区三区四区| 精品理论电影在线观看| 亚洲成人精品一区| 91丨porny丨蝌蚪视频| 久久精品免视看| 国产一区二区三区黄视频 | www.色综合.com| 337p粉嫩大胆色噜噜噜噜亚洲 | 亚洲精品亚洲人成人网在线播放| 国产精品88av| 精品国产免费久久| 免费高清在线视频一区·| 欧美视频一区二区在线观看| 亚洲综合色视频| 欧美在线啊v一区| 亚洲国产视频在线| 在线看一区二区| 一区二区三区日韩欧美| 91色porny在线视频| 亚洲精品一二三区| 欧美性生活一区| 丝袜亚洲另类丝袜在线| 欧美一区二区成人| 久久精品理论片| 精品国产麻豆免费人成网站|