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

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

?? httpconnection.java

?? Light in the box 抓取程序。 使用HttpClient
?? JAVA
?? 第 1 頁 / 共 4 頁
字號:
        assertNotOpen();                if (LOG.isDebugEnabled()) {            LOG.debug("Open connection to " + host + ":" + port);        }                try {            if (this.socket == null) {                usingSecureSocket = isSecure() && !isProxied();                // use the protocol's socket factory unless this is a secure                // proxied connection                ProtocolSocketFactory socketFactory = null;                if (isSecure() && isProxied()) {                    Protocol defaultprotocol = Protocol.getProtocol("http");                    socketFactory = defaultprotocol.getSocketFactory();                } else {                    socketFactory = this.protocolInUse.getSocketFactory();                }                this.socket = socketFactory.createSocket(                            host, port,                             localAddress, 0,                            this.params);            }            /*            "Nagling has been broadly implemented across networks,             including the Internet, and is generally performed by default             - although it is sometimes considered to be undesirable in             highly interactive environments, such as some client/server             situations. In such cases, nagling may be turned off through             use of the TCP_NODELAY sockets option." */            socket.setTcpNoDelay(this.params.getTcpNoDelay());            socket.setSoTimeout(this.params.getSoTimeout());                        int linger = this.params.getLinger();            if (linger >= 0) {                socket.setSoLinger(linger > 0, linger);            }                        int sndBufSize = this.params.getSendBufferSize();            if (sndBufSize >= 0) {                socket.setSendBufferSize(sndBufSize);            }                    int rcvBufSize = this.params.getReceiveBufferSize();            if (rcvBufSize >= 0) {                socket.setReceiveBufferSize(rcvBufSize);            }                    int outbuffersize = socket.getSendBufferSize();            if ((outbuffersize > 2048) || (outbuffersize <= 0)) {                outbuffersize = 2048;            }            int inbuffersize = socket.getReceiveBufferSize();            if ((inbuffersize > 2048) || (inbuffersize <= 0)) {                inbuffersize = 2048;            }            inputStream = new BufferedInputStream(socket.getInputStream(), inbuffersize);            outputStream = new BufferedOutputStream(socket.getOutputStream(), outbuffersize);            isOpen = true;        } catch (IOException e) {            // Connection wasn't opened properly            // so close everything out            closeSocketAndStreams();            throw e;        }    }    /**     * Instructs the proxy to establish a secure tunnel to the host. The socket will      * be switched to the secure socket. Subsequent communication is done via the secure      * socket. The method can only be called once on a proxied secure connection.     *     * @throws IllegalStateException if connection is not secure and proxied or     * if the socket is already secure.     * @throws IOException if an attempt to establish the secure tunnel results in an     *   I/O error.     */    public void tunnelCreated() throws IllegalStateException, IOException {        LOG.trace("enter HttpConnection.tunnelCreated()");        if (!isSecure() || !isProxied()) {            throw new IllegalStateException(                "Connection must be secure "                    + "and proxied to use this feature");        }        if (usingSecureSocket) {            throw new IllegalStateException("Already using a secure socket");        }                if (LOG.isDebugEnabled()) {            LOG.debug("Secure tunnel to " + this.hostName + ":" + this.portNumber);        }        SecureProtocolSocketFactory socketFactory =            (SecureProtocolSocketFactory) protocolInUse.getSocketFactory();        socket = socketFactory.createSocket(socket, hostName, portNumber, true);        int sndBufSize = this.params.getSendBufferSize();        if (sndBufSize >= 0) {            socket.setSendBufferSize(sndBufSize);        }                int rcvBufSize = this.params.getReceiveBufferSize();        if (rcvBufSize >= 0) {            socket.setReceiveBufferSize(rcvBufSize);        }                int outbuffersize = socket.getSendBufferSize();        if (outbuffersize > 2048) {            outbuffersize = 2048;        }        int inbuffersize = socket.getReceiveBufferSize();        if (inbuffersize > 2048) {            inbuffersize = 2048;        }        inputStream = new BufferedInputStream(socket.getInputStream(), inbuffersize);        outputStream = new BufferedOutputStream(socket.getOutputStream(), outbuffersize);        usingSecureSocket = true;        tunnelEstablished = true;    }    /**     * Indicates if the connection is completely transparent from end to end.     *     * @return true if conncetion is not proxied or tunneled through a transparent     * proxy; false otherwise.     */    public boolean isTransparent() {        return !isProxied() || tunnelEstablished;    }    /**     * Flushes the output request stream.  This method should be called to      * ensure that data written to the request OutputStream is sent to the server.     *      * @throws IOException if an I/O problem occurs     */    public void flushRequestOutputStream() throws IOException {        LOG.trace("enter HttpConnection.flushRequestOutputStream()");        assertOpen();        outputStream.flush();    }    /**     * Returns an {@link OutputStream} suitable for writing the request.     *     * @throws IllegalStateException if the connection is not open     * @throws IOException if an I/O problem occurs     * @return a stream to write the request to     */    public OutputStream getRequestOutputStream()        throws IOException, IllegalStateException {        LOG.trace("enter HttpConnection.getRequestOutputStream()");        assertOpen();        OutputStream out = this.outputStream;        if (Wire.CONTENT_WIRE.enabled()) {            out = new WireLogOutputStream(out, Wire.CONTENT_WIRE);        }        return out;    }    /**     * Return a {@link InputStream} suitable for reading the response.     * @return InputStream The response input stream.     * @throws IOException If an IO problem occurs     * @throws IllegalStateException If the connection isn't open.     */    public InputStream getResponseInputStream()        throws IOException, IllegalStateException {        LOG.trace("enter HttpConnection.getResponseInputStream()");        assertOpen();        return inputStream;    }    /**     * Tests if input data avaialble. This method returns immediately     * and does not perform any read operations on the input socket     *      * @return boolean <tt>true</tt> if input data is available,      *                 <tt>false</tt> otherwise.     *      * @throws IOException If an IO problem occurs     * @throws IllegalStateException If the connection isn't open.     */    public boolean isResponseAvailable()         throws IOException {        LOG.trace("enter HttpConnection.isResponseAvailable()");        if (this.isOpen) {            return this.inputStream.available() > 0;        } else {            return false;        }    }    /**     * Tests if input data becomes available within the given period time in milliseconds.     *      * @param timeout The number milliseconds to wait for input data to become available      * @return boolean <tt>true</tt> if input data is availble,      *                 <tt>false</tt> otherwise.     *      * @throws IOException If an IO problem occurs     * @throws IllegalStateException If the connection isn't open.     */    public boolean isResponseAvailable(int timeout)         throws IOException {        LOG.trace("enter HttpConnection.isResponseAvailable(int)");        assertOpen();        boolean result = false;        if (this.inputStream.available() > 0) {            result = true;        } else {            try {                this.socket.setSoTimeout(timeout);                inputStream.mark(1);                int byteRead = inputStream.read();                if (byteRead != -1) {                    inputStream.reset();                    LOG.debug("Input data available");                    result = true;                } else {                    LOG.debug("Input data not available");                }            } catch (InterruptedIOException e) {                if (!ExceptionUtil.isSocketTimeoutException(e)) {                    throw e;                }                if (LOG.isDebugEnabled()) {                    LOG.debug("Input data not available after " + timeout + " ms");                }            } finally {                try {                    socket.setSoTimeout(this.params.getSoTimeout());                } catch (IOException ioe) {                    LOG.debug("An error ocurred while resetting soTimeout, we will assume that"                        + " no response is available.",                        ioe);                    result = false;                }            }        }        return result;    }    /**     * Writes the specified bytes to the output stream.     *     * @param data the data to be written     * @throws IllegalStateException if not connected     * @throws IOException if an I/O problem occurs     * @see #write(byte[],int,int)     */    public void write(byte[] data)        throws IOException, IllegalStateException {        LOG.trace("enter HttpConnection.write(byte[])");        this.write(data, 0, data.length);    }    /**     * Writes <i>length</i> bytes in <i>data</i> starting at     * <i>offset</i> to the output stream.     *     * The general contract for     * write(b, off, len) is that some of the bytes in the array b are written     * to the output stream in order; element b[off] is the first byte written     * and b[off+len-1] is the last byte written by this operation.     *     * @param data array containing the data to be written.     * @param offset the start offset in the data.     * @param length the number of bytes to write.     * @throws IllegalStateException if not connected     * @throws IOException if an I/O problem occurs     */    public void write(byte[] data, int offset, int length)        throws IOException, IllegalStateException {        LOG.trace("enter HttpConnection.write(byte[], int, int)");        if (offset < 0) {            throw new IllegalArgumentException("Array offset may not be negative");        }        if (length < 0) {            throw new IllegalArgumentException("Array length may not be negative");        }        if (offset + length > data.length) {            throw new IllegalArgumentException("Given offset and length exceed the array length");        }        assertOpen();        this.outputStream.write(data, offset, length);    }    /**     * Writes the specified bytes, followed by <tt>"\r\n".getBytes()</tt> to the     * output stream.     *     * @param data the bytes to be written     * @throws IllegalStateException if the connection is not open     * @throws IOException if an I/O problem occurs     */    public void writeLine(byte[] data)        throws IOException, IllegalStateException {        LOG.trace("enter HttpConnection.writeLine(byte[])");        write(data);        writeLine();    }    /**     * Writes <tt>"\r\n".getBytes()</tt> to the output stream.     *     * @throws IllegalStateException if the connection is not open     * @throws IOException if an I/O problem occurs     */    public void writeLine()        throws IOException, IllegalStateException {        LOG.trace("enter HttpConnection.writeLine()");        write(CRLF);    }    /**     * @deprecated Use {@link #print(String, String)}     *      * Writes the specified String (as bytes) to the output stream.     *     * @param data the string to be written     * @throws IllegalStateException if the connection is not open     * @throws IOException if an I/O problem occurs     */    public void print(String data)        throws IOException, IllegalStateException {        LOG.trace("enter HttpConnection.print(String)");        write(EncodingUtil.getBytes(data, "ISO-8859-1"));    }    /**     * Writes the specified String (as bytes) to the output stream.     *     * @param data the string to be written     * @param charset the charset to use for writing the data     * @throws IllegalStateException if the connection is not open     * @throws IOException if an I/O problem occurs     *      * @since 3.0     */    public void print(String data, String charset)        throws IOException, IllegalStateException {        LOG.trace("enter HttpConnection.print(String)");

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品你懂的| 91精品国模一区二区三区| 韩国女主播成人在线观看| 亚洲成人免费av| 一区二区久久久| 一区二区三区四区在线播放 | 麻豆国产欧美日韩综合精品二区 | 久久不见久久见免费视频7| 亚洲一区二区中文在线| 亚洲永久精品国产| 亚洲福利电影网| 日韩影院免费视频| 免费视频最近日韩| 国产福利91精品一区| 国产精品一级黄| av亚洲产国偷v产偷v自拍| 高清成人在线观看| 91一区二区三区在线观看| 在线欧美日韩国产| 91精品国产综合久久福利软件| 欧美一区二区三区在线视频| 欧美电影免费提供在线观看| 久久精品无码一区二区三区| 国产精品日日摸夜夜摸av| 亚洲男人的天堂在线观看| 亚洲国产视频一区| 精品一区二区三区在线播放视频| 国产精品白丝av| 色婷婷av一区二区三区大白胸| 欧美日韩在线一区二区| 日韩一区二区三区视频在线观看| 久久久久久日产精品| 亚洲欧美激情视频在线观看一区二区三区 | 国产成人免费在线视频| av午夜精品一区二区三区| 欧美日韩精品一区二区在线播放| 日韩免费视频一区| ...av二区三区久久精品| 亚洲成人免费在线观看| 国产不卡视频在线观看| 欧美日韩视频一区二区| 久久精品男人天堂av| 一区二区国产视频| 国产精品99久久久久久久女警| 一本色道久久综合亚洲精品按摩 | 国产精品影视在线观看| 在线视频中文字幕一区二区| 久久久久青草大香线综合精品| 亚洲一区日韩精品中文字幕| 国产成人鲁色资源国产91色综 | 久久久久久久性| 午夜欧美一区二区三区在线播放| 国产夫妻精品视频| 日韩午夜激情av| 亚洲自拍欧美精品| 成人夜色视频网站在线观看| 欧美一级夜夜爽| 亚洲综合丁香婷婷六月香| 成人毛片老司机大片| 日韩一区二区影院| 一区二区三区四区在线播放| aa级大片欧美| 欧美高清在线一区二区| 韩国视频一区二区| 日韩一区二区三区视频在线| 亚洲观看高清完整版在线观看| 成人动漫视频在线| 国产亚洲一区二区三区在线观看| 免费观看久久久4p| 欧美精品久久一区| 亚洲大片免费看| 欧洲亚洲精品在线| 亚洲日本在线视频观看| 成人福利视频网站| 中文字幕亚洲精品在线观看| 成人18视频日本| 国产精品久久久久久福利一牛影视 | 国产无遮挡一区二区三区毛片日本| 天天色天天操综合| 欧美精品视频www在线观看| 一区二区三区日韩欧美精品| 日本精品视频一区二区| 一区二区三区美女| 欧美日韩小视频| 日韩精品一级二级 | 综合网在线视频| 97精品久久久午夜一区二区三区| 中文字幕av在线一区二区三区| 国产精品一区二区x88av| 国产精品天美传媒| 91亚洲永久精品| 亚洲国产精品自拍| 日韩三级视频在线看| 国内精品第一页| 国产精品无圣光一区二区| av在线播放一区二区三区| 亚洲精品视频在线观看网站| 欧美少妇一区二区| 喷白浆一区二区| 国产拍揄自揄精品视频麻豆 | 日韩一区有码在线| 欧美午夜片在线观看| 麻豆视频观看网址久久| 国产日产欧美一区二区三区| av不卡在线观看| 人人超碰91尤物精品国产| 久久久久久久久97黄色工厂| 色综合天天做天天爱| 婷婷久久综合九色国产成人| 国产色综合一区| 欧美色图在线观看| 国产乱码一区二区三区| 亚洲一区在线视频观看| ww久久中文字幕| 欧美日韩综合在线| 国产福利视频一区二区三区| 午夜影院在线观看欧美| 国产三级久久久| 欧美日韩卡一卡二| 国产99久久久国产精品| 亚洲va韩国va欧美va| 中文字幕精品在线不卡| 91精品国产黑色紧身裤美女| 91影视在线播放| 国产一区美女在线| 午夜av一区二区| 中文字幕制服丝袜一区二区三区 | 日本aⅴ精品一区二区三区| 综合自拍亚洲综合图不卡区| 久久综合久色欧美综合狠狠| 欧美日韩国产精品成人| av中文一区二区三区| 国内国产精品久久| 日韩av电影免费观看高清完整版 | 久久香蕉国产线看观看99| 国产91精品露脸国语对白| 91精品国产免费久久综合| 在线播放一区二区三区| 欧美成人a在线| 欧美—级在线免费片| 激情成人综合网| 一区二区成人在线视频| 中文字幕一区二区视频| 国产欧美一区二区三区网站| 日韩一区二区三区在线视频| 欧美精品第1页| 日韩欧美区一区二| 在线综合+亚洲+欧美中文字幕| 成人美女在线视频| 成人va在线观看| 国产91精品免费| 波多野结衣视频一区| 丁香婷婷综合色啪| 懂色av一区二区夜夜嗨| 成人在线综合网| 成人高清视频免费观看| 91影院在线观看| 欧美中文字幕一二三区视频| 欧美综合久久久| 欧美日韩国产大片| 欧美日韩亚洲国产综合| 欧美年轻男男videosbes| 4438成人网| 欧美电影免费观看高清完整版在线观看| 欧美日韩国产高清一区二区| 欧美一区二区三区男人的天堂| 欧美va亚洲va在线观看蝴蝶网| 久久影院电视剧免费观看| 天天色图综合网| 日韩电影在线观看一区| 蓝色福利精品导航| 国产剧情一区二区三区| 成人avav在线| 欧美色精品在线视频| 91精品欧美福利在线观看| 精品福利一二区| 国产精品妹子av| 亚洲午夜免费福利视频| 精品综合久久久久久8888| 国产精品456| 色呦呦一区二区三区| 5566中文字幕一区二区电影 | 成人毛片视频在线观看| 一本一道久久a久久精品综合蜜臀| 欧美日韩精品系列| 欧美mv日韩mv亚洲| 亚洲人妖av一区二区| 日韩激情一二三区| 丁香婷婷综合网| 欧美日韩精品欧美日韩精品一| 精品88久久久久88久久久| 亚洲少妇中出一区| 久久国产麻豆精品| 一本久久a久久精品亚洲| 日韩精品中文字幕一区二区三区| 国产精品福利电影一区二区三区四区| 婷婷综合五月天| 99久久伊人网影院| 日韩精品中文字幕在线一区| 亚洲综合在线免费观看|