亚洲欧美第一页_禁久久精品乱码_粉嫩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级毛片一区| 亚洲视频综合在线| 精品视频全国免费看| 国产大陆亚洲精品国产| 国产精品国产三级国产a | 久久精品国产99国产| 亚洲精品在线一区二区| 丁香天五香天堂综合| 亚洲女爱视频在线| 欧美裸体bbwbbwbbw| 国产精品一区一区| 一区二区三区日韩精品视频| 欧美日韩精品一区二区三区四区| 美美哒免费高清在线观看视频一区二区 | 亚洲综合色区另类av| 日韩精品一区二区三区视频在线观看| 国产精品亚洲午夜一区二区三区| 亚洲精品日韩综合观看成人91| 欧美日韩国产免费| 国产在线精品一区二区夜色| 亚洲欧洲在线观看av| 8v天堂国产在线一区二区| 国产成人精品免费视频网站| 亚洲男人的天堂网| 日韩免费观看2025年上映的电影| aaa亚洲精品一二三区| 男人的j进女人的j一区| 国产精品久久久久久一区二区三区 | 亚洲欧美在线aaa| 制服丝袜国产精品| 91国内精品野花午夜精品| 九九在线精品视频| 亚洲不卡av一区二区三区| 欧美国产日产图区| 日韩女优电影在线观看| 色8久久人人97超碰香蕉987| 国产一区久久久| 天堂蜜桃91精品| 亚洲日本欧美天堂| 国产女同性恋一区二区| 91精品国产91久久综合桃花| 91在线视频播放地址| 国产一区二区电影| 另类的小说在线视频另类成人小视频在线 | 激情综合色综合久久| 亚洲国产精品久久久久秋霞影院| 国产女人aaa级久久久级| 日韩一二三四区| 欧美日韩色一区| 色综合欧美在线视频区| 粉嫩一区二区三区性色av| 免费在线观看日韩欧美| 亚洲最大色网站| 亚洲精品写真福利| 美女视频黄a大片欧美| 天天色图综合网| 亚洲一区av在线| 亚洲精品国产品国语在线app| 中文字幕一区二区三区视频| 欧美激情一区在线| 欧美激情一二三区| 欧美韩国日本一区| 国产精品亲子乱子伦xxxx裸| 久久久久国产一区二区三区四区| 日韩视频免费观看高清完整版| 欧美精品18+| 91麻豆精品国产91久久久久| 欧美精品一卡二卡| 日韩欧美一区在线| 欧美一卡在线观看| 日韩一级成人av| 精品99久久久久久| 国产欧美日韩在线| 国产精品久久久久aaaa| 亚洲乱码国产乱码精品精小说 | 成人免费高清在线观看| 国产盗摄一区二区| 99久久精品国产一区| 色av一区二区| 在线免费一区三区| 8x8x8国产精品| 久久蜜桃av一区二区天堂| 中文字幕精品一区二区精品绿巨人| 久久精品一级爱片| 日韩一区在线播放| 亚洲综合在线视频| 免费xxxx性欧美18vr| 韩国三级中文字幕hd久久精品| 国产精品99久久久久久久vr | 亚洲乱码中文字幕| 日韩激情一二三区| 国产精品888| 91浏览器打开| 91精品国产色综合久久不卡电影 | 欧美丰满高潮xxxx喷水动漫| 日韩三级伦理片妻子的秘密按摩| 久久久久高清精品| 亚洲欧美视频在线观看视频| 丝袜亚洲另类欧美| 国产一区二区0| 欧洲av一区二区嗯嗯嗯啊| 欧美一级黄色大片| 国产精品美女www爽爽爽| 亚洲午夜在线电影| 国产毛片精品视频| 91黄色免费网站| 久久综合av免费| 亚洲人成精品久久久久久| 日韩成人av影视| 成人app软件下载大全免费| 欧美最新大片在线看| 精品av久久707| 亚洲一区二区三区四区中文字幕| 国产资源精品在线观看| 日本高清不卡视频| 久久久亚洲精华液精华液精华液| 尤物av一区二区| 欧美色综合网站| 国产日韩欧美精品在线| 五月婷婷色综合| 91丨porny丨首页| 久久蜜桃香蕉精品一区二区三区| 一级特黄大欧美久久久| 国产精品一区二区在线观看不卡| 欧美日韩免费视频| 国产精品国产自产拍高清av| 九九**精品视频免费播放| 色狠狠av一区二区三区| 日本一区二区三区国色天香 | 一区二区三区在线视频观看58 | 日韩国产欧美在线播放| 99久久久精品免费观看国产蜜| 337p粉嫩大胆噜噜噜噜噜91av| 亚洲国产综合人成综合网站| 99久久精品国产观看| 久久毛片高清国产| 久久疯狂做爰流白浆xx| 欧美中文字幕不卡| 一区二区视频在线看| 成人午夜激情在线| 久久精品网站免费观看| 国产真实精品久久二三区| 欧美福利视频导航| 午夜激情一区二区三区| 一本大道av伊人久久综合| 国产精品久久三| 成人黄色免费短视频| 久久在线观看免费| 精品一区二区国语对白| 日韩美女一区二区三区四区| 丝袜诱惑亚洲看片| 欧美一级国产精品| 免费在线观看一区二区三区| 欧美一三区三区四区免费在线看| 亚洲3atv精品一区二区三区| 欧美日韩一区不卡| 亚洲高清在线精品| 欧美人牲a欧美精品| 亚洲高清视频在线| 69堂亚洲精品首页| 免费在线观看一区| 精品国产精品网麻豆系列| 狠狠色丁香婷综合久久| 久久精品一区八戒影视| 成人高清视频在线| 中文字幕在线一区| 91蜜桃免费观看视频| 一区二区三区精品视频在线| 日本韩国欧美在线| 三级一区在线视频先锋 | 粉嫩av亚洲一区二区图片| 欧美国产成人精品| 99国产精品久久久| 一区二区三区免费在线观看| 在线观看不卡一区| 日本色综合中文字幕| 精品国产乱码久久| 风流少妇一区二区| 亚洲激情欧美激情| 欧美精品九九99久久| 紧缚奴在线一区二区三区| 国产女主播视频一区二区| 91视频观看视频| 亚洲午夜精品在线| 精品1区2区在线观看| 不卡av电影在线播放| 亚洲影视在线观看| 精品国产免费一区二区三区香蕉| 国产一区不卡在线| 18成人在线观看| 69堂亚洲精品首页| 成人性生交大合| 午夜天堂影视香蕉久久| 久久午夜电影网|