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

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

?? httpconnection.java

?? 爬蟲
?? JAVA
?? 第 1 頁 / 共 4 頁
字號:
/* * $Header: /cvsroot/archive-crawler/ArchiveOpenCrawler/src/java/org/apache/commons/httpclient/HttpConnection.java,v 1.10 2006/08/15 04:38:59 gojomo Exp $ * $Revision: 1.10 $ * $Date: 2006/08/15 04:38:59 $ * * ==================================================================== * *  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.io.BufferedInputStream;import java.io.BufferedOutputStream;import java.io.IOException;import java.io.InputStream;import java.io.InterruptedIOException;import java.io.OutputStream;import java.lang.reflect.Method;import java.net.InetAddress;import java.net.Socket;import java.net.SocketException;import org.apache.commons.httpclient.params.HttpConnectionParams;import org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory;import org.apache.commons.httpclient.protocol.Protocol;import org.apache.commons.httpclient.protocol.ProtocolSocketFactory;import org.apache.commons.httpclient.protocol.SecureProtocolSocketFactory;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;// HERITRIX import.import org.archive.util.HttpRecorder;/** * An abstraction of an HTTP {@link InputStream} and {@link OutputStream} * pair, together with the relevant attributes. * <p> * The following options are set on the socket before getting the input/output  * streams in the {@link #open()} method: * <table border=1><tr> *    <th>Socket Method *    <th>Sockets Option *    <th>Configuration * </tr><tr> *    <td>{@link java.net.Socket#setTcpNoDelay(boolean)} *    <td>SO_NODELAY *    <td>{@link HttpConnectionParams#setTcpNoDelay(boolean)} * </tr><tr> *    <td>{@link java.net.Socket#setSoTimeout(int)} *    <td>SO_TIMEOUT *    <td>{@link HttpConnectionParams#setSoTimeout(int)} * </tr><tr> *    <td>{@link java.net.Socket#setSendBufferSize(int)} *    <td>SO_SNDBUF *    <td>{@link HttpConnectionParams#setSendBufferSize(int)} * </tr><tr> *    <td>{@link java.net.Socket#setReceiveBufferSize(int)} *    <td>SO_RCVBUF *    <td>{@link HttpConnectionParams#setReceiveBufferSize(int)} * </tr></table> * * @author Rod Waldhoff * @author Sean C. Sullivan * @author Ortwin Glueck * @author <a href="mailto:jsdever@apache.org">Jeff Dever</a> * @author <a href="mailto:mbowler@GargoyleSoftware.com">Mike Bowler</a> * @author <a href="mailto:oleg@ural.ru">Oleg Kalnichevski</a> * @author Michael Becke * @author Eric E Johnson * @author Laura Werner *  * @version   $Revision: 1.10 $ $Date: 2006/08/15 04:38:59 $ */public class HttpConnection {    // ----------------------------------------------------------- Constructors    /**     * Creates a new HTTP connection for the given host and port.     *     * @param host the host to connect to     * @param port the port to connect to     */    public HttpConnection(String host, int port) {        this(null, -1, host, null, port, Protocol.getProtocol("http"));    }    /**     * Creates a new HTTP connection for the given host and port     * using the given protocol.     *     * @param host the host to connect to     * @param port the port to connect to     * @param protocol the protocol to use     */    public HttpConnection(String host, int port, Protocol protocol) {        this(null, -1, host, null, port, protocol);    }    /**     * Creates a new HTTP connection for the given host with the virtual      * alias and port using given protocol.     *     * @param host the host to connect to     * @param virtualHost the virtual host requests will be sent to     * @param port the port to connect to     * @param protocol the protocol to use     */    public HttpConnection(String host, String virtualHost, int port, Protocol protocol) {        this(null, -1, host, virtualHost, port, protocol);    }    /**     * Creates a new HTTP connection for the given host and port via the      * given proxy host and port using the default protocol.     *     * @param proxyHost the host to proxy via     * @param proxyPort the port to proxy via     * @param host the host to connect to     * @param port the port to connect to     */    public HttpConnection(        String proxyHost,        int proxyPort,        String host,        int port) {        this(proxyHost, proxyPort, host, null, port, Protocol.getProtocol("http"));    }    /**     * Creates a new HTTP connection for the given host configuration.     *      * @param hostConfiguration the host/proxy/protocol to use     */    public HttpConnection(HostConfiguration hostConfiguration) {        this(hostConfiguration.getProxyHost(),             hostConfiguration.getProxyPort(),             hostConfiguration.getHost(),             hostConfiguration.getPort(),             hostConfiguration.getProtocol());        this.localAddress = hostConfiguration.getLocalAddress();    }    /**     * Creates a new HTTP connection for the given host with the virtual      * alias and port via the given proxy host and port using the given      * protocol.     *      * @param proxyHost the host to proxy via     * @param proxyPort the port to proxy via     * @param host the host to connect to. Parameter value must be non-null.     * @param virtualHost No longer applicable.      * @param port the port to connect to     * @param protocol The protocol to use. Parameter value must be non-null.     *      * @deprecated use #HttpConnection(String, int, String, int, Protocol)     */    public HttpConnection(        String proxyHost,        int proxyPort,        String host,        String virtualHost,        int port,        Protocol protocol) {        this(proxyHost, proxyPort, host, port, protocol);    }    /**     * Creates a new HTTP connection for the given host with the virtual      * alias and port via the given proxy host and port using the given      * protocol.     *      * @param proxyHost the host to proxy via     * @param proxyPort the port to proxy via     * @param host the host to connect to. Parameter value must be non-null.     * @param port the port to connect to     * @param protocol The protocol to use. Parameter value must be non-null.     */    public HttpConnection(        String proxyHost,        int proxyPort,        String host,        int port,        Protocol protocol) {        if (host == null) {            throw new IllegalArgumentException("host parameter is null");        }        if (protocol == null) {            throw new IllegalArgumentException("protocol is null");        }        proxyHostName = proxyHost;        proxyPortNumber = proxyPort;        hostName = host;        portNumber = protocol.resolvePort(port);        protocolInUse = protocol;    }    // ------------------------------------------ Attribute Setters and Getters    /**     * Returns the connection socket.     *     * @return the socket.     *      * @since 3.0     */    protected Socket getSocket() {        return this.socket;    }    /**     * Returns the host.     *     * @return the host.     */    public String getHost() {        return hostName;    }    /**     * Sets the host to connect to.     *     * @param host the host to connect to. Parameter value must be non-null.     * @throws IllegalStateException if the connection is already open     */    public void setHost(String host) throws IllegalStateException {        if (host == null) {            throw new IllegalArgumentException("host parameter is null");        }        assertNotOpen();        hostName = host;    }    /**     * Returns the target virtual host.     *     * @return the virtual host.     *      * @deprecated no longer applicable     */    public String getVirtualHost() {        return this.hostName;    }    /**     * Sets the virtual host to target.     *     * @param host the virtual host name that should be used instead of      *        physical host name when sending HTTP requests. Virtual host      *        name can be set to <tt> null</tt> if virtual host name is not     *        to be used     *      * @throws IllegalStateException if the connection is already open     *      * @deprecated no longer applicable     */    public void setVirtualHost(String host) throws IllegalStateException {        assertNotOpen();    }    /**     * Returns the port of the host.     *     * If the port is -1 (or less than 0) the default port for     * the current protocol is returned.     *     * @return the port.     */    public int getPort() {        if (portNumber < 0) {            return isSecure() ? 443 : 80;        } else {            return portNumber;        }    }    /**     * Sets the port to connect to.     *     * @param port the port to connect to     *      * @throws IllegalStateException if the connection is already open     */    public void setPort(int port) throws IllegalStateException {        assertNotOpen();        portNumber = port;    }    /**     * Returns the proxy host.     *     * @return the proxy host.     */    public String getProxyHost() {        return proxyHostName;    }    /**     * Sets the host to proxy through.     *     * @param host the host to proxy through.     *      * @throws IllegalStateException if the connection is already open     */    public void setProxyHost(String host) throws IllegalStateException {        assertNotOpen();        proxyHostName = host;    }    /**     * Returns the port of the proxy host.     *     * @return the proxy port.     */    public int getProxyPort() {        return proxyPortNumber;    }    /**     * Sets the port of the host to proxy through.     *     * @param port the port of the host to proxy through.     *      * @throws IllegalStateException if the connection is already open

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
26uuu国产电影一区二区| 国产综合色精品一区二区三区| 国产高清不卡一区二区| 久久精品欧美日韩精品| 麻豆一区二区99久久久久| 欧美一级片在线看| 久久99久久99| 久久精品欧美日韩精品 | 亚洲成精国产精品女| 欧美日本国产一区| 久久99久国产精品黄毛片色诱| 国产婷婷色一区二区三区| 99这里只有久久精品视频| 亚洲精品久久久蜜桃| 日韩欧美一区电影| 国产91精品久久久久久久网曝门| 亚洲女同一区二区| 这里只有精品视频在线观看| 国产一区二区调教| 亚洲精品日韩一| 精品三级av在线| 91视频一区二区三区| 日本午夜精品一区二区三区电影| 日本一区二区视频在线| 欧美视频在线不卡| 国产高清无密码一区二区三区| 亚洲狼人国产精品| 亚洲精品一区二区精华| 色欧美日韩亚洲| 紧缚奴在线一区二区三区| 亚洲精品乱码久久久久久久久| 日韩欧美国产精品一区| 色哟哟一区二区| 国产一区二区三区精品欧美日韩一区二区三区 | 亚洲欧美偷拍另类a∨色屁股| 欧美人成免费网站| 99精品国产视频| 久久99精品久久久久久国产越南 | 18欧美亚洲精品| 日韩午夜精品视频| 91在线观看高清| 另类小说图片综合网| 一区二区三区四区不卡视频| 久久久国产一区二区三区四区小说 | 国产精品不卡在线观看| 日韩丝袜情趣美女图片| 色呦呦一区二区三区| 国产精品18久久久久久久久 | 成人欧美一区二区三区黑人麻豆 | 性久久久久久久久久久久| 国产精品嫩草99a| 精品国产三级a在线观看| 欧美天堂亚洲电影院在线播放| 国产麻豆日韩欧美久久| 国产成人av电影在线播放| 日韩成人精品在线观看| 亚洲精品视频观看| 国产精品久久久久久久久免费丝袜 | 国产99久久久国产精品免费看| 日本中文字幕一区二区视频 | 国产亚洲欧美中文| 欧美大片在线观看| 欧美精品丝袜久久久中文字幕| 色综合色狠狠综合色| 99精品国产91久久久久久| 国产成人av资源| 国产精品18久久久久久久网站| 精品一区二区在线视频| 久久99精品网久久| 老司机精品视频在线| 奇米亚洲午夜久久精品| 五月天激情综合| 日韩激情视频在线观看| 天天av天天翘天天综合网色鬼国产| 亚洲精品视频在线| 亚洲一区二区视频在线观看| 一区二区三区色| 亚洲国产成人av网| 亚洲午夜激情av| 日一区二区三区| 老鸭窝一区二区久久精品| 毛片av一区二区三区| 国模冰冰炮一区二区| 国产精品一级二级三级| www.欧美精品一二区| 91在线观看污| 欧美三区在线观看| 欧美一区二区久久| 久久影院电视剧免费观看| 国产视频一区在线播放| 《视频一区视频二区| 一区二区三区四区在线| 日精品一区二区| 精品一区二区日韩| 成人短视频下载| 欧洲视频一区二区| 日韩三级视频在线观看| 久久精品男人天堂av| 亚洲欧洲韩国日本视频| 亚洲高清免费一级二级三级| 日本不卡一区二区三区高清视频| 国模冰冰炮一区二区| 99久久精品99国产精品| 欧美伊人久久久久久久久影院 | 国产精品的网站| 亚洲综合在线视频| 乱一区二区av| www.av亚洲| 欧美日韩日日夜夜| 久久综合色一综合色88| 国产精品高潮呻吟| 日韩成人一区二区| 成人午夜视频免费看| 欧美日韩在线观看一区二区 | 欧美一级精品大片| 欧美激情一区不卡| 亚洲va国产va欧美va观看| 激情综合网av| 欧洲精品在线观看| 久久美女艺术照精彩视频福利播放| 综合中文字幕亚洲| 狠狠色丁香久久婷婷综合丁香| 99r国产精品| 精品成人私密视频| 亚洲图片一区二区| 懂色av一区二区三区蜜臀 | 调教+趴+乳夹+国产+精品| 国产激情一区二区三区四区 | 亚洲第一激情av| 亚洲国产一区二区三区| 高清不卡一二三区| 日韩视频在线一区二区| 亚洲日本va午夜在线电影| 久久国产精品露脸对白| 欧美撒尿777hd撒尿| 中文在线一区二区| 精品中文字幕一区二区| 欧美色偷偷大香| 成人欧美一区二区三区| 国产精品影视网| 日韩精品一区二区三区三区免费| 一区二区在线看| 不卡av在线免费观看| 精品国产乱码久久久久久图片| 亚洲国产精品麻豆| 91色.com| 亚洲图片另类小说| 风间由美一区二区三区在线观看| 日韩亚洲欧美一区二区三区| 亚洲国产成人精品视频| 91浏览器入口在线观看| 日本一区二区三区高清不卡 | 国产福利不卡视频| 日韩欧美中文字幕精品| 丝袜美腿高跟呻吟高潮一区| 色94色欧美sute亚洲线路二| 最新国产成人在线观看| 粉嫩aⅴ一区二区三区四区五区| 欧美大片一区二区| 免费在线观看视频一区| 8x8x8国产精品| 视频一区在线播放| 91精品国产综合久久精品app | 日韩成人av影视| 欧美伊人久久久久久午夜久久久久| 亚洲欧美自拍偷拍| 色综合天天天天做夜夜夜夜做| 中文字幕国产一区二区| av电影一区二区| 日韩一区在线播放| 色婷婷久久综合| 成人性生交大片免费看视频在线 | 欧美国产97人人爽人人喊| 国产精品一区二区你懂的| 久久久久久久久岛国免费| 国产成人一区在线| 日韩伦理电影网| 91国产成人在线| 亚洲chinese男男1069| 欧美一区二区播放| 国产一区免费电影| 国产精品福利影院| 91久久人澡人人添人人爽欧美| 一区二区三区 在线观看视频| 欧美影院一区二区| 美腿丝袜在线亚洲一区| 久久亚洲一区二区三区明星换脸| 国产91精品一区二区麻豆网站| 国产精品国产自产拍在线| 欧美在线免费观看亚洲| 蜜桃精品视频在线| 日本一区二区电影| 欧美亚洲图片小说| 久草中文综合在线| 亚洲欧洲日产国码二区| 欧美影视一区二区三区| 精品一区二区三区免费观看| 国产女人aaa级久久久级| 色婷婷亚洲精品| 黑人巨大精品欧美黑白配亚洲|