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

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

?? litexmlrpctransport.java

?? xmlrpc-2.0-src.zip java程序
?? JAVA
字號:
/* * Copyright 1999,2005 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. */package org.apache.xmlrpc;import java.io.BufferedInputStream;import java.io.BufferedOutputStream;import java.io.IOException;import java.io.InputStream;import java.net.ConnectException;import java.net.Socket;import java.net.URL;import java.util.StringTokenizer;import org.apache.xmlrpc.util.HttpUtil;/** * Interface from XML-RPC to a 'lite' HTTP implementation.  This class will use * the XmlRpcClientLite.auth member for the HTTP Basic authentication string. * * @author <a href="mailto:hannes@apache.org">Hannes Wallnoefer</a> * @author <a href="mailto:andrew@kungfoocoder.org">Andrew Evers</a> * @version $Id: LiteXmlRpcTransport.java,v 1.6 2005/04/22 10:25:57 hgomez Exp $ * @since 1.2 */class LiteXmlRpcTransport implements XmlRpcTransport{    String hostname;    String host;    protected String auth = null;    int port;    String uri;    Socket socket = null;    BufferedOutputStream output;    BufferedInputStream input;    boolean keepalive;    byte[] buffer;    /**     * Create a new DefaultXmlRpcTransport with the specified URL.     *     * @param url the url to POST XML-RPC requests to.     */    public LiteXmlRpcTransport(URL url)    {        hostname = url.getHost();        port = url.getPort();        if (port < 1)        {            port = 80;        }        uri = url.getFile();        if (uri == null || "".equals(uri))        {            uri = "/";        }        host = port == 80 ? hostname : hostname + ":" + port;            }    public InputStream sendXmlRpc(byte [] request)    throws IOException    {        try        {            if (socket == null)            {        	initConnection();            }            InputStream in = null;           // send request to the server and get an input stream           // from which to read the response            try            {                in = sendRequest(request);            }            catch (IOException iox)            {                // if we get an exception while sending the request,                // and the connection is a keepalive connection, it may                // have been timed out by the server. Try again.                if (keepalive)                {                    closeConnection();                    initConnection();                    in = sendRequest(request);                }                else                {                    throw iox;                }            }            return in;        }        catch (IOException iox)        {            // this is a lower level problem,  client could not talk to            // server for some reason.            throw iox;        }        catch (Exception x)        {            // same as above, but exception has to be converted to            // IOException.            if (XmlRpc.debug)            {                x.printStackTrace ();            }            String msg = x.getMessage ();            if (msg == null || msg.length () == 0)            {                msg = x.toString ();            }            throw new IOException (msg);        }    }    /**     *     * @throws IOException     */    protected void initConnection() throws IOException    {        final int retries = 3;        final int delayMillis = 100;                int tries = 0;                socket = null;        while (socket == null) {            try {                socket = new Socket(hostname, port);            }            catch (ConnectException e) {                if (tries >= retries) {                    throw e;                } else {                    // log.debug("ConnectException: " + e.getMessage() + ", waiting " + new Integer(delayMillis).toString() + " milliseconds and retrying");                    try {                        Thread.sleep(delayMillis);                    }                    catch (InterruptedException ignore) {                    }                }            }        }                output = new BufferedOutputStream(socket.getOutputStream());        input = new BufferedInputStream(socket.getInputStream());    }    /**     *     */    protected void closeConnection ()    {        try        {            socket.close();        }        catch (Exception ignore)        {        }        finally        {            socket = null;        }    }    /**     *     * @param request     * @return     * @throws IOException     */    public InputStream sendRequest(byte[] request) throws IOException    {        output.write(("POST " + uri + " HTTP/1.0\r\n").getBytes());        output.write(("User-Agent: " + XmlRpc.version + "\r\n").getBytes());        output.write(("Host: " + host + "\r\n").getBytes());        if (XmlRpc.getKeepAlive())        {            output.write("Connection: Keep-Alive\r\n".getBytes());        }        output.write("Content-Type: text/xml\r\n".getBytes());        if (auth != null)        {            output.write(("Authorization: Basic " + auth + "\r\n")                    .getBytes());        }        output.write(("Content-Length: " + request.length)                .getBytes());        output.write("\r\n\r\n".getBytes());        output.write(request);        output.flush();        // start reading  server response headers        String line = readLine();        if (XmlRpc.debug)        {            System.out.println(line);        }        int contentLength = -1;        try        {            StringTokenizer tokens = new StringTokenizer(line);            String httpversion = tokens.nextToken();            String statusCode = tokens.nextToken();            String statusMsg = tokens.nextToken("\n\r");            keepalive = XmlRpc.getKeepAlive()                    && "HTTP/1.1".equals(httpversion);            if (! "200".equals(statusCode))            {                throw new IOException("Unexpected Response from Server: "                        + statusMsg);            }        }        catch (IOException iox)        {            throw iox;        }        catch (Exception x)        {            // x.printStackTrace ();            throw new IOException("Server returned invalid Response.");        }        do        {            line = readLine ();            if (line != null)            {                if (XmlRpc.debug)                {                    System.out.println(line);                }                line = line.toLowerCase();                if (line.startsWith("content-length:"))                {                    contentLength = Integer.parseInt(                            line.substring(15).trim());                }                if (line.startsWith("connection:"))                {                    keepalive = XmlRpc.getKeepAlive()                            && line.indexOf("keep-alive") > -1;                }            }        }        while (line != null && ! line.equals(""))            ;        return new ServerInputStream(input, contentLength);    }    /**     * Sets Authentication for this client. This will be sent as Basic     * Authentication header to the server as described in     * <a href="http://www.ietf.org/rfc/rfc2617.txt">     * http://www.ietf.org/rfc/rfc2617.txt</a>.     */    public void setBasicAuthentication(String user, String password)    {        auth = HttpUtil.encodeBasicAuthentication(user, password);    }    public void endClientRequest()    {        // eepalive is always false if XmlRpc.keepalive is false        if (!keepalive)        {            closeConnection ();        }    }    /**     *     * @return     * @throws IOException     */    private String readLine() throws IOException    {        if (buffer == null)        {            buffer = new byte[2048];        }        int next;        int count = 0;        while (true)        {            next = input.read();            if (next < 0 || next == '\n')            {                break;            }            if (next != '\r')            {                buffer[count++] = (byte) next;            }            if (count >= buffer.length)            {                throw new IOException ("HTTP Header too long");            }        }        return new String(buffer, 0, count);    }    /**     *     * @throws Throwable     */    protected void finalize() throws Throwable    {        closeConnection ();    }}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲精品欧美综合四区| 蜜臀av国产精品久久久久 | 手机精品视频在线观看| 精品国产成人系列| 91美女精品福利| 国产综合色视频| 亚洲第一二三四区| 国产精品久久久久久久久快鸭| 欧美一级片在线观看| 一本色道亚洲精品aⅴ| 精品亚洲成a人| 亚洲成人777| 中文字幕一区二区三区视频| 精品入口麻豆88视频| 欧美在线一区二区| 99vv1com这只有精品| 国产一区二区三区免费播放| 亚洲电影一级黄| 亚洲免费观看高清完整版在线| 2023国产精品自拍| 欧美一级在线视频| 欧洲一区二区av| 91女厕偷拍女厕偷拍高清| 国产成人在线看| 韩国女主播成人在线| 人妖欧美一区二区| 亚洲超碰精品一区二区| 一区二区三区日韩在线观看| 国产精品久久久久久亚洲伦| 久久久久久免费| 久久影院午夜论| 亚洲精品一区二区三区99| 日韩一区二区在线观看视频| 欧美精品乱人伦久久久久久| 欧美主播一区二区三区| 91久久精品网| 欧洲国产伦久久久久久久| 色综合久久久久综合| 一本久久精品一区二区| 色婷婷av一区| 欧美在线观看禁18| 91久久一区二区| 欧美亚洲国产一卡| 欧美理论片在线| 欧美一区二区三区白人| 91精品国产综合久久福利软件| 欧美精品久久一区| 欧美一区三区四区| 日韩一区二区免费在线观看| 日韩亚洲欧美高清| 精品国产a毛片| 欧美高清在线精品一区| 亚洲视频小说图片| 一区二区三区四区不卡在线| 亚洲国产日韩一区二区| 青青青伊人色综合久久| 久久99这里只有精品| 国产乱码精品一区二区三区忘忧草| 国产一区二区三区黄视频 | 91在线无精精品入口| 91在线观看免费视频| 日本韩国精品在线| 欧美日韩国产大片| 精品精品欲导航| 国产日韩欧美综合在线| 亚洲欧美激情在线| 欧美aaaaaa午夜精品| 国产麻豆欧美日韩一区| 成人黄色在线网站| 欧美性大战久久久久久久蜜臀| 欧美精品第1页| 精品国产免费久久| 亚洲色图视频免费播放| 婷婷成人综合网| 高清不卡在线观看| 欧美在线观看视频一区二区三区| 91精品国产福利在线观看| 久久久久国产精品免费免费搜索| 中文字幕视频一区二区三区久| 亚洲午夜久久久久久久久电影院 | 精品久久久三级丝袜| 国产女主播一区| 亚洲午夜视频在线观看| 国模一区二区三区白浆| 91一区二区三区在线播放| 8x8x8国产精品| 中文字幕在线观看不卡| 天天av天天翘天天综合网色鬼国产 | 久久综合给合久久狠狠狠97色69| 国产精品二三区| 美女国产一区二区三区| 91网站最新网址| 精品国产乱码91久久久久久网站| 亚洲视频在线一区二区| 美女精品一区二区| 欧美综合天天夜夜久久| 久久久99精品久久| 日日夜夜精品视频免费| 97久久精品人人做人人爽50路 | 国产精品人人做人人爽人人添| 一区二区三区精品久久久| 国产精品99久久久久久久女警| 欧美在线一区二区三区| 欧美国产视频在线| 免费精品视频最新在线| 在线影院国内精品| 国产亚洲1区2区3区| 日本欧美一区二区| 欧美在线色视频| 亚洲天堂中文字幕| 国产福利91精品一区| 欧美一区二区三区在| 玉米视频成人免费看| 不卡高清视频专区| 久久久久久久久99精品| 99亚偷拍自图区亚洲| 精品国产乱码久久久久久1区2区 | 丁香六月综合激情| 日韩精品中文字幕一区| 亚洲国产综合91精品麻豆| 97成人超碰视| 国产精品久久久久永久免费观看 | 国产精品国产自产拍在线| 加勒比av一区二区| 日韩一区二区在线免费观看| 亚洲电影第三页| 在线视频欧美精品| 综合激情网...| gogo大胆日本视频一区| 国产精品色哟哟网站| 国产黄色精品视频| 国产亚洲欧洲一区高清在线观看| 激情图片小说一区| 精品成人一区二区| 国产在线精品免费| 久久亚洲二区三区| 国产成人免费9x9x人网站视频| 欧美电影免费观看高清完整版| 石原莉奈在线亚洲二区| 欧美精品 国产精品| 视频一区在线视频| 日韩一级免费一区| 精品亚洲国内自在自线福利| 精品裸体舞一区二区三区| 国模少妇一区二区三区| 国产无一区二区| 丁香激情综合国产| 亚洲视频一二三| 在线看日本不卡| 五月激情丁香一区二区三区| 在线不卡免费欧美| 精品一区二区三区香蕉蜜桃| 久久久亚洲午夜电影| 成人免费视频网站在线观看| 国产日韩欧美综合在线| av在线免费不卡| 亚洲中国最大av网站| 91麻豆精品国产| 极品少妇一区二区| 国产精品美女一区二区| 色综合天天综合网天天看片| 亚洲国产cao| 精品国产91亚洲一区二区三区婷婷 | 一区二区三区波多野结衣在线观看| 色香蕉久久蜜桃| 石原莉奈在线亚洲二区| 久久久精品免费免费| 99re成人在线| 三级成人在线视频| 国产午夜精品一区二区三区嫩草| 99视频精品免费视频| 亚洲国产精品久久不卡毛片| 精品国产1区二区| 99精品国产99久久久久久白柏| 亚洲v日本v欧美v久久精品| 亚洲精品一区二区三区99| 99精品视频在线免费观看| 亚洲一级二级在线| 久久伊99综合婷婷久久伊| 色哟哟一区二区三区| 免播放器亚洲一区| 亚洲欧美日韩成人高清在线一区| 欧美疯狂做受xxxx富婆| 成人丝袜高跟foot| 秋霞电影网一区二区| 国产精品毛片高清在线完整版| 欧美日韩高清影院| 国产传媒一区在线| 午夜精品久久久久久久蜜桃app| 国产午夜三级一区二区三| 欧美性感一类影片在线播放| 国产成人免费视| 亚洲成人av一区| 中文字幕乱码久久午夜不卡| 91精品国产综合久久香蕉麻豆| 成人动漫一区二区| 久久精品99国产精品| 亚洲一区二区av电影| 国产精品蜜臀在线观看| 欧美videossexotv100|