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

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

?? httpconnection.java

?? Light in the box 抓取程序。 使用HttpClient
?? JAVA
?? 第 1 頁 / 共 4 頁
字號:
/* * $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//httpclient/src/java/org/apache/commons/httpclient/HttpConnection.java,v 1.107 2005/01/14 21:30:59 olegk Exp $ * $Revision: 480424 $ * $Date: 2006-11-29 06:56:49 +0100 (Wed, 29 Nov 2006) $ * * ==================================================================== * *  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.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.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;/** * 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: 480424 $ $Date: 2006-11-29 06:56:49 +0100 (Wed, 29 Nov 2006) $ */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.     *

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产一区二区在线观看视频| 在线国产电影不卡| 一区二区在线看| 欧美成人精品二区三区99精品| 不卡一区二区三区四区| 日韩av一区二区在线影视| 成人欧美一区二区三区| 日韩无一区二区| 在线视频欧美精品| 国产成人免费视频网站高清观看视频| 亚洲国产综合91精品麻豆| 国产精品麻豆99久久久久久| 91麻豆精品国产91久久久久久久久 | 中文字幕一区二区三区在线播放| 欧美精品丝袜中出| 99精品国产热久久91蜜凸| 国产一区二三区| 免费看欧美美女黄的网站| 亚洲精品欧美激情| 亚洲青青青在线视频| 中文字幕国产精品一区二区| 精品国产自在久精品国产| 91精品办公室少妇高潮对白| 高清免费成人av| 国产一区二区在线电影| 激情伊人五月天久久综合| 日韩精品成人一区二区在线| 一区二区三区四区在线播放| 一区视频在线播放| 国产精品理伦片| 国产日韩欧美a| 久久亚洲捆绑美女| 亚洲精品一区二区三区在线观看 | 亚洲第一久久影院| 亚洲欧美日韩在线| 中文字幕一区二区三区乱码在线| 久久综合九色综合97婷婷女人 | 日韩视频在线你懂得| 5566中文字幕一区二区电影| 欧美午夜影院一区| 欧美三区在线视频| 在线不卡a资源高清| 欧美二区在线观看| 欧美一区二区私人影院日本| 日韩亚洲欧美一区| 欧美成人一区二区三区片免费| 欧美电影免费观看高清完整版| 日韩欧美中文字幕精品| 日韩精品中文字幕在线一区| 日韩精品一区二区三区视频| 久久久国产精品麻豆| 久久久精品天堂| 国产精品久久久久影院| 亚洲情趣在线观看| 一区二区三区精密机械公司| 一区二区三区日韩欧美| 亚洲国产美国国产综合一区二区| 亚洲bdsm女犯bdsm网站| 婷婷开心久久网| 久久69国产一区二区蜜臀| 久久97超碰色| 99热这里都是精品| 欧美精品 国产精品| 欧美va亚洲va香蕉在线| 欧美激情艳妇裸体舞| 亚洲卡通动漫在线| 日本欧美一区二区三区| 韩国成人福利片在线播放| 不卡的av电影| 欧美日韩国产大片| 日韩一区二区三区电影 | 国产日本欧洲亚洲| 亚洲你懂的在线视频| 日韩国产高清在线| 国产大陆亚洲精品国产| 欧美影视一区在线| 久久亚洲二区三区| 亚洲卡通欧美制服中文| 蜜桃久久精品一区二区| 成人av电影在线观看| 欧美日本韩国一区二区三区视频 | 欧美一区二区视频网站| 成人免费一区二区三区在线观看| 乱中年女人伦av一区二区| 韩国女主播成人在线观看| 高清不卡在线观看| 欧美乱妇20p| 久久综合一区二区| 亚洲在线视频免费观看| 国产在线麻豆精品观看| 国产在线视频不卡二| 日韩网站在线看片你懂的| 欧美男女性生活在线直播观看| 欧美性淫爽ww久久久久无| 26uuu国产电影一区二区| 一区二区三区av电影| 风流少妇一区二区| 欧美一区二区视频在线观看| 亚洲日本va在线观看| 看国产成人h片视频| 色老汉一区二区三区| 久久精品一区二区| 免费在线成人网| 欧美在线免费观看亚洲| 久久精子c满五个校花| 成人精品在线视频观看| 日韩精品一级中文字幕精品视频免费观看 | 91在线一区二区| 久久综合五月天婷婷伊人| 午夜精品一区二区三区电影天堂| 国产91在线|亚洲| 精品剧情v国产在线观看在线| 亚洲综合免费观看高清在线观看| 粉嫩13p一区二区三区| 久久久国产综合精品女国产盗摄| 日韩高清国产一区在线| 欧美性受xxxx黑人xyx| 最新不卡av在线| 成人国产精品免费观看动漫| 久久久久久免费毛片精品| 日韩av中文在线观看| 欧美精品久久天天躁| 亚洲精品成人精品456| 99热99精品| 国产精品国产馆在线真实露脸| 国产盗摄女厕一区二区三区 | 亚洲女人的天堂| 538prom精品视频线放| 欧美高清一级片在线| 亚洲综合999| 在线视频一区二区三区| 亚洲自拍另类综合| 欧美怡红院视频| 亚洲成人av一区二区三区| 欧美色视频在线| 亚洲大尺度视频在线观看| 在线观看三级视频欧美| 亚洲一区二区三区视频在线| 91成人免费在线| 亚洲成av人片一区二区| 欧美日韩卡一卡二| 日韩激情中文字幕| 日韩色视频在线观看| 久久精品国产久精国产爱| 欧美精品一区二区三区蜜桃视频| 激情图区综合网| 久久色.com| 成人性生交大片免费| 亚洲同性同志一二三专区| 91丝袜美腿高跟国产极品老师 | 久久久久久电影| 成人永久免费视频| 亚洲精品中文字幕在线观看| 在线观看www91| 国产精品综合视频| 成人app下载| 99国产精品久| 欧美成人午夜电影| 国产成人久久精品77777最新版本 国产成人鲁色资源国产91色综 | 中文字幕在线不卡视频| 一本高清dvd不卡在线观看| 美女网站色91| 五月天网站亚洲| 中文字幕亚洲精品在线观看| 久久久精品国产99久久精品芒果 | 国产精品欧美极品| 精品国产91亚洲一区二区三区婷婷| 国产福利一区在线观看| 久久国产精品第一页| 丝袜美腿亚洲一区| 亚洲裸体xxx| 亚洲精品在线三区| 欧美一级高清大全免费观看| 欧美无砖砖区免费| 91丝袜美女网| 日韩视频免费观看高清完整版 | 99久久99久久精品免费看蜜桃| 亚洲图片有声小说| 国产日产亚洲精品系列| 欧美电影影音先锋| 欧美日韩成人高清| fc2成人免费人成在线观看播放 | 日本亚洲视频在线| 午夜精品视频在线观看| 免费精品视频最新在线| 免费看日韩a级影片| 成人高清视频在线观看| 色综合欧美在线视频区| 欧美性淫爽ww久久久久无| 51精品视频一区二区三区| 久久精品夜色噜噜亚洲a∨| 综合久久综合久久| 国产精品一区二区黑丝| 亚洲一区二区免费视频| 国产日产欧美一区二区视频| 欧美一区二区三区视频在线| 91在线观看高清| 国产精品1024久久| 老鸭窝一区二区久久精品| 亚洲激情在线激情|