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

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

?? httpconstants.java

?? Light in the box 抓取程序。 使用HttpClient
?? JAVA
字號:
/* * $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//httpclient/src/java/org/apache/commons/httpclient/HttpConstants.java,v 1.15 2004/04/18 23:51:35 jsdever 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.UnsupportedEncodingException;import org.apache.commons.logging.Log;import org.apache.commons.logging.LogFactory;/** * HTTP content conversion routines. * * @author Oleg Kalnichevski * @author <a href="mailto:mbowler@GargoyleSoftware.com">Mike Bowler</a> *  * @deprecated use EncodingUtil class */public class HttpConstants {    /** Character set used to encode HTTP protocol elements */    public static final String HTTP_ELEMENT_CHARSET = "US-ASCII";    /** Default content encoding chatset */    public static final String DEFAULT_CONTENT_CHARSET = "ISO-8859-1";    /** Log object for this class. */    private static final Log LOG = LogFactory.getLog(HttpConstants.class);    /**     * Converts the specified string to a byte array of HTTP element characters.     * This method is to be used when encoding content of HTTP elements (such as     * request headers)     *     * @param data the string to be encoded     * @return The resulting byte array.     */    public static byte[] getBytes(final String data) {        if (data == null) {            throw new IllegalArgumentException("Parameter may not be null");        }        try {            return data.getBytes(HTTP_ELEMENT_CHARSET);        } catch (UnsupportedEncodingException e) {            if (LOG.isWarnEnabled()) {                LOG.warn("Unsupported encoding: "                     + HTTP_ELEMENT_CHARSET                     + ". System default encoding used");            }            return data.getBytes();        }    }    /**     * Converts the byte array of HTTP element characters to a string This     * method is to be used when decoding content of HTTP elements (such as     * response headers)     *     * @param data the byte array to be encoded     * @param offset the index of the first byte to encode     * @param length the number of bytes to encode      * @return The resulting string.     */    public static String getString(final byte[] data, int offset, int length) {        if (data == null) {            throw new IllegalArgumentException("Parameter may not be null");        }        try {            return new String(data, offset, length, HTTP_ELEMENT_CHARSET);        } catch (UnsupportedEncodingException e) {            if (LOG.isWarnEnabled()) {                LOG.warn("Unsupported encoding: "                     + HTTP_ELEMENT_CHARSET                     + ". System default encoding used");            }            return new String(data, offset, length);        }    }    /**     * Converts the byte array of HTTP element characters to a string This     * method is to be used when decoding content of HTTP elements (such as     * response headers)     *     * @param data the byte array to be encoded     * @return The resulting string.     */    public static String getString(final byte[] data) {        return getString(data, 0, data.length);    }    /**     * Converts the specified string to a byte array of HTTP content charachetrs     * This method is to be used when encoding content of HTTP request/response     * If the specified charset is not supported, default HTTP content encoding     * (ISO-8859-1) is applied     *     * @param data the string to be encoded     * @param charset the desired character encoding     * @return The resulting byte array.     */    public static byte[] getContentBytes(final String data, String charset) {        if (data == null) {            throw new IllegalArgumentException("Parameter may not be null");        }        if ((charset == null) || (charset.equals(""))) {            charset = DEFAULT_CONTENT_CHARSET;        }        try {            return data.getBytes(charset);        } catch (UnsupportedEncodingException e) {            if (LOG.isWarnEnabled()) {                LOG.warn("Unsupported encoding: "                     + charset                     + ". HTTP default encoding used");            }            try {                return data.getBytes(DEFAULT_CONTENT_CHARSET);            } catch (UnsupportedEncodingException e2) {                if (LOG.isWarnEnabled()) {                    LOG.warn("Unsupported encoding: "                         + DEFAULT_CONTENT_CHARSET                         + ". System encoding used");                }                return data.getBytes();            }        }    }    /**     * Converts the byte array of HTTP content characters to a string This     * method is to be used when decoding content of HTTP request/response If     * the specified charset is not supported, default HTTP content encoding     * (ISO-8859-1) is applied     *     * @param data the byte array to be encoded     * @param offset the index of the first byte to encode     * @param length the number of bytes to encode      * @param charset the desired character encoding     * @return The result of the conversion.     */    public static String getContentString(        final byte[] data,         int offset,         int length,         String charset    ) {        if (data == null) {            throw new IllegalArgumentException("Parameter may not be null");        }        if ((charset == null) || (charset.equals(""))) {            charset = DEFAULT_CONTENT_CHARSET;        }        try {            return new String(data, offset, length, charset);        } catch (UnsupportedEncodingException e) {            if (LOG.isWarnEnabled()) {                LOG.warn("Unsupported encoding: " + charset + ". Default HTTP encoding used");            }            try {                return new String(data, offset, length, DEFAULT_CONTENT_CHARSET);            } catch (UnsupportedEncodingException e2) {                if (LOG.isWarnEnabled()) {                    LOG.warn("Unsupported encoding: "                         + DEFAULT_CONTENT_CHARSET                         + ". System encoding used");                }                return new String(data, offset, length);            }        }    }    /**     * Converts the byte array of HTTP content characters to a string This     * method is to be used when decoding content of HTTP request/response If     * the specified charset is not supported, default HTTP content encoding     * (ISO-8859-1) is applied     *     * @param data the byte array to be encoded     * @param charset the desired character encoding     * @return The result of the conversion.     */    public static String getContentString(final byte[] data, String charset) {        return getContentString(data, 0, data.length, charset);    }    /**     * Converts the specified string to a byte array of HTTP content characters     * using default HTTP content encoding (ISO-8859-1) This method is to be     * used when encoding content of HTTP request/response     *     * @param data the string to be encoded     * @return The byte array as above.     */    public static byte[] getContentBytes(final String data) {        return getContentBytes(data, null);    }    /**     * Converts the byte array of HTTP content characters to a string using     * default HTTP content encoding (ISO-8859-1) This method is to be used when     * decoding content of HTTP request/response     *     * @param data the byte array to be encoded     * @param offset the index of the first byte to encode     * @param length the number of bytes to encode      * @return The string representation of the byte array.     */    public static String getContentString(final byte[] data, int offset, int length) {        return getContentString(data, offset, length, null);    }    /**     * Converts the byte array of HTTP content characters to a string using     * default HTTP content encoding (ISO-8859-1) This method is to be used when     * decoding content of HTTP request/response     *     * @param data the byte array to be encoded     * @return The string representation of the byte array.     */    public static String getContentString(final byte[] data) {        return getContentString(data, null);    }    /**     * Converts the specified string to byte array of ASCII characters.     *     * @param data the string to be encoded     * @return The string as a byte array.     */    public static byte[] getAsciiBytes(final String data) {        if (data == null) {            throw new IllegalArgumentException("Parameter may not be null");        }        try {            return data.getBytes("US-ASCII");        } catch (UnsupportedEncodingException e) {            throw new RuntimeException("HttpClient requires ASCII support");        }    }    /**     * Converts the byte array of ASCII characters to a string. This method is     * to be used when decoding content of HTTP elements (such as response     * headers)     *     * @param data the byte array to be encoded     * @param offset the index of the first byte to encode     * @param length the number of bytes to encode      * @return The string representation of the byte array     */    public static String getAsciiString(final byte[] data, int offset, int length) {        if (data == null) {            throw new IllegalArgumentException("Parameter may not be null");        }        try {            return new String(data, offset, length, "US-ASCII");        } catch (UnsupportedEncodingException e) {            throw new RuntimeException("HttpClient requires ASCII support");        }    }    /**     * Converts the byte array of ASCII characters to a string. This method is     * to be used when decoding content of HTTP elements (such as response     * headers)     *     * @param data the byte array to be encoded     * @return The string representation of the byte array     */    public static String getAsciiString(final byte[] data) {        return getAsciiString(data, 0, data.length);    }}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
午夜久久久影院| √…a在线天堂一区| 日本一区二区三区免费乱视频| 91精品啪在线观看国产60岁| 久久人人爽爽爽人久久久| 亚洲综合色视频| 亚洲不卡一区二区三区| 国产精品夜夜嗨| 51精品秘密在线观看| 亚洲欧美日韩一区二区三区在线观看 | 国产中文字幕精品| 色婷婷综合视频在线观看| 久久午夜电影网| 蜜桃视频第一区免费观看| 精品一区精品二区高清| 欧美午夜片在线看| 亚洲色图制服丝袜| 国产盗摄一区二区| 欧美第一区第二区| 日韩精品电影在线观看| 欧美色图一区二区三区| 综合久久一区二区三区| 成人免费看视频| 26uuu另类欧美| 美国一区二区三区在线播放| 777午夜精品视频在线播放| 亚洲精品你懂的| 日本韩国欧美一区二区三区| 国产精品麻豆一区二区| 国产aⅴ综合色| 91高清视频在线| 亚洲男人天堂av网| 91美女精品福利| 亚洲欧美一区二区不卡| 久久se精品一区二区| 777色狠狠一区二区三区| 国产欧美日韩综合| 亚洲在线免费播放| 精品一区二区三区在线观看| 波多野结衣在线aⅴ中文字幕不卡| 在线国产亚洲欧美| 亚洲一级在线观看| 欧美在线一区二区| 亚洲va国产va欧美va观看| 国产一二精品视频| 国产日产欧美一区| 亚洲6080在线| 不卡一区二区在线| 日韩精品一区国产麻豆| 国产综合色精品一区二区三区| 欧洲一区在线观看| 日韩中文字幕不卡| 欧美变态tickling挠脚心| 有码一区二区三区| 成人免费高清在线| 欧美一区二区精品在线| 激情久久久久久久久久久久久久久久| 91浏览器在线视频| 午夜不卡av免费| 精品久久久久久久久久久久久久久久久| 亚洲欧美视频在线观看视频| 欧美综合亚洲图片综合区| 日韩av网站在线观看| 2020国产精品自拍| 91美女在线看| 日本不卡一二三| 中文字幕av一区 二区| 看片的网站亚洲| 国产精品久久久久久久久动漫| 久久草av在线| 日韩一区二区精品葵司在线 | www.一区二区| 亚洲不卡av一区二区三区| 日本韩国视频一区二区| 免费观看成人鲁鲁鲁鲁鲁视频| 欧美日韩精品一区视频| 亚洲伦理在线精品| 日韩欧美123| 男人操女人的视频在线观看欧美 | 成人综合婷婷国产精品久久蜜臀| 欧美精品tushy高清| 亚洲一区二三区| 国产亚洲午夜高清国产拍精品| 国产在线精品免费av| 一区二区免费看| 亚洲国产精品成人综合| 欧美日韩www| 91啪亚洲精品| 国产精品538一区二区在线| 久久久国产精品麻豆| 欧美日韩一区二区在线观看| 国产成人免费视频| 日本怡春院一区二区| 亚洲三级电影全部在线观看高清| 成人精品视频.| 久草这里只有精品视频| 欧美国产精品一区二区三区| 欧美一级高清片| 在线精品视频免费播放| 天天做天天摸天天爽国产一区 | 成人动漫一区二区在线| 麻豆成人在线观看| 日韩中文字幕不卡| 婷婷久久综合九色综合绿巨人| 日韩美女主播在线视频一区二区三区| 麻豆精品一区二区| 丝袜亚洲另类欧美| 亚洲国产精品天堂| 亚洲综合视频在线| 亚洲国产精品影院| 精品99一区二区三区| 日韩一区国产二区欧美三区| 欧美日韩免费电影| 欧美日韩午夜影院| 欧美日韩在线观看一区二区| 色8久久人人97超碰香蕉987| 91在线云播放| 美脚の诱脚舐め脚责91| 免费在线一区观看| 中文字幕在线不卡一区 | 久久久www成人免费毛片麻豆| 北条麻妃一区二区三区| 国产99久久久国产精品潘金| 亚洲电影你懂得| 天天射综合影视| 视频在线观看国产精品| 天天射综合影视| 蜜桃久久久久久久| 国产老妇另类xxxxx| 亚洲国产精品久久人人爱| 久久天天做天天爱综合色| 久久久夜色精品亚洲| 国产欧美精品一区二区色综合 | 国产三级三级三级精品8ⅰ区| 在线亚洲欧美专区二区| 欧美视频日韩视频| 91精品综合久久久久久| a4yy欧美一区二区三区| 91福利在线导航| 欧美精品久久久久久久多人混战| 国产成人精品免费视频网站| 石原莉奈在线亚洲三区| 久久国产欧美日韩精品| 亚洲高清视频的网址| 久久aⅴ国产欧美74aaa| 波多野结衣在线aⅴ中文字幕不卡| 麻豆91小视频| 国产伦精品一区二区三区免费迷| 午夜电影网亚洲视频| 韩国精品在线观看| 91在线播放网址| 欧美精品三级在线观看| 久久综合999| 亚洲黄色录像片| 极品美女销魂一区二区三区 | 亚洲自拍偷拍图区| 中文字幕在线观看不卡| 丝袜诱惑制服诱惑色一区在线观看| 亚洲精选视频免费看| 免费人成精品欧美精品| 成人午夜免费视频| 欧美午夜视频网站| 国产精品人人做人人爽人人添| 久久久精品影视| 国产视频一区二区在线观看| 久久老女人爱爱| 亚洲成av人片在线观看无码| 综合久久给合久久狠狠狠97色| 国产精品人成在线观看免费 | 99re这里只有精品首页| 91精品黄色片免费大全| 亚洲乱码精品一二三四区日韩在线 | 精品奇米国产一区二区三区| 中文字幕在线不卡一区| 亚洲精选视频在线| 国产成人午夜片在线观看高清观看| 国产乱妇无码大片在线观看| 国产成人精品网址| 欧美大片一区二区| 亚洲国产成人高清精品| 午夜av电影一区| 色8久久人人97超碰香蕉987| 久久老女人爱爱| 蜜桃视频在线观看一区| 欧美酷刑日本凌虐凌虐| 亚洲日本欧美天堂| 成人性生交大片免费看视频在线 | 亚洲已满18点击进入久久| 国产99一区视频免费| 精品久久久久久亚洲综合网| 午夜精品福利一区二区蜜股av| 久久黄色级2电影| 欧美伦理视频网站| 天天综合天天做天天综合| 免费不卡在线观看| 69堂亚洲精品首页| 午夜精品福利在线| 成人精品国产福利| 国产精品免费人成网站| 国产.精品.日韩.另类.中文.在线.播放|