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

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

?? httpmethodbase.java

?? 爬蟲
?? JAVA
?? 第 1 頁 / 共 5 頁
字號:
    }    /**     * Returns the response body of the HTTP method, if any, as a {@link String}.      * If response body is not available or cannot be read, returns <tt>null</tt>     * The string conversion on the data is done using the character encoding specified     * in <tt>Content-Type</tt> header.     *      * Note: This will cause the entire response body to be buffered in memory. A     * malicious server may easily exhaust all the VM memory. It is strongly     * recommended, to use getResponseAsStream if the content length of the response     * is unknown or resonably large.     *      * @return The response body.     *      * @throws IOException If an I/O (transport) problem occurs while obtaining the      * response body.     */    public String getResponseBodyAsString() throws IOException {        byte[] rawdata = null;        if (responseAvailable()) {            rawdata = getResponseBody();        }        if (rawdata != null) {            return EncodingUtil.getString(rawdata, getResponseCharSet());        } else {            return null;        }    }    /**     * Returns an array of the response footers that the HTTP method currently has     * in the order in which they were read.     *     * @return an array of footers     */    public Header[] getResponseFooters() {        return getResponseTrailerHeaderGroup().getAllHeaders();    }    /**     * Gets the response footer associated with the given name.     * Footer name matching is case insensitive.     * <tt>null</tt> will be returned if either <i>footerName</i> is     * <tt>null</tt> or there is no matching footer for <i>footerName</i>     * or there are no footers available.  If there are multiple footers     * with the same name, there values will be combined with the ',' separator     * as specified by RFC2616.     *      * @param footerName the footer name to match     * @return the matching footer     */    public Header getResponseFooter(String footerName) {        if (footerName == null) {            return null;        } else {            return getResponseTrailerHeaderGroup().getCondensedHeader(footerName);        }    }    /**     * Sets the response stream.     * @param responseStream The new response stream.     */    protected void setResponseStream(InputStream responseStream) {        this.responseStream = responseStream;    }    /**     * Returns a stream from which the body of the current response may be read.     * If the method has not yet been executed, if <code>responseBodyConsumed</code>     * has been called, or if the stream returned by a previous call has been closed,     * <code>null</code> will be returned.     *     * @return the current response stream     */    protected InputStream getResponseStream() {        return responseStream;    }        /**     * Returns the status text (or "reason phrase") associated with the latest     * response.     *      * @return The status text.     */    public String getStatusText() {        return statusLine.getReasonPhrase();    }    /**     * Defines how strictly HttpClient follows the HTTP protocol specification       * (RFC 2616 and other relevant RFCs). In the strict mode HttpClient precisely     * implements the requirements of the specification, whereas in non-strict mode      * it attempts to mimic the exact behaviour of commonly used HTTP agents,      * which many HTTP servers expect.     *      * @param strictMode <tt>true</tt> for strict mode, <tt>false</tt> otherwise     *      * @deprecated Use {@link org.apache.commons.httpclient.params.HttpParams#setParameter(String, Object)}     * to exercise a more granular control over HTTP protocol strictness.     */    public void setStrictMode(boolean strictMode) {        if (strictMode) {            this.params.makeStrict();        } else {            this.params.makeLenient();        }    }    /**     * @deprecated Use {@link org.apache.commons.httpclient.params.HttpParams#setParameter(String, Object)}     * to exercise a more granular control over HTTP protocol strictness.     *     * @return <tt>false</tt>     */    public boolean isStrictMode() {        return false;    }    /**     * Adds the specified request header, NOT overwriting any previous value.     * Note that header-name matching is case insensitive.     *     * @param headerName the header's name     * @param headerValue the header's value     */    public void addRequestHeader(String headerName, String headerValue) {        addRequestHeader(new Header(headerName, headerValue));    }    /**     * Tests if the connection should be force-closed when no longer needed.     *      * @return <code>true</code> if the connection must be closed     */    protected boolean isConnectionCloseForced() {        return this.connectionCloseForced;    }    /**     * Sets whether or not the connection should be force-closed when no longer      * needed. This value should only be set to <code>true</code> in abnormal      * circumstances, such as HTTP protocol violations.      *      * @param b <code>true</code> if the connection must be closed, <code>false</code>     * otherwise.     */    protected void setConnectionCloseForced(boolean b) {        if (LOG.isDebugEnabled()) {            LOG.debug("Force-close connection: " + b);        }        this.connectionCloseForced = b;    }    /**     * Tests if the connection should be closed after the method has been executed.     * The connection will be left open when using HTTP/1.1 or if <tt>Connection:      * keep-alive</tt> header was sent.     *      * @param conn the connection in question     *      * @return boolean true if we should close the connection.     */    protected boolean shouldCloseConnection(HttpConnection conn) {        // Connection must be closed due to an abnormal circumstance         if (isConnectionCloseForced()) {            LOG.debug("Should force-close connection.");            return true;        }        Header connectionHeader = null;        // In case being connected via a proxy server        if (!conn.isTransparent()) {            // Check for 'proxy-connection' directive            connectionHeader = responseHeaders.getFirstHeader("proxy-connection");        }        // In all cases Check for 'connection' directive        // some non-complaint proxy servers send it instread of        // expected 'proxy-connection' directive        if (connectionHeader == null) {            connectionHeader = responseHeaders.getFirstHeader("connection");        }        // In case the response does not contain any explict connection        // directives, check whether the request does        if (connectionHeader == null) {            connectionHeader = requestHeaders.getFirstHeader("connection");        }        if (connectionHeader != null) {            if (connectionHeader.getValue().equalsIgnoreCase("close")) {                if (LOG.isDebugEnabled()) {                    LOG.debug("Should close connection in response to directive: "                         + connectionHeader.getValue());                }                return true;            } else if (connectionHeader.getValue().equalsIgnoreCase("keep-alive")) {                if (LOG.isDebugEnabled()) {                    LOG.debug("Should NOT close connection in response to directive: "                         + connectionHeader.getValue());                }                return false;            } else {                if (LOG.isDebugEnabled()) {                    LOG.debug("Unknown directive: " + connectionHeader.toExternalForm());                }            }        }        LOG.debug("Resorting to protocol version default close connection policy");        // missing or invalid connection header, do the default        if (this.effectiveVersion.greaterEquals(HttpVersion.HTTP_1_1)) {            if (LOG.isDebugEnabled()) {                LOG.debug("Should NOT close connection, using " + this.effectiveVersion.toString());            }        } else {            if (LOG.isDebugEnabled()) {                LOG.debug("Should close connection, using " + this.effectiveVersion.toString());            }        }        return this.effectiveVersion.lessEquals(HttpVersion.HTTP_1_0);    }        /**     * Tests if the this method is ready to be executed.     *      * @param state the {@link HttpState state} information associated with this method     * @param conn the {@link HttpConnection connection} to be used     * @throws HttpException If the method is in invalid state.     */    private void checkExecuteConditions(HttpState state, HttpConnection conn)    throws HttpException {        if (state == null) {            throw new IllegalArgumentException("HttpState parameter may not be null");        }        if (conn == null) {            throw new IllegalArgumentException("HttpConnection parameter may not be null");        }        if (this.aborted) {            throw new IllegalStateException("Method has been aborted");        }        if (!validate()) {            throw new ProtocolException("HttpMethodBase object not valid");        }    }    /**     * Executes this method using the specified <code>HttpConnection</code> and     * <code>HttpState</code>.      *     * @param state {@link HttpState state} information to associate with this     *        request. Must be non-null.     * @param conn the {@link HttpConnection connection} to used to execute     *        this HTTP method. Must be non-null.     *     * @return the integer status code if one was obtained, or <tt>-1</tt>     *     * @throws IOException if an I/O (transport) error occurs     * @throws HttpException  if a protocol exception occurs.     */    public int execute(HttpState state, HttpConnection conn)        throws HttpException, IOException {                        LOG.trace("enter HttpMethodBase.execute(HttpState, HttpConnection)");        // this is our connection now, assign it to a local variable so         // that it can be released later        this.responseConnection = conn;        checkExecuteConditions(state, conn);        this.statusLine = null;        this.connectionCloseForced = false;        conn.setLastResponseInputStream(null);        // determine the effective protocol version        if (this.effectiveVersion == null) {            this.effectiveVersion = this.params.getVersion();         }        writeRequest(state, conn);        this.requestSent = true;        readResponse(state, conn);        // the method has successfully executed        used = true;         return statusLine.getStatusCode();    }    /**     * Aborts the execution of this method.     *      * @since 3.0     */    public void abort() {        if (this.aborted) {            return;        }        this.aborted = true;        HttpConnection conn = this.responseConnection;         if (conn != null) {            conn.close();        }    }    /**     * Returns <tt>true</tt> if the HTTP method has been already {@link #execute executed},     * but not {@link #recycle recycled}.     *      * @return <tt>true</tt> if the method has been executed, <tt>false</tt> otherwise     */    public boolean hasBeenUsed() {        return used;    }    /**     * Recycles the HTTP method so that it can be used again.     * Note that all of the instance variables will be reset     * once this method has been called. This method will also     * release the connection being used by this HTTP method.     *      * @see #releaseConnection()     *      * @deprecated no longer supported and will be removed in the future     *             version of HttpClient     */    public void recycle() {        LOG.trace("enter HttpMethodBase.recycle()");        releaseConnection();        path = null;        followRedirects = false;        doAuthentication = true;        queryString = null;        getRequestHeaderGroup().clear();        getResponseHeaderGroup().clear();        getResponseTrailerHeaderGroup().clear();        statusLine = null;        effectiveVersion = null;        aborted = false;        used = false;        params = new HttpMethodParams();        responseBody = null;        recoverableExceptionCount = 0;        connectionCloseForced = false;        hostAuthState.invalidate();        proxyAuthState.invalidate();        cookiespec = null;        requestSent = false;    }    /**     * Releases the connection being used by this HTTP method. In particular the     * connection is used to read the response(if there is one) and will be held     * until the response has been read. If the connection can be reused by other      * HTTP methods it is NOT closed at this point.     *     * @since 2.0     */

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
秋霞影院一区二区| 在线观看亚洲专区| 色综合久久天天| 日韩欧美亚洲国产另类| 国产精品入口麻豆原神| 蜜桃精品在线观看| 日本韩国一区二区| 亚洲国产精品黑人久久久| 日本亚洲视频在线| 91在线国产福利| 国产欧美日韩久久| 久久精品国产久精国产爱| 欧美日韩日日夜夜| 亚洲人123区| av在线综合网| 亚洲国产精品v| 国产一区二区三区精品欧美日韩一区二区三区 | 欧美精品第1页| 亚洲女人****多毛耸耸8| 大胆欧美人体老妇| 一区二区三区影院| 国产成人在线视频免费播放| 欧美一区二区三区在线| 亚洲高清免费观看高清完整版在线观看| 风间由美一区二区av101| 欧美zozo另类异族| 美女网站色91| 精品国产乱码久久久久久夜甘婷婷 | 91精品国产福利在线观看| 一区二区三区在线观看网站| 91麻豆国产香蕉久久精品| 国产精品美女久久久久久2018 | 日本网站在线观看一区二区三区| 在线观看av一区二区| 亚洲精品va在线观看| 色悠悠久久综合| 一区二区三区免费网站| 欧美三级乱人伦电影| 亚洲国产精品一区二区久久恐怖片| 91国产免费看| 天天综合网 天天综合色| 欧美一区二区三区婷婷月色| 久久se精品一区精品二区| 久久影视一区二区| 岛国一区二区三区| 伊人婷婷欧美激情| 欧美精品自拍偷拍动漫精品| 日韩avvvv在线播放| 欧美mv和日韩mv的网站| 国产白丝网站精品污在线入口 | 久久奇米777| 国产91精品在线观看| 亚洲日本中文字幕区| 欧美三级视频在线播放| 日韩不卡一区二区三区 | 狠狠狠色丁香婷婷综合久久五月| 久久久久久99久久久精品网站| 成人一区二区三区在线观看| 亚洲人吸女人奶水| 91麻豆精品国产91久久久久| 国产麻豆视频一区| 洋洋av久久久久久久一区| 日韩欧美你懂的| eeuss影院一区二区三区| 午夜精品久久久久久久久| 精品国产伦一区二区三区观看方式 | 26uuu久久天堂性欧美| 9人人澡人人爽人人精品| 日韩福利电影在线| 国产精品美女久久久久久2018 | 久久精品在线免费观看| 日本道在线观看一区二区| 蜜臀av一区二区在线观看| 1024亚洲合集| 欧美成人一区二区三区| 91麻豆国产精品久久| 老司机午夜精品| 一区二区三区中文字幕精品精品 | 日本中文一区二区三区| 国产精品美女久久久久久| 欧美一区二区不卡视频| 99精品欧美一区| 91国偷自产一区二区三区观看| 日本视频一区二区三区| 中文字幕巨乱亚洲| 欧美电影免费观看高清完整版在线 | 国产精品传媒在线| 日韩欧美在线网站| 欧美色偷偷大香| 不卡电影一区二区三区| 美国十次综合导航| 亚洲国产一区在线观看| 日韩理论电影院| 国产亚洲一区二区三区在线观看 | 国产清纯美女被跳蛋高潮一区二区久久w | 欧美日韩国产高清一区二区三区 | 国产精品国产三级国产普通话蜜臀 | 在线观看视频欧美| 成人av在线看| 久久精品国产澳门| 五月天丁香久久| 一区二区高清在线| 国产精品久久久久国产精品日日| 日韩精品影音先锋| 日韩一区二区三区电影| 欧美色图一区二区三区| 色婷婷精品大视频在线蜜桃视频| 成人午夜激情片| 欧美亚洲日本一区| 日本久久一区二区三区| 色婷婷综合久色| 91在线精品一区二区| av网站一区二区三区| 不卡的av在线播放| 99久久综合精品| 白白色 亚洲乱淫| av电影天堂一区二区在线观看| 成人在线一区二区三区| 成人激情小说网站| 99国产精品国产精品久久| 99精品欧美一区二区三区小说 | 国产传媒日韩欧美成人| 国产成人午夜精品影院观看视频 | 2023国产一二三区日本精品2022| 欧美成人官网二区| ww久久中文字幕| 国产精品人成在线观看免费| 136国产福利精品导航| 亚洲三级在线免费观看| 亚洲一区在线电影| 麻豆中文一区二区| 国产精品一区二区在线观看网站| 国产精品夜夜爽| 91污片在线观看| 欧美丰满嫩嫩电影| 欧美成人video| 国产午夜亚洲精品不卡| 综合久久国产九一剧情麻豆| 亚洲最大的成人av| 久久国产精品露脸对白| 成人做爰69片免费看网站| 色综合 综合色| 91精品国产综合久久精品app| 精品国产91久久久久久久妲己| 国产亚洲人成网站| 一区二区三区精品| 久久精品99国产精品日本| 成人性视频网站| 欧美美女视频在线观看| 久久综合丝袜日本网| 亚洲码国产岛国毛片在线| 日本aⅴ精品一区二区三区| 国产+成+人+亚洲欧洲自线| 欧美午夜精品免费| 久久久蜜臀国产一区二区| 亚洲三级视频在线观看| 久久99久久久欧美国产| av电影在线不卡| 欧美哺乳videos| 亚洲激情自拍偷拍| 在线精品观看国产| 久久久久国产免费免费 | 亚洲三级电影网站| 黑人巨大精品欧美黑白配亚洲| 972aa.com艺术欧美| 精品不卡在线视频| 一区二区三区精品| 成人免费毛片a| 日韩欧美一区在线| 亚洲高清一区二区三区| 国产99精品国产| 欧美成人精品福利| 亚洲第一狼人社区| 99精品欧美一区| 久久久国产精华| 日韩电影网1区2区| 欧美中文字幕久久| 自拍偷拍亚洲激情| 国产福利一区在线| 欧美电视剧在线看免费| 亚洲成人精品一区| 色综合欧美在线视频区| 国产精品视频看| 国产精品99久久久久久久女警| 欧美一区二区人人喊爽| 亚洲成人自拍一区| 欧美亚洲国产一区二区三区va| 中文字幕不卡在线播放| 国产精品综合二区| 久久综合九色综合欧美98| 日韩中文字幕1| 91麻豆精品国产91久久久资源速度 | 99久久精品一区| 国产日韩欧美不卡在线| 国内成+人亚洲+欧美+综合在线| 国产亲近乱来精品视频| 国产在线播放一区| 精品国产伦理网| 国产精品一区免费视频| 国产色产综合产在线视频|