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

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

?? httpstate.java

?? 一個基于lucene&heritrix的搜索引擎
?? JAVA
?? 第 1 頁 / 共 2 頁
字號:
/* * $Header: /cvsroot/archive-crawler/ArchiveOpenCrawler/src/java/org/apache/commons/httpclient/HttpState.java,v 1.1 2005/06/06 17:50:02 gojomo Exp $ * $Revision: 1.1 $ * $Date: 2005/06/06 17:50:02 $ * * ==================================================================== * *  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.Arrays;import java.util.Collection;import java.util.Collections;import java.util.Date;import java.util.HashMap;import java.util.HashSet;import java.util.Map;import java.util.List;import java.util.Iterator;import java.util.SortedMap;import java.util.TreeMap;import 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;/** * <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: 1.1 $ $Date: 2005/06/06 17:50:02 $ *  */public 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 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 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 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);                removed2 = (Cookie) cookiesMap.put(cookie.getSortKey(),cookie);            } else {                removed2 = (Cookie) cookiesMap.remove(cookie.getSortKey());            }        }//        if(removed1!=null && !removed1.equals(removed2)) {//            System.out.println("addCookie discrepancy");//        }// END IA 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()     */    public synchronized Cookie[] getCookies() {        LOG.trace("enter HttpState.getCookies()");// BEGIN IA 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 CHANGES        }    /**     * 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;    }        /**     * 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 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 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 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 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一区二区三区免费野_久草精品视频
亚洲色图在线看| 色诱视频网站一区| 亚洲人一二三区| 99久久伊人精品| 亚洲欧美综合另类在线卡通| 国产精品综合一区二区| 国产亚洲人成网站| 国产91富婆露脸刺激对白| 精品处破学生在线二十三| 国产成人午夜高潮毛片| 亚洲欧美综合色| 欧美精品乱码久久久久久| 国产在线精品一区二区三区不卡 | 色噜噜狠狠色综合欧洲selulu | 91精品国产综合久久久久| 日日嗨av一区二区三区四区| 欧美一区二区女人| jiyouzz国产精品久久| 五月天激情综合| 中文av一区特黄| 欧美日韩国产不卡| 国产成人综合视频| 视频一区二区不卡| 国产精品免费视频观看| 欧美mv日韩mv| 制服丝袜亚洲色图| 99久久综合99久久综合网站| 精品一二三四在线| 免费在线欧美视频| 亚洲第一电影网| 中文字幕一区二区三区色视频| 欧美三级韩国三级日本一级| 色综合久久中文综合久久牛| 国内成+人亚洲+欧美+综合在线 | 欧美v日韩v国产v| 欧美日韩视频在线第一区| 国产自产2019最新不卡| 午夜一区二区三区在线观看| 亚洲手机成人高清视频| 国产精品久久综合| 国产精品久久久久久久久免费丝袜 | 国产一区二区三区四 | 亚洲第一久久影院| 视频一区二区不卡| 久久99精品视频| 懂色av噜噜一区二区三区av| 国产99久久久国产精品| 国产成人免费xxxxxxxx| 91久久精品一区二区三区| 欧美亚洲综合久久| 日韩欧美色电影| 久久综合九色综合久久久精品综合| 欧美一区二区三区视频| 欧美日韩亚洲综合| 色成人在线视频| 91精品国产91热久久久做人人 | 不卡一卡二卡三乱码免费网站| k8久久久一区二区三区| 欧美另类变人与禽xxxxx| 国产免费观看久久| 日韩成人av影视| 蜜桃视频一区二区| 在线视频一区二区免费| 久久久亚洲精华液精华液精华液| 国产精品国产精品国产专区不片 | 亚洲欧美激情小说另类| 国产精品一区二区在线观看网站| 国产精品性做久久久久久| 免费的成人av| 91久久人澡人人添人人爽欧美| 欧美一区二区三区四区在线观看 | 日韩电影在线一区二区三区| 91视频国产观看| 国产精品进线69影院| 国产另类ts人妖一区二区| 日韩一区二区三区高清免费看看| 一区二区三区日本| 欧美日韩免费一区二区三区 | 丁香婷婷综合网| 欧美综合天天夜夜久久| 亚洲国产精品传媒在线观看| 午夜精品久久久久久久99水蜜桃| 成人动漫一区二区| 欧美国产精品v| 亚洲欧美偷拍卡通变态| 91色九色蝌蚪| 午夜精品久久一牛影视| 欧美日韩精品一区二区三区四区 | 欧美日韩国产在线播放网站| 日本成人在线视频网站| 欧美成人性福生活免费看| 狠狠色综合播放一区二区| 久久久天堂av| 91国在线观看| 国产精品羞羞答答xxdd| 一区二区三区在线免费观看 | 国产一区二区三区免费播放| 中文字幕在线一区二区三区| 欧美日本免费一区二区三区| 黄页视频在线91| 亚洲人成影院在线观看| 欧美人与禽zozo性伦| 国产白丝网站精品污在线入口| 国产欧美综合在线观看第十页 | 久久久久国产免费免费| 99视频有精品| 国产麻豆成人传媒免费观看| 免费高清在线一区| 亚洲成年人影院| 亚洲精品免费播放| 亚洲国产精品激情在线观看| 在线不卡a资源高清| 91黄色小视频| 在线观看日韩精品| 欧美日韩aaaaaa| 91视视频在线直接观看在线看网页在线看 | 在线观看视频欧美| 在线观看三级视频欧美| 日本乱人伦一区| av在线播放不卡| 国产美女av一区二区三区| 石原莉奈在线亚洲二区| 一区二区高清免费观看影视大全 | 7777精品久久久大香线蕉| 欧美专区在线观看一区| 欧美一区午夜精品| 欧美亚洲国产一卡| 在线精品视频小说1| 91丨九色丨蝌蚪丨老版| 欧美色爱综合网| 久久一区二区三区四区| 国产精品久久久久久亚洲伦| 亚洲欧美日韩国产成人精品影院| 国产日产欧美一区| 中文字幕综合网| 精品亚洲国内自在自线福利| 成人免费视频一区二区| 在线成人免费视频| 国产精品伦理在线| 亚洲一二三四区不卡| 精品无人码麻豆乱码1区2区 | 久久精工是国产品牌吗| 丰满少妇在线播放bd日韩电影| 欧美体内she精视频| 国产日本欧美一区二区| 蜜臀va亚洲va欧美va天堂| 免费观看一级欧美片| 欧美日韩一区二区在线观看| 欧美高清在线视频| 国产盗摄一区二区| 日韩欧美成人一区二区| 亚洲在线中文字幕| www.久久精品| 欧美一卡二卡三卡四卡| 亚洲欧美激情一区二区| 成人的网站免费观看| 日韩一区二区三| 婷婷中文字幕一区三区| 欧美伊人精品成人久久综合97| 欧美一级日韩免费不卡| 一区二区三区四区视频精品免费| 成人美女视频在线看| 精品国产91洋老外米糕| 美女网站色91| 日韩三级视频在线观看| 日韩精品成人一区二区在线| 91亚洲国产成人精品一区二区三| 欧美色图免费看| 蜜桃精品视频在线观看| 日韩精品一区二区三区四区| 国产精品伊人色| 国产日韩欧美综合在线| 97久久超碰国产精品电影| 国产精品丝袜久久久久久app| 国产·精品毛片| 性久久久久久久| 亚洲视频1区2区| 欧美男男青年gay1069videost| 日韩中文字幕不卡| 久久久久97国产精华液好用吗| 欧美日韩日日摸| 成人亚洲一区二区一| 日韩专区一卡二卡| 中国av一区二区三区| 精品99一区二区| 欧美三级电影网站| 成人动漫视频在线| 丝袜诱惑亚洲看片| 中文字幕一区二区三| 久久麻豆一区二区| 欧美高清精品3d| 91网上在线视频| 91色九色蝌蚪| 欧洲一区二区三区在线| 99久久夜色精品国产网站| 久久激情五月激情| 蜜桃精品视频在线观看| 蜜桃久久av一区| 国产一区二区三区四区五区美女| 久久99精品国产91久久来源|