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

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

?? httpstate.java

?? 高性能分詞算法
?? JAVA
?? 第 1 頁 / 共 2 頁
字號:
/* * $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//httpclient/src/java/org/apache/commons/httpclient/HttpState.java,v 1.38 2004/12/20 11:50:54 olegk Exp $ * $Revision: 5562 $ * $Date: 2007-11-16 00:53:10 +0000 (Fri, 16 Nov 2007) $ * * ==================================================================== * *  Copyright 1999-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;import java.util.ArrayList;import java.util.Collection; // <- IA/HERITRIX CHANGEimport java.util.Date;import java.util.HashMap;import java.util.Map;import java.util.List;import java.util.Iterator;import java.util.SortedMap; // <- IA/HERITRIX CHANGEimport java.util.TreeMap;   // <- IA/HERITRIX CHANGEimport org.apache.commons.httpclient.cookie.CookieSpec;import org.apache.commons.httpclient.cookie.CookiePolicy;import org.apache.commons.httpclient.auth.AuthScope; import org.apache.commons.logging.Log;import org.apache.commons.logging.LogFactory;import com.sleepycat.collections.StoredIterator; // <- IA/HERITRIX CHANGE/** * <p> * A container for HTTP attributes that may persist from request * to request, such as {@link Cookie cookies} and authentication * {@link Credentials credentials}. * </p> *  * @author <a href="mailto:remm@apache.org">Remy Maucherat</a> * @author Rodney Waldhoff * @author <a href="mailto:jsdever@apache.org">Jeff Dever</a> * @author Sean C. Sullivan * @author <a href="mailto:becke@u.washington.edu">Michael Becke</a> * @author <a href="mailto:oleg@ural.ru">Oleg Kalnichevski</a> * @author <a href="mailto:mbowler@GargoyleSoftware.com">Mike Bowler</a> * @author <a href="mailto:adrian@intencha.com">Adrian Sutton</a> *  * @version $Revision: 5562 $ $Date: 2007-11-16 00:53:10 +0000 (Fri, 16 Nov 2007) $ *  */@SuppressWarnings("unchecked") // <- IA/HERITRIX CHANGEpublic class HttpState {    // ----------------------------------------------------- Instance Variables    /**     * Map of {@link Credentials credentials} by realm that this      * HTTP state contains.     */    private HashMap credMap = new HashMap();    /**     * Map of {@link Credentials proxy credentials} by realm that this     * HTTP state contains     */    private HashMap proxyCred = new HashMap();// BEGIN IA/HERITRIX CHANGES//    /**//     * Array of {@link Cookie cookies} that this HTTP state contains.//     *///    private ArrayList cookiesArrayList = new ArrayList();    /**     * SortedMap of {@link Cookie cookies} that this HTTP state contains.     */    private SortedMap cookiesMap = new TreeMap();// END IA/HERITRIX CHANGES    private boolean preemptive = false;    private int cookiePolicy = -1;        // -------------------------------------------------------- Class Variables    /**     * The boolean system property name to turn on preemptive authentication.     * @deprecated This field and feature will be removed following HttpClient 3.0.     */    public static final String PREEMPTIVE_PROPERTY = "httpclient.authentication.preemptive";    /**     * The default value for {@link #PREEMPTIVE_PROPERTY}.     * @deprecated This field and feature will be removed following HttpClient 3.0.     */    public static final String PREEMPTIVE_DEFAULT = "false";        /** Log object for this class. */    private static final Log LOG = LogFactory.getLog(HttpState.class);    /**     * Default constructor.     */    public HttpState() {        super();    }    // ------------------------------------------------------------- Properties    /**     * Adds an {@link Cookie HTTP cookie}, replacing any existing equivalent cookies.     * If the given cookie has already expired it will not be added, but existing      * values will still be removed.     *      * @param cookie the {@link Cookie cookie} to be added     *      * @see #addCookies(Cookie[])     *      */    public synchronized void addCookie(Cookie cookie) {        LOG.trace("enter HttpState.addCookie(Cookie)");// BEGIN IA/HERITRIX CHANGES// PRIOR IMPL & COMPARISON HARNESS LEFT COMMENTED OUT FOR TEMPORARY REFERENCE//        Cookie removed1 = null;//        Cookie removed2 = null;        if (cookie != null) {            // first remove any old cookie that is equivalent//            for (Iterator it = cookiesArrayList.iterator(); it.hasNext();) {//                Cookie tmp = (Cookie) it.next();//                if (cookie.equals(tmp)) {//                    it.remove();//                    removed1 = tmp;//                    break;//                }//            }            if (!cookie.isExpired()) {//                cookiesArrayList.add(cookie);                cookiesMap.put(cookie.getSortKey(),cookie);            } else {                cookiesMap.remove(cookie.getSortKey());            }        }//        if(removed1!=null && !removed1.equals(removed2)) {//            System.out.println("addCookie discrepancy");//        }// END IA/HERITRIX CHANGES    }    /**     * Adds an array of {@link Cookie HTTP cookies}. Cookies are added individually and      * in the given array order. If any of the given cookies has already expired it will      * not be added, but existing values will still be removed.     *      * @param cookies the {@link Cookie cookies} to be added     *      * @see #addCookie(Cookie)     *      *      */    public synchronized void addCookies(Cookie[] cookies) {        LOG.trace("enter HttpState.addCookies(Cookie[])");        if (cookies != null) {            for (int i = 0; i < cookies.length; i++) {                this.addCookie(cookies[i]);            }        }    }    /**     * Returns an array of {@link Cookie cookies} that this HTTP     * state currently contains.     *      * @return an array of {@link Cookie cookies}.     *      * @see #getCookies(String, int, String, boolean)     *      * @deprecated use getCookiesMap() // <- IA/HERITRIX CHANGE     */    public synchronized Cookie[] getCookies() {        LOG.trace("enter HttpState.getCookies()");// BEGIN IA/HERITRIX CHANGES//      PRIOR IMPL & COMPARISON HARNESS LEFT COMMENTED OUT FOR TEMPORARY REFERENCE//        Cookie[] arrayListAnswer = (Cookie[]) (cookiesArrayList.toArray(new Cookie[cookiesArrayList.size()]));        ArrayList arrayableCookies = new ArrayList();        Iterator iter = cookiesMap.values().iterator();        while(iter.hasNext()) {            arrayableCookies.add(iter.next());    }        StoredIterator.close(iter);        Cookie[] mapAnswer =             (Cookie[]) arrayableCookies.toArray(new Cookie[arrayableCookies.size()]);//        if(cookiesArrayList.size()!=arrayableCookies.size()) {//            System.out.println("discrepancy");//        }        return mapAnswer;// END IA/HERITRIX CHANGES        }// START IA/HERITRIX ADDITIONS    /**     * Returns a sorted map of {@link Cookie cookies} that this HTTP     * state currently contains.     *      * Any operations on this map should be synchronized with respect      * to this HttpState instance.     *      * @return sorter map of {@link Cookie cookies}     */    public synchronized SortedMap getCookiesMap() {        return cookiesMap;    }        /**     * Replace the standard sorted map with an external implemenations      * (such as one backed by persistent store, like BDB's StoredSortedMap.)     *      * @param map alternate sorted map to use to store cookies     */    public synchronized void setCookiesMap(SortedMap map) {        this.cookiesMap = map;    }// END IA/HERITRIX ADDITIONS    /**     * Returns an array of {@link Cookie cookies} in this HTTP      * state that match the given request parameters.     *      * @param domain the request domain     * @param port the request port     * @param path the request path     * @param secure <code>true</code> when using HTTPS     *      * @return an array of {@link Cookie cookies}.     *      * @see #getCookies()     *      * @deprecated use CookieSpec#match(String, int, String, boolean, Cookie)     */    public synchronized Cookie[] getCookies(        String domain,         int port,         String path,         boolean secure    ) {        LOG.trace("enter HttpState.getCookies(String, int, String, boolean)");        CookieSpec matcher = CookiePolicy.getDefaultSpec();// BEGIN IA/HERITRIX CHANGES//      PRIOR IMPL & COMPARISON HARNESS LEFT COMMENTED OUT FOR TEMPORARY REFERENCE//        ArrayList list = new ArrayList(cookiesArrayList.size());//        for (int i = 0, m = cookiesArrayList.size(); i < m; i++) {//            Cookie cookie = (Cookie) (cookiesArrayList.get(i));//            if (matcher.match(domain, port, path, secure, cookie)) {//                list.add(cookie);//            }//        }//        Cookie[] arrayListAnswer = (Cookie[]) (list.toArray(new Cookie[list.size()]));        Cookie[] mapAnswer = matcher.match(domain,port,path,secure,cookiesMap);//        if(! (new HashSet(list).equals(new HashSet(Arrays.asList(mapAnswer))))) {//            System.out.println("discrepancy");//        }        return mapAnswer;// END IA/HERITRIX CHANGES    }    /**     * Removes all of {@link Cookie cookies} in this HTTP state     * that have expired according to the current system time.     *      * @see #purgeExpiredCookies(java.util.Date)     *      */    public synchronized boolean purgeExpiredCookies() {        LOG.trace("enter HttpState.purgeExpiredCookies()");        return purgeExpiredCookies(new Date());    }    /**     * Removes all of {@link Cookie cookies} in this HTTP state     * that have expired by the specified {@link java.util.Date date}.      *      * @param date The {@link java.util.Date date} to compare against.     *      * @return true if any cookies were purged.     *      * @see Cookie#isExpired(java.util.Date)     *      * @see #purgeExpiredCookies()     */    public synchronized boolean purgeExpiredCookies(Date date) {        LOG.trace("enter HttpState.purgeExpiredCookies(Date)");// BEGIN IA/HERITRIX CHANGES//      PRIOR IMPL & COMPARISON HARNESS LEFT COMMENTED OUT FOR TEMPORARY REFERENCE//        boolean arrayRemoved = false;//        Iterator ita = cookiesArrayList.iterator();//        while (ita.hasNext()) {//            if (((Cookie) (ita.next())).isExpired(date)) {//                ita.remove();//                arrayRemoved = true;//            }//        }        boolean removed = false;        Iterator it = cookiesMap.values().iterator();        while (it.hasNext()) {            if (((Cookie) (it.next())).isExpired(date)) {                it.remove();                removed = true;            }        }        StoredIterator.close(it);//        assert removed == arrayRemoved : "discrepancy"     // END IA/HERITRIX CHANGES        return removed;    }    /**     * Returns the current {@link CookiePolicy cookie policy} for this     * HTTP state.     *      * @return The {@link CookiePolicy cookie policy}.     *      * @deprecated Use      *  {@link org.apache.commons.httpclient.params.HttpMethodParams#getCookiePolicy()},     *  {@link HttpMethod#getParams()}.          */        public int getCookiePolicy() {        return this.cookiePolicy;    }        /**     * Defines whether preemptive authentication should be      * attempted.     *      * @param value <tt>true</tt> if preemptive authentication should be      * attempted, <tt>false</tt> otherwise.      * 

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲伦理在线精品| 免费高清在线视频一区·| 欧美日韩高清一区二区| 国产一区二区影院| 亚洲r级在线视频| 欧美经典一区二区三区| 777午夜精品视频在线播放| 99久久伊人网影院| 美国十次综合导航| 亚洲国产日韩a在线播放| 亚洲国产成人午夜在线一区| 欧美变态tickle挠乳网站| 在线中文字幕不卡| 国产高清视频一区| 毛片av一区二区| 亚洲va天堂va国产va久| 国产精品久久777777| 久久精品一区八戒影视| 精品电影一区二区三区| www一区二区| 日韩一区国产二区欧美三区| 欧美揉bbbbb揉bbbbb| 91在线丨porny丨国产| 国产不卡高清在线观看视频| 国产在线精品一区二区| 久久99精品视频| 捆绑变态av一区二区三区| 三级一区在线视频先锋 | 91成人免费在线| 99国产精品久久久久久久久久久 | 亚洲人成伊人成综合网小说| 国产日韩精品一区二区浪潮av | 97久久超碰国产精品电影| 国产伦精品一区二区三区在线观看| 午夜视频在线观看一区二区| 亚洲中国最大av网站| 亚洲激情在线激情| 亚洲欧美日本韩国| 亚洲色图欧洲色图婷婷| 亚洲精品伦理在线| 亚洲精品国产一区二区精华液| 亚洲欧洲日韩在线| 亚洲靠逼com| 亚洲一线二线三线视频| 五月婷婷综合激情| 亚洲成av人片观看| 日韩av网站在线观看| 久久精品国产成人一区二区三区 | 91激情五月电影| 91免费国产视频网站| 一本色道久久综合精品竹菊| 色琪琪一区二区三区亚洲区| 欧美午夜理伦三级在线观看| 欧美日韩国产影片| 日韩精品一区二区三区在线观看| 26uuu亚洲| 国产精品家庭影院| 亚洲综合图片区| 青青国产91久久久久久| 国产精品亚洲一区二区三区妖精 | 91久久一区二区| 欧美日韩精品是欧美日韩精品| 正在播放亚洲一区| 日韩精品一区二区三区在线| 久久久精品黄色| 日韩美女视频一区二区| 亚洲成a人v欧美综合天堂下载| 蜜桃一区二区三区四区| 国产91综合一区在线观看| 一本大道av伊人久久综合| 欧美日韩一卡二卡三卡 | 亚洲国产欧美日韩另类综合| 美女在线一区二区| 国产91丝袜在线播放九色| 色偷偷88欧美精品久久久| 91精品国产综合久久久蜜臀粉嫩| 久久色视频免费观看| 亚洲色图自拍偷拍美腿丝袜制服诱惑麻豆| 一区二区三区在线影院| 久久精品国产久精国产| 99久久综合色| 欧美刺激午夜性久久久久久久| 国产精品人人做人人爽人人添| 午夜激情久久久| 波多野结衣一区二区三区| 欧美一级xxx| 亚洲免费在线看| 国产美女精品在线| 欧美午夜精品电影| 久久久午夜精品| 午夜国产不卡在线观看视频| jizz一区二区| 精品久久久久久久久久久院品网| 最新热久久免费视频| 精品综合久久久久久8888| 色综合天天性综合| 国产丝袜欧美中文另类| 日本中文一区二区三区| 91亚洲男人天堂| 久久久久久久精| 日韩激情一区二区| 色呦呦日韩精品| 国产精品网站在线| 久草精品在线观看| 欧美三级视频在线| 亚洲欧美视频在线观看| 国产一区亚洲一区| 日韩欧美在线网站| 五月婷婷综合在线| 日本道色综合久久| 国产精品成人一区二区艾草| 国产精品性做久久久久久| 3atv在线一区二区三区| 有码一区二区三区| 成人18视频在线播放| 国产午夜精品一区二区三区嫩草| 麻豆91精品91久久久的内涵| 欧美人与z0zoxxxx视频| 一区二区三区精品在线| 91影视在线播放| 最近中文字幕一区二区三区| 丁香五精品蜜臀久久久久99网站| 精品国产伦一区二区三区观看方式| 偷拍与自拍一区| 欧美视频在线播放| 亚洲精品成人在线| 在线视频一区二区三区| 亚洲人成网站在线| 99精品久久99久久久久| 亚洲色图第一区| 色婷婷综合激情| 艳妇臀荡乳欲伦亚洲一区| 色综合一区二区三区| 亚洲人成亚洲人成在线观看图片| 99视频精品在线| 亚洲精品久久嫩草网站秘色| 色嗨嗨av一区二区三区| 一区二区三区四区亚洲| 色综合久久久久综合体| 一区二区三区.www| 欧美性猛交一区二区三区精品| 一区二区三区 在线观看视频| 欧美亚洲综合另类| 午夜精品在线视频一区| 欧美一区三区四区| 紧缚奴在线一区二区三区| 久久综合精品国产一区二区三区| 国产精品77777| 1024成人网色www| 欧美三级一区二区| 美女诱惑一区二区| 国产色一区二区| 97精品电影院| 亚洲va欧美va天堂v国产综合| 日韩一区二区免费电影| 国内精品久久久久影院薰衣草| 久久先锋影音av| 成人av高清在线| 亚洲精品v日韩精品| 91精品国产91热久久久做人人| 国产精品自拍一区| 亚洲欧洲国产日本综合| 欧美日韩国产综合一区二区| 精品在线一区二区三区| 国产精品国产三级国产aⅴ无密码 国产精品国产三级国产aⅴ原创 | 蜜臀av性久久久久蜜臀aⅴ四虎| 精品国产伦一区二区三区免费| 成熟亚洲日本毛茸茸凸凹| 洋洋成人永久网站入口| 精品国产一区二区三区不卡| 成人黄色软件下载| 亚洲国产日韩在线一区模特 | 国产精品成人免费在线| 在线观看日韩av先锋影音电影院| 亚洲一区在线观看视频| 精品裸体舞一区二区三区| 成人va在线观看| 日韩精品一二区| 国产精品私人影院| 欧美精品一二三| 国产91在线观看| 天堂成人免费av电影一区| 国产欧美久久久精品影院| 欧美体内she精高潮| 国产一区二区在线免费观看| 亚洲一区二区三区中文字幕在线| 日韩精品一区二区在线观看| 色综合久久久久| 激情久久五月天| 香蕉加勒比综合久久| 国产精品三级av| 欧美一区二区三区男人的天堂| 91网站最新地址| 国产一区久久久| 手机精品视频在线观看| 国产精品成人免费精品自在线观看 | 国产在线国偷精品免费看| 一区二区三区.www| 欧美国产欧美亚州国产日韩mv天天看完整| 欧美日韩一区久久|