亚洲欧美第一页_禁久久精品乱码_粉嫩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一区二区三区免费野_久草精品视频
精品国产精品一区二区夜夜嗨| 国产69精品久久久久毛片| 国产在线精品一区二区不卡了| 欧洲精品视频在线观看| 国产性色一区二区| 麻豆91在线播放免费| 国产精品传媒视频| 18涩涩午夜精品.www| 精品一区二区在线免费观看| 在线观看免费一区| 亚洲国产精品高清| 国产一区二区久久| 欧美成人福利视频| 日日骚欧美日韩| 欧美在线免费播放| 日韩欧美亚洲另类制服综合在线| 欧美成人午夜电影| 图片区小说区区亚洲影院| 99久久精品免费| 国产欧美视频一区二区三区| 久久99精品国产麻豆不卡| 欧美高清视频在线高清观看mv色露露十八| 国产精品嫩草久久久久| 精品福利一二区| 在线视频国内一区二区| 国产精品无遮挡| 国产99久久久国产精品免费看| 欧美一级黄色片| 日日夜夜免费精品视频| 欧美日韩中文精品| 香蕉成人伊视频在线观看| 欧美亚洲国产bt| 一个色在线综合| 在线一区二区三区四区| 亚洲美女视频一区| 在线免费av一区| 亚洲一区二区美女| 欧美午夜片在线观看| 一区二区免费视频| 欧美亚洲一区三区| 亚洲成人av中文| 欧美老女人第四色| 天堂成人免费av电影一区| 3d动漫精品啪啪| 六月丁香婷婷久久| 久久综合九色综合97婷婷女人| 极品少妇xxxx偷拍精品少妇| 日韩免费高清电影| 免费欧美日韩国产三级电影| 日韩欧美在线综合网| 九九**精品视频免费播放| 久久综合九色综合97婷婷女人| 国产九色精品成人porny| 欧美国产日本韩| 91美女片黄在线观看91美女| 一区二区视频在线| 欧美日韩中文国产| 麻豆久久久久久久| 久久老女人爱爱| 成人av中文字幕| 亚洲精品乱码久久久久久黑人| 欧美视频中文一区二区三区在线观看| 天堂av在线一区| 欧美sm极限捆绑bd| 成人午夜大片免费观看| 玉足女爽爽91| 51午夜精品国产| 国产69精品一区二区亚洲孕妇| 亚洲色图20p| 91精品国产综合久久福利| 黑人巨大精品欧美黑白配亚洲| 99久久综合色| ...中文天堂在线一区| 欧美亚洲动漫制服丝袜| 日韩成人一区二区| 久久久久久99久久久精品网站| 成人一区在线看| 亚洲国产一区二区a毛片| 欧美videos大乳护士334| 不卡影院免费观看| 天堂成人国产精品一区| 久久精品夜夜夜夜久久| 在线观看一区日韩| 韩日欧美一区二区三区| 亚洲精品一卡二卡| 欧美大度的电影原声| 成人美女视频在线观看18| 亚洲成人在线免费| 国产三级精品三级在线专区| 欧美手机在线视频| 国产精品一二三四| 亚洲国产人成综合网站| 国产亚洲精品免费| 欧美视频你懂的| 国产精品18久久久久久久网站| 有码一区二区三区| 久久蜜桃av一区精品变态类天堂| 欧美在线视频全部完| 国产麻豆视频一区二区| 亚洲一二三区不卡| 国产欧美日韩视频在线观看| 在线观看91av| 99免费精品在线| 国模娜娜一区二区三区| 亚洲国产综合91精品麻豆| 欧美韩国日本一区| 日韩一区二区精品葵司在线| 色综合久久久久久久| 国产裸体歌舞团一区二区| 天涯成人国产亚洲精品一区av| 国产精品美女久久久久久久| 日韩精品一区国产麻豆| 日本韩国欧美三级| 国产a视频精品免费观看| 美女网站一区二区| 一区二区国产盗摄色噜噜| 国产清纯美女被跳蛋高潮一区二区久久w| 欧美三区在线观看| 99久久99精品久久久久久 | 亚洲国产精品黑人久久久| 成人性生交大片| 免费成人你懂的| 亚洲一区二区视频| 中文字幕中文字幕中文字幕亚洲无线| 欧美成人综合网站| 欧美日韩电影一区| 欧洲精品一区二区三区在线观看| 岛国精品在线观看| 激情五月婷婷综合| 日本一道高清亚洲日美韩| 亚洲资源中文字幕| 亚洲欧美一区二区三区极速播放 | 日韩一区二区三区视频| 欧美图片一区二区三区| av亚洲精华国产精华| 国产99久久久国产精品| 国产真实精品久久二三区| 免费看精品久久片| 丝袜诱惑亚洲看片| 亚洲超碰精品一区二区| 亚洲精品ww久久久久久p站| 中文字幕亚洲综合久久菠萝蜜| 久久久久久久av麻豆果冻| 精品国产青草久久久久福利| 欧美一区二区三区男人的天堂| 欧美日韩在线一区二区| 在线视频一区二区三| 色综合天天性综合| 91亚洲精品久久久蜜桃网站| av高清不卡在线| 99精品热视频| 91美女精品福利| 91丨九色丨国产丨porny| av福利精品导航| 91麻豆蜜桃一区二区三区| 91浏览器打开| 91成人免费在线| 欧美无人高清视频在线观看| 欧美私人免费视频| 777精品伊人久久久久大香线蕉| 欧美熟乱第一页| 911国产精品| 日韩欧美电影一二三| 2017欧美狠狠色| 国产视频一区二区三区在线观看 | 91精品国产欧美一区二区| 日韩一级二级三级| 日韩免费福利电影在线观看| 欧美精品一区二区三区蜜桃视频| 精品国产髙清在线看国产毛片| 精品sm在线观看| 久久久www成人免费毛片麻豆| 久久久不卡影院| 综合av第一页| 亚洲电影第三页| 久久电影网站中文字幕| 国产成人啪午夜精品网站男同| www.欧美精品一二区| 91久久人澡人人添人人爽欧美| 欧美日本精品一区二区三区| 欧美一区二区成人| 久久久亚洲精品一区二区三区| 国产精品美女久久久久久久网站| 一区二区在线观看免费视频播放| 日韩中文字幕区一区有砖一区 | 最新久久zyz资源站| 亚洲一区在线观看免费 | 一区二区三国产精华液| 午夜精品久久久久久不卡8050| 久久精品国产亚洲高清剧情介绍| 国产综合久久久久影院| 99国产精品视频免费观看| 欧美日韩一区二区不卡| 精品久久久久久久久久久久包黑料 | 日韩视频中午一区| 欧美国产精品久久| 一区二区理论电影在线观看| 麻豆成人综合网| 成人app软件下载大全免费| 欧美日韩卡一卡二|