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

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

?? postmethod.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/methods/PostMethod.java,v 1.58 2004/08/08 12:50:09 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.methods;import java.util.Iterator;import java.util.Vector;import org.apache.commons.httpclient.NameValuePair;import org.apache.commons.httpclient.util.EncodingUtil;import org.apache.commons.logging.Log;import org.apache.commons.logging.LogFactory;/** * Implements the HTTP POST method. * <p> * The HTTP POST method is defined in section 9.5 of  * <a href="http://www.ietf.org/rfc/rfc2616.txt">RFC2616</a>: * <blockquote> * The POST method is used to request that the origin server accept the entity * enclosed in the request as a new subordinate of the resource identified by * the Request-URI in the Request-Line. POST is designed to allow a uniform * method to cover the following functions: * <ul> *   <li>Annotation of existing resources</li> *   <li>Posting a message to a bulletin board, newsgroup, mailing list, or  *     similar group of articles</li> *   <li>Providing a block of data, such as the result of submitting a form, *     to a data-handling process</li> *   <li>Extending a database through an append operation</li> * </ul> * </blockquote> * </p> * * @author <a href="mailto:remm@apache.org">Remy Maucherat</a> * @author <a href="mailto:dsale@us.britannica.com">Doug Sale</a> * @author <a href="mailto:jsdever@apache.org">Jeff Dever</a> * @author Ortwin Gl???ck * @author <a href="mailto:mbowler@GargoyleSoftware.com">Mike Bowler</a> * @author <a href="mailto:oleg@ural.ru">Oleg Kalnichevski</a> * * @version $Revision: 480424 $ * @since 1.0 */public class PostMethod extends EntityEnclosingMethod {    // -------------------------------------------------------------- Constants    /** Log object for this class. */    private static final Log LOG = LogFactory.getLog(PostMethod.class);    /** The Content-Type for www-form-urlencoded. */    public static final String FORM_URL_ENCODED_CONTENT_TYPE =         "application/x-www-form-urlencoded";    /**      * The buffered request body consisting of <code>NameValuePair</code>s.      */    private Vector params = new Vector();    // ----------------------------------------------------------- Constructors    /**     * No-arg constructor.     *     * @since 1.0     */    public PostMethod() {        super();    }    /**     * Constructor specifying a URI.     *     * @param uri either an absolute or relative URI     *     * @since 1.0     */    public PostMethod(String uri) {        super(uri);    }    // ----------------------------------------------------- Instance Methods    /**     * Returns <tt>"POST"</tt>.     *     * @return <tt>"POST"</tt>     *     * @since 2.0     */    public String getName() {        return "POST";    }    /**     * Returns <tt>true</tt> if there is a request body to be sent.     *      * <P>This method must be overwritten by sub-classes that implement     * alternative request content input methods     * </p>     *      * @return boolean     *      * @since 2.0beta1     */    protected boolean hasRequestContent() {        LOG.trace("enter PostMethod.hasRequestContent()");        if (!this.params.isEmpty()) {            return true;        } else {            return super.hasRequestContent();        }    }    /**     * Clears request body.     *      * <p>This method must be overwritten by sub-classes that implement     * alternative request content input methods</p>     *      * @since 2.0beta1     */    protected void clearRequestBody() {        LOG.trace("enter PostMethod.clearRequestBody()");        this.params.clear();        super.clearRequestBody();    }    /**     * Generates a request entity from the post parameters, if present.  Calls     * {@link EntityEnclosingMethod#generateRequestBody()} if parameters have not been set.     *      * @since 3.0     */    protected RequestEntity generateRequestEntity() {        if (!this.params.isEmpty()) {            // Use a ByteArrayRequestEntity instead of a StringRequestEntity.            // This is to avoid potential encoding issues.  Form url encoded strings            // are ASCII by definition but the content type may not be.  Treating the content            // as bytes allows us to keep the current charset without worrying about how            // this charset will effect the encoding of the form url encoded string.            String content = EncodingUtil.formUrlEncode(getParameters(), getRequestCharSet());            ByteArrayRequestEntity entity = new ByteArrayRequestEntity(                EncodingUtil.getAsciiBytes(content),                FORM_URL_ENCODED_CONTENT_TYPE            );            return entity;        } else {            return super.generateRequestEntity();        }    }        /**     * Sets the value of parameter with parameterName to parameterValue. This method     * does not preserve the initial insertion order.     *     * @param parameterName name of the parameter     * @param parameterValue value of the parameter     *     * @since 2.0     */    public void setParameter(String parameterName, String parameterValue) {        LOG.trace("enter PostMethod.setParameter(String, String)");        removeParameter(parameterName);        addParameter(parameterName, parameterValue);    }    /**     * Gets the parameter of the specified name. If there exists more than one     * parameter with the name paramName, then only the first one is returned.     *     * @param paramName name of the parameter     *     * @return If a parameter exists with the name argument, the coresponding     *         NameValuePair is returned.  Otherwise null.     *     * @since 2.0     *      */    public NameValuePair getParameter(String paramName) {        LOG.trace("enter PostMethod.getParameter(String)");        if (paramName == null) {            return null;        }        Iterator iter = this.params.iterator();        while (iter.hasNext()) {            NameValuePair parameter = (NameValuePair) iter.next();            if (paramName.equals(parameter.getName())) {                return parameter;            }        }        return null;    }    /**     * Gets the parameters currently added to the PostMethod. If there are no     * parameters, a valid array is returned with zero elements. The returned     * array object contains an array of pointers to  the internal data     * members.     *     * @return An array of the current parameters     *     * @since 2.0     *      */    public NameValuePair[] getParameters() {        LOG.trace("enter PostMethod.getParameters()");        int numPairs = this.params.size();        Object[] objectArr = this.params.toArray();        NameValuePair[] nvPairArr = new NameValuePair[numPairs];        for (int i = 0; i < numPairs; i++) {            nvPairArr[i] = (NameValuePair) objectArr[i];        }        return nvPairArr;    }    /**     * Adds a new parameter to be used in the POST request body.     *     * @param paramName The parameter name to add.     * @param paramValue The parameter value to add.     *     * @throws IllegalArgumentException if either argument is null     *     * @since 1.0     */    public void addParameter(String paramName, String paramValue)     throws IllegalArgumentException {        LOG.trace("enter PostMethod.addParameter(String, String)");        if ((paramName == null) || (paramValue == null)) {            throw new IllegalArgumentException(                "Arguments to addParameter(String, String) cannot be null");        }        super.clearRequestBody();        this.params.add(new NameValuePair(paramName, paramValue));    }    /**     * Adds a new parameter to be used in the POST request body.     *     * @param param The parameter to add.     *     * @throws IllegalArgumentException if the argument is null or contains     *         null values     *     * @since 2.0     */    public void addParameter(NameValuePair param)     throws IllegalArgumentException {        LOG.trace("enter PostMethod.addParameter(NameValuePair)");        if (param == null) {            throw new IllegalArgumentException("NameValuePair may not be null");        }        addParameter(param.getName(), param.getValue());    }    /**     * Adds an array of parameters to be used in the POST request body. Logs a     * warning if the parameters argument is null.     *     * @param parameters The array of parameters to add.     *     * @since 2.0     */    public void addParameters(NameValuePair[] parameters) {        LOG.trace("enter PostMethod.addParameters(NameValuePair[])");        if (parameters == null) {            LOG.warn("Attempt to addParameters(null) ignored");        } else {            super.clearRequestBody();            for (int i = 0; i < parameters.length; i++) {                this.params.add(parameters[i]);            }        }    }    /**     * Removes all parameters with the given paramName. If there is more than     * one parameter with the given paramName, all of them are removed.  If     * there is just one, it is removed.  If there are none, then the request     * is ignored.     *     * @param paramName The parameter name to remove.     *     * @return true if at least one parameter was removed     *     * @throws IllegalArgumentException When the parameter name passed is null     *     * @since 2.0     */    public boolean removeParameter(String paramName)     throws IllegalArgumentException {        LOG.trace("enter PostMethod.removeParameter(String)");        if (paramName == null) {            throw new IllegalArgumentException(                "Argument passed to removeParameter(String) cannot be null");        }        boolean removed = false;        Iterator iter = this.params.iterator();        while (iter.hasNext()) {            NameValuePair pair = (NameValuePair) iter.next();            if (paramName.equals(pair.getName())) {                iter.remove();                removed = true;            }        }        return removed;    }    /**     * Removes all parameter with the given paramName and paramValue. If there     * is more than one parameter with the given paramName, only one is     * removed.  If there are none, then the request is ignored.     *     * @param paramName The parameter name to remove.     * @param paramValue The parameter value to remove.     *     * @return true if a parameter was removed.     *     * @throws IllegalArgumentException when param name or value are null     *     * @since 2.0     */    public boolean removeParameter(String paramName, String paramValue)     throws IllegalArgumentException {        LOG.trace("enter PostMethod.removeParameter(String, String)");        if (paramName == null) {            throw new IllegalArgumentException("Parameter name may not be null");        }        if (paramValue == null) {            throw new IllegalArgumentException("Parameter value may not be null");        }        Iterator iter = this.params.iterator();        while (iter.hasNext()) {            NameValuePair pair = (NameValuePair) iter.next();            if (paramName.equals(pair.getName())                && paramValue.equals(pair.getValue())) {                iter.remove();                return true;            }        }        return false;    }    /**     * Sets an array of parameters to be used in the POST request body     *     * @param parametersBody The array of parameters to add.     *     * @throws IllegalArgumentException when param parameters are null     *      * @since 2.0beta1     */    public void setRequestBody(NameValuePair[] parametersBody)    throws IllegalArgumentException {        LOG.trace("enter PostMethod.setRequestBody(NameValuePair[])");        if (parametersBody == null) {            throw new IllegalArgumentException("Array of parameters may not be null");        }        clearRequestBody();        addParameters(parametersBody);    }}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
caoporn国产精品| 国产精品亲子伦对白| 亚洲精品一区二区三区香蕉| 国产精品免费aⅴ片在线观看| 五月天丁香久久| 91在线观看污| 国产精品污污网站在线观看| 日本女优在线视频一区二区| 99久久国产免费看| 久久久青草青青国产亚洲免观| 日韩高清中文字幕一区| 色呦呦国产精品| 国产精品传媒在线| 国产精品中文字幕一区二区三区| 欧美一区二区免费| 三级成人在线视频| 欧美久久一区二区| 亚洲在线中文字幕| 欧洲精品一区二区| 一区二区三区丝袜| 色噜噜狠狠色综合欧洲selulu| 国产日韩影视精品| 高清日韩电视剧大全免费| 精品久久久影院| 久久国产尿小便嘘嘘尿| 日韩欧美亚洲国产精品字幕久久久| 亚洲一区二区不卡免费| 欧美午夜免费电影| 午夜欧美大尺度福利影院在线看| 91成人免费在线视频| 一区二区三区.www| 91黄色激情网站| 午夜伊人狠狠久久| 91黄视频在线| 婷婷丁香久久五月婷婷| 欧美日本在线观看| 日韩高清不卡一区二区三区| 91精品国产91久久综合桃花| 日韩成人一区二区| 亚洲精品一线二线三线无人区| 精品一区二区三区视频在线观看| 久久久另类综合| av网站一区二区三区| 一区二区三区精品在线| 欧美三级资源在线| 蜜桃免费网站一区二区三区| 精品久久久久久亚洲综合网| 国产精品亚洲一区二区三区在线| 亚洲国产精品ⅴa在线观看| 91亚洲男人天堂| 菠萝蜜视频在线观看一区| 国产精品不卡在线| 欧美色电影在线| 激情深爱一区二区| 日韩美女啊v在线免费观看| 91国偷自产一区二区开放时间 | 亚洲一区免费视频| 91精选在线观看| 国产91富婆露脸刺激对白| 亚洲婷婷在线视频| 欧美一区二区三区啪啪| 国产成人精品www牛牛影视| 一区二区在线看| 精品久久一区二区| 色嗨嗨av一区二区三区| 奇米777欧美一区二区| 中文字幕一区二区三区在线不卡| 欧美日韩国产色站一区二区三区| 国产自产高清不卡| 亚洲国产日日夜夜| 日本一区二区三区久久久久久久久不 | 精品粉嫩aⅴ一区二区三区四区| 成人精品视频网站| 日韩av成人高清| 亚洲色图制服丝袜| 欧美大胆一级视频| 在线观看一区日韩| 国产成人在线视频网址| 午夜欧美电影在线观看| 亚洲欧洲av另类| 欧美电影免费观看高清完整版在线观看| av不卡在线观看| 国产剧情一区二区三区| 婷婷综合久久一区二区三区| 综合av第一页| 国产偷国产偷精品高清尤物| 日韩一区二区三区三四区视频在线观看 | 久久99国内精品| 亚洲成人av资源| 亚洲三级电影全部在线观看高清| 久久亚洲综合av| 日韩欧美国产综合| 69成人精品免费视频| 色哟哟一区二区三区| 国产成a人亚洲| 国产一区二区三区在线看麻豆| 亚洲va欧美va国产va天堂影院| 日韩理论电影院| 日本一区二区三区高清不卡| 26uuu精品一区二区三区四区在线 26uuu精品一区二区在线观看 | 91福利精品第一导航| av一区二区三区| 99久久99久久精品国产片果冻| 国产激情一区二区三区桃花岛亚洲| 麻豆成人在线观看| 蜜臀av在线播放一区二区三区| 爽爽淫人综合网网站| 偷拍亚洲欧洲综合| 亚洲电影在线免费观看| 亚洲高清免费在线| 亚洲最新视频在线观看| 最新日韩av在线| 亚洲色大成网站www久久九九| 国产精品视频yy9299一区| 欧美激情艳妇裸体舞| 国产精品美女久久久久av爽李琼| 欧美国产日韩在线观看| 国产精品久久久久久久久久久免费看| 欧美国产精品中文字幕| 国产精品久久久久影院| 亚洲欧美韩国综合色| 日韩一区有码在线| 亚洲一区二区三区四区五区中文| 亚洲国产精品久久人人爱| 亚洲午夜成aⅴ人片| 青青草国产精品97视觉盛宴| 卡一卡二国产精品 | 美美哒免费高清在线观看视频一区二区 | 精品区一区二区| 国产欧美日韩亚州综合| 亚洲欧美日韩在线| 亚洲aⅴ怡春院| 激情av综合网| 99热国产精品| 欧美一级视频精品观看| 2023国产一二三区日本精品2022| 国产日韩高清在线| 一区二区三区国产豹纹内裤在线| 日韩一区精品视频| 国产黄色91视频| 在线视频你懂得一区二区三区| 欧美日本一道本在线视频| 久久久久久免费| 亚洲嫩草精品久久| 美女高潮久久久| 91蜜桃在线观看| 日韩欧美aaaaaa| 亚洲欧美日韩国产中文在线| 日韩在线观看一区二区| 成人黄色一级视频| 777久久久精品| 国产精品激情偷乱一区二区∴| 午夜激情久久久| hitomi一区二区三区精品| 在线91免费看| 1区2区3区精品视频| 蜜臀91精品一区二区三区| 99精品久久久久久| 精品国产免费一区二区三区香蕉| 一区二区三区高清| 国产福利一区二区| 欧美日韩国产一二三| 自拍视频在线观看一区二区| 蜜臂av日日欢夜夜爽一区| 91啪在线观看| 久久久久久久综合狠狠综合| 午夜久久久久久电影| 99re6这里只有精品视频在线观看| 337p亚洲精品色噜噜狠狠| 亚洲人精品午夜| 成人影视亚洲图片在线| 日韩欧美一级二级| 亚洲国产日韩一级| 色综合天天综合网国产成人综合天| 亚洲精品一区在线观看| 亚洲成人精品一区二区| 99re这里都是精品| 日本一区二区三区免费乱视频| 美国毛片一区二区三区| 欧美日精品一区视频| 亚洲少妇30p| 99免费精品视频| 18成人在线观看| av在线不卡观看免费观看| 欧美高清在线视频| 国产成人自拍网| 国产亚洲制服色| 国产精品资源在线看| 精品国产乱码久久久久久久久| 日本免费在线视频不卡一不卡二| 欧美私模裸体表演在线观看| 一区二区三区四区国产精品| 一本在线高清不卡dvd| 亚洲视频每日更新| 色婷婷综合五月| 一区二区三区在线免费播放| 色综合视频一区二区三区高清| 亚洲色图自拍偷拍美腿丝袜制服诱惑麻豆 | 欧美精品三级在线观看| 夜夜爽夜夜爽精品视频|