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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? httpmethodbase.java

?? Light in the box 抓取程序。 使用HttpClient
?? JAVA
?? 第 1 頁 / 共 5 頁
字號:
/* * $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//httpclient/src/java/org/apache/commons/httpclient/HttpMethodBase.java,v 1.222 2005/01/14 21:16:40 olegk Exp $ * $Revision: 539441 $ * $Date: 2007-05-18 14:56:55 +0200 (Fri, 18 May 2007) $ * * ==================================================================== * *  Licensed to the Apache Software Foundation (ASF) under one or more *  contributor license agreements.  See the NOTICE file distributed with *  this work for additional information regarding copyright ownership. *  The ASF licenses this file to You 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.io.ByteArrayInputStream;import java.io.ByteArrayOutputStream;import java.io.IOException;import java.io.InputStream;import java.io.InterruptedIOException;import java.util.Collection;import org.apache.commons.httpclient.auth.AuthState;import org.apache.commons.httpclient.cookie.CookiePolicy;import org.apache.commons.httpclient.cookie.CookieSpec;import org.apache.commons.httpclient.cookie.CookieVersionSupport;import org.apache.commons.httpclient.cookie.MalformedCookieException;import org.apache.commons.httpclient.params.HttpMethodParams;import org.apache.commons.httpclient.protocol.Protocol;import org.apache.commons.httpclient.util.EncodingUtil;import org.apache.commons.httpclient.util.ExceptionUtil;import org.apache.commons.logging.Log;import org.apache.commons.logging.LogFactory;/** * An abstract base implementation of HttpMethod. * <p> * At minimum, subclasses will need to override: * <ul> *   <li>{@link #getName} to return the approriate name for this method *   </li> * </ul> * </p> * * <p> * When a method requires additional request headers, subclasses will typically * want to override: * <ul> *   <li>{@link #addRequestHeaders addRequestHeaders(HttpState,HttpConnection)} *      to write those headers *   </li> * </ul> * </p> * * <p> * When a method expects specific response headers, subclasses may want to * override: * <ul> *   <li>{@link #processResponseHeaders processResponseHeaders(HttpState,HttpConnection)} *     to handle those headers *   </li> * </ul> * </p> * * * @author <a href="mailto:remm@apache.org">Remy Maucherat</a> * @author Rodney Waldhoff * @author Sean C. Sullivan * @author <a href="mailto:dion@apache.org">dIon Gillard</a> * @author <a href="mailto:jsdever@apache.org">Jeff Dever</a> * @author <a href="mailto:dims@apache.org">Davanum Srinivas</a> * @author Ortwin Glueck * @author Eric Johnson * @author Michael Becke * @author <a href="mailto:oleg@ural.ru">Oleg Kalnichevski</a> * @author <a href="mailto:mbowler@GargoyleSoftware.com">Mike Bowler</a> * @author <a href="mailto:ggregory@seagullsw.com">Gary Gregory</a> * @author Christian Kohlschuetter * * @version $Revision: 539441 $ $Date: 2007-05-18 14:56:55 +0200 (Fri, 18 May 2007) $ */public abstract class HttpMethodBase implements HttpMethod {    // -------------------------------------------------------------- Constants    /** Log object for this class. */    private static final Log LOG = LogFactory.getLog(HttpMethodBase.class);    // ----------------------------------------------------- Instance variables     /** Request headers, if any. */    private HeaderGroup requestHeaders = new HeaderGroup();    /** The Status-Line from the response. */    protected StatusLine statusLine = null;    /** Response headers, if any. */    private HeaderGroup responseHeaders = new HeaderGroup();    /** Response trailer headers, if any. */    private HeaderGroup responseTrailerHeaders = new HeaderGroup();    /** Path of the HTTP method. */    private String path = null;    /** Query string of the HTTP method, if any. */    private String queryString = null;    /** The response body of the HTTP method, assuming it has not be      * intercepted by a sub-class. */    private InputStream responseStream = null;    /** The connection that the response stream was read from. */    private HttpConnection responseConnection = null;    /** Buffer for the response */    private byte[] responseBody = null;    /** True if the HTTP method should automatically follow HTTP redirects.*/    private boolean followRedirects = false;    /** True if the HTTP method should automatically handle    *  HTTP authentication challenges. */    private boolean doAuthentication = true;    /** HTTP protocol parameters. */    private HttpMethodParams params = new HttpMethodParams();    /** Host authentication state */    private AuthState hostAuthState = new AuthState();    /** Proxy authentication state */    private AuthState proxyAuthState = new AuthState();    /** True if this method has already been executed. */    private boolean used = false;    /** Count of how many times did this HTTP method transparently handle     * a recoverable exception. */    private int recoverableExceptionCount = 0;    /** the host for this HTTP method, can be null */    private HttpHost httphost = null;    /**     * Handles method retries     *      * @deprecated no loner used     */    private MethodRetryHandler methodRetryHandler;    /** True if the connection must be closed when no longer needed */    private boolean connectionCloseForced = false;    /** Number of milliseconds to wait for 100-contunue response. */    private static final int RESPONSE_WAIT_TIME_MS = 3000;    /** HTTP protocol version used for execution of this method. */    protected HttpVersion effectiveVersion = null;    /** Whether the execution of this method has been aborted */    private volatile boolean aborted = false;    /** Whether the HTTP request has been transmitted to the target     * server it its entirety */    private boolean requestSent = false;        /** Actual cookie policy */    private CookieSpec cookiespec = null;    /** Default initial size of the response buffer if content length is unknown. */    private static final int DEFAULT_INITIAL_BUFFER_SIZE = 4*1024; // 4 kB        // ----------------------------------------------------------- Constructors    /**     * No-arg constructor.     */    public HttpMethodBase() {    }    /**     * Constructor specifying a URI.     * It is responsibility of the caller to ensure that URI elements     * (path & query parameters) are properly encoded (URL safe).     *     * @param uri either an absolute or relative URI. The URI is expected     *            to be URL-encoded     *      * @throws IllegalArgumentException when URI is invalid     * @throws IllegalStateException when protocol of the absolute URI is not recognised     */    public HttpMethodBase(String uri)         throws IllegalArgumentException, IllegalStateException {        try {            // create a URI and allow for null/empty uri values            if (uri == null || uri.equals("")) {                uri = "/";            }            String charset = getParams().getUriCharset();            setURI(new URI(uri, true, charset));        } catch (URIException e) {            throw new IllegalArgumentException("Invalid uri '"                 + uri + "': " + e.getMessage()             );        }    }    // ------------------------------------------- Property Setters and Getters    /**     * Obtains the name of the HTTP method as used in the HTTP request line,     * for example <tt>"GET"</tt> or <tt>"POST"</tt>.     *      * @return the name of this method     */    public abstract String getName();    /**     * Returns the URI of the HTTP method     *      * @return The URI     *      * @throws URIException If the URI cannot be created.     *      * @see org.apache.commons.httpclient.HttpMethod#getURI()     */    public URI getURI() throws URIException {        StringBuffer buffer = new StringBuffer();        if (this.httphost != null) {            buffer.append(this.httphost.getProtocol().getScheme());            buffer.append("://");            buffer.append(this.httphost.getHostName());            int port = this.httphost.getPort();            if (port != -1 && port != this.httphost.getProtocol().getDefaultPort()) {                buffer.append(":");                buffer.append(port);            }        }        buffer.append(this.path);        if (this.queryString != null) {            buffer.append('?');            buffer.append(this.queryString);        }        String charset = getParams().getUriCharset();        return new URI(buffer.toString(), true, charset);    }    /**     * Sets the URI for this method.      *      * @param uri URI to be set      *      * @throws URIException if a URI cannot be set     *      * @since 3.0     */    public void setURI(URI uri) throws URIException {        // only set the host if specified by the URI        if (uri.isAbsoluteURI()) {            this.httphost = new HttpHost(uri);        }        // set the path, defaulting to root        setPath(            uri.getPath() == null            ? "/"            : uri.getEscapedPath()        );        setQueryString(uri.getEscapedQuery());    }     /**     * Sets whether or not the HTTP method should automatically follow HTTP redirects      * (status code 302, etc.)     *      * @param followRedirects <tt>true</tt> if the method will automatically follow redirects,     * <tt>false</tt> otherwise.     */    public void setFollowRedirects(boolean followRedirects) {        this.followRedirects = followRedirects;    }    /**     * Returns <tt>true</tt> if the HTTP method should automatically follow HTTP redirects      * (status code 302, etc.), <tt>false</tt> otherwise.     *      * @return <tt>true</tt> if the method will automatically follow HTTP redirects,      * <tt>false</tt> otherwise.     */    public boolean getFollowRedirects() {        return this.followRedirects;    }    /** Sets whether version 1.1 of the HTTP protocol should be used per default.     *     * @param http11 <tt>true</tt> to use HTTP/1.1, <tt>false</tt> to use 1.0     *      * @deprecated Use {@link HttpMethodParams#setVersion(HttpVersion)}     */    public void setHttp11(boolean http11) {        if (http11) {            this.params.setVersion(HttpVersion.HTTP_1_1);        } else {            this.params.setVersion(HttpVersion.HTTP_1_0);        }     }    /**     * Returns <tt>true</tt> if the HTTP method should automatically handle HTTP      * authentication challenges (status code 401, etc.), <tt>false</tt> otherwise     *     * @return <tt>true</tt> if authentication challenges will be processed      * automatically, <tt>false</tt> otherwise.     *      * @since 2.0     */    public boolean getDoAuthentication() {        return doAuthentication;    }    /**     * Sets whether or not the HTTP method should automatically handle HTTP      * authentication challenges (status code 401, etc.)     *     * @param doAuthentication <tt>true</tt> to process authentication challenges     * authomatically, <tt>false</tt> otherwise.     *      * @since 2.0     */    public void setDoAuthentication(boolean doAuthentication) {        this.doAuthentication = doAuthentication;    }    // ---------------------------------------------- Protected Utility Methods    /**

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
一本色道久久综合亚洲aⅴ蜜桃 | 中文字幕免费一区| 亚洲综合在线电影| 黄页视频在线91| 欧美精品国产精品| 亚洲精品国产精华液| 精品亚洲欧美一区| 欧美精品视频www在线观看| 国产精品久久久久永久免费观看 | 亚洲国产视频在线| 99精品在线观看视频| 国产人久久人人人人爽| 极品瑜伽女神91| 日韩一区二区三区免费看| 亚洲国产日韩综合久久精品| 91在线丨porny丨国产| 国产蜜臀97一区二区三区| 狠狠色丁香久久婷婷综| 欧美一区二区三区在线| 性做久久久久久免费观看 | 日韩欧美一二区| 日本不卡一区二区三区高清视频| 色噜噜狠狠色综合中国| 国产精品久久久久久久久快鸭| 国产一区在线看| 精品国产污污免费网站入口| 久久精品99久久久| 日韩欧美黄色影院| 裸体歌舞表演一区二区| 日韩一级视频免费观看在线| 日本一区中文字幕| 欧美一区二区三区喷汁尤物| 日韩精品电影一区亚洲| 欧美一区欧美二区| 精品综合久久久久久8888| 欧美精品一区二区不卡| 国产久卡久卡久卡久卡视频精品| 精品欧美一区二区久久| 国产剧情一区在线| 国产精品电影院| 91在线视频播放地址| 亚洲综合免费观看高清完整版在线| 色综合中文字幕国产| 亚洲午夜在线观看视频在线| 欧美久久一二三四区| 麻豆一区二区在线| 久久噜噜亚洲综合| 色综合久久综合中文综合网| 亚洲自拍偷拍麻豆| 91精品国产综合久久香蕉的特点| 美国十次了思思久久精品导航| 日韩精品一区二区三区视频播放 | 国产一区二区不卡老阿姨| 国产清纯白嫩初高生在线观看91| 成人免费黄色大片| 亚洲成人免费影院| 欧美岛国在线观看| 9i在线看片成人免费| 五月婷婷色综合| 欧美在线视频你懂得| 日韩电影在线免费观看| 国产午夜精品一区二区| 欧美视频日韩视频在线观看| 经典三级视频一区| 亚洲一二三四区| 久久久久久一二三区| 在线观看中文字幕不卡| 国产专区综合网| 一区二区高清视频在线观看| 欧美v日韩v国产v| 色哟哟欧美精品| 精品一区二区三区在线播放视频| 国产精品美日韩| 日韩欧美精品在线视频| 91国偷自产一区二区三区成为亚洲经典| 日韩中文字幕区一区有砖一区 | 激情欧美一区二区| 亚洲一区二区高清| 中文一区一区三区高中清不卡| 欧美日韩一区二区不卡| 成人av在线影院| 免费精品视频最新在线| 亚洲一区影音先锋| 国产精品美女一区二区三区| 欧美白人最猛性xxxxx69交| 欧美最猛性xxxxx直播| 成人免费黄色大片| 极品少妇一区二区三区精品视频| 亚洲国产精品久久久久秋霞影院 | 91啦中文在线观看| 国产在线视频精品一区| 日韩电影在线观看一区| 亚洲综合成人在线视频| 亚洲色欲色欲www| 日本一区二区三区在线不卡| 日韩欧美国产麻豆| 欧美丰满少妇xxxbbb| 色吧成人激情小说| 91免费在线视频观看| 波多野结衣精品在线| 国产+成+人+亚洲欧洲自线| 精品一区二区综合| 九色综合狠狠综合久久| 麻豆极品一区二区三区| 看电视剧不卡顿的网站| 首页综合国产亚洲丝袜| 舔着乳尖日韩一区| 亚洲国产一区视频| 午夜精品久久久久久久99水蜜桃| 亚洲欧美日韩电影| 亚洲黄色av一区| 亚洲资源在线观看| 亚洲国产人成综合网站| 亚洲国产日日夜夜| 蜜臀久久99精品久久久画质超高清| 亚洲一区二区美女| 爽好多水快深点欧美视频| 日韩精品一二三| 蜜桃视频在线一区| 精品一区二区在线免费观看| 精品一区二区三区日韩| 国产精品99久久久久久久女警| 国产91精品一区二区麻豆亚洲| 国产精品99久久久久久有的能看 | 经典三级在线一区| 国产不卡视频一区| 99久久久免费精品国产一区二区| 色噜噜狠狠成人中文综合| 欧美精品视频www在线观看| 欧美一激情一区二区三区| 精品动漫一区二区三区在线观看| 久久久久久久久久久黄色| 中文字幕制服丝袜一区二区三区| 亚洲欧美一区二区三区国产精品 | 亚洲精品中文字幕乱码三区 | 91精品国产美女浴室洗澡无遮挡| 91精品国产综合久久香蕉的特点| 精品福利视频一区二区三区| 欧美极品美女视频| 亚洲一线二线三线视频| 久久精品久久精品| 99re热这里只有精品视频| 欧美剧情片在线观看| 国产丝袜在线精品| 亚洲成人动漫一区| 国产乱子轮精品视频| 色综合色狠狠天天综合色| 日韩精品中文字幕一区| 亚洲免费三区一区二区| 蜜桃精品视频在线| 91猫先生在线| 久久久一区二区三区| 亚洲无人区一区| 国产成人精品一区二区三区四区| 在线观看国产91| 337p粉嫩大胆色噜噜噜噜亚洲| 亚洲精品日日夜夜| 久久国产精品色婷婷| 欧美亚洲日本国产| 久久久久久久性| 亚洲成人免费视频| 91在线视频在线| 久久理论电影网| 免费在线看成人av| 色综合久久久网| 精品福利一区二区三区| 亚洲午夜日本在线观看| 成人一区在线看| 欧美成人bangbros| 三级亚洲高清视频| 91啪亚洲精品| 欧美激情一区三区| 国内精品国产成人| 日韩午夜av电影| 亚洲成av人片www| 91伊人久久大香线蕉| 久久久www成人免费无遮挡大片 | 成人综合日日夜夜| 欧美精品一区二区三区蜜桃视频 | 亚洲精品视频在线| 成人性生交大片免费看视频在线| 欧美一级免费观看| 亚洲成人av福利| 欧美伊人精品成人久久综合97| 中文字幕高清一区| 国产成人夜色高潮福利影视| 日韩精品一区二区三区swag| 午夜亚洲福利老司机| 欧美性大战久久久久久久蜜臀| 国产精品家庭影院| 成a人片亚洲日本久久| 国产日韩影视精品| 国产成人精品午夜视频免费| 久久精品这里都是精品| 国产精品一区二区三区四区| 久久久久久夜精品精品免费| 国产精品自拍毛片| 国产亚洲污的网站| 国产成人在线看| 中文字幕制服丝袜成人av|