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

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

?? parameterparser.java

?? Apache Commons FileUpload Copyright 2002-2008 The Apache Software Foundation This product includ
?? JAVA
字號:
/* * 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. */package org.apache.commons.fileupload;import java.util.HashMap;import java.util.Map;/** * A simple parser intended to parse sequences of name/value pairs. * Parameter values are exptected to be enclosed in quotes if they * contain unsafe characters, such as '=' characters or separators. * Parameter values are optional and can be omitted. * * <p> *  <code>param1 = value; param2 = "anything goes; really"; param3</code> * </p> * * @author <a href="mailto:oleg@ural.ru">Oleg Kalnichevski</a> */public class ParameterParser {    /**     * String to be parsed.     */    private char[] chars = null;    /**     * Current position in the string.     */    private int pos = 0;    /**     * Maximum position in the string.     */    private int len = 0;    /**     * Start of a token.     */    private int i1 = 0;    /**     * End of a token.     */    private int i2 = 0;    /**     * Whether names stored in the map should be converted to lower case.     */    private boolean lowerCaseNames = false;    /**     * Default ParameterParser constructor.     */    public ParameterParser() {        super();    }    /**     * Are there any characters left to parse?     *     * @return <tt>true</tt> if there are unparsed characters,     *         <tt>false</tt> otherwise.     */    private boolean hasChar() {        return this.pos < this.len;    }    /**     * A helper method to process the parsed token. This method removes     * leading and trailing blanks as well as enclosing quotation marks,     * when necessary.     *     * @param quoted <tt>true</tt> if quotation marks are expected,     *               <tt>false</tt> otherwise.     * @return the token     */    private String getToken(boolean quoted) {        // Trim leading white spaces        while ((i1 < i2) && (Character.isWhitespace(chars[i1]))) {            i1++;        }        // Trim trailing white spaces        while ((i2 > i1) && (Character.isWhitespace(chars[i2 - 1]))) {            i2--;        }        // Strip away quotation marks if necessary        if (quoted) {            if (((i2 - i1) >= 2)                && (chars[i1] == '"')                && (chars[i2 - 1] == '"')) {                i1++;                i2--;            }        }        String result = null;        if (i2 > i1) {            result = new String(chars, i1, i2 - i1);        }        return result;    }    /**     * Tests if the given character is present in the array of characters.     *     * @param ch the character to test for presense in the array of characters     * @param charray the array of characters to test against     *     * @return <tt>true</tt> if the character is present in the array of     *   characters, <tt>false</tt> otherwise.     */    private boolean isOneOf(char ch, final char[] charray) {        boolean result = false;        for (int i = 0; i < charray.length; i++) {            if (ch == charray[i]) {                result = true;                break;            }        }        return result;    }    /**     * Parses out a token until any of the given terminators     * is encountered.     *     * @param terminators the array of terminating characters. Any of these     * characters when encountered signify the end of the token     *     * @return the token     */    private String parseToken(final char[] terminators) {        char ch;        i1 = pos;        i2 = pos;        while (hasChar()) {            ch = chars[pos];            if (isOneOf(ch, terminators)) {                break;            }            i2++;            pos++;        }        return getToken(false);    }    /**     * Parses out a token until any of the given terminators     * is encountered outside the quotation marks.     *     * @param terminators the array of terminating characters. Any of these     * characters when encountered outside the quotation marks signify the end     * of the token     *     * @return the token     */    private String parseQuotedToken(final char[] terminators) {        char ch;        i1 = pos;        i2 = pos;        boolean quoted = false;        boolean charEscaped = false;        while (hasChar()) {            ch = chars[pos];            if (!quoted && isOneOf(ch, terminators)) {                break;            }            if (!charEscaped && ch == '"') {                quoted = !quoted;            }            charEscaped = (!charEscaped && ch == '\\');            i2++;            pos++;        }        return getToken(true);    }    /**     * Returns <tt>true</tt> if parameter names are to be converted to lower     * case when name/value pairs are parsed.     *     * @return <tt>true</tt> if parameter names are to be     * converted to lower case when name/value pairs are parsed.     * Otherwise returns <tt>false</tt>     */    public boolean isLowerCaseNames() {        return this.lowerCaseNames;    }    /**     * Sets the flag if parameter names are to be converted to lower case when     * name/value pairs are parsed.     *     * @param b <tt>true</tt> if parameter names are to be     * converted to lower case when name/value pairs are parsed.     * <tt>false</tt> otherwise.     */    public void setLowerCaseNames(boolean b) {        this.lowerCaseNames = b;    }    /**     * Extracts a map of name/value pairs from the given string. Names are     * expected to be unique. Multiple separators may be specified and     * the earliest found in the input string is used.     *     * @param str the string that contains a sequence of name/value pairs     * @param separators the name/value pairs separators     *     * @return a map of name/value pairs     */    public Map parse(final String str, char[] separators) {        if (separators == null || separators.length == 0) {            return new HashMap();        }        char separator = separators[0];        if (str != null) {            int idx = str.length();            for (int i = 0;  i < separators.length;  i++) {                int tmp = str.indexOf(separators[i]);                if (tmp != -1) {                    if (tmp < idx) {                        idx = tmp;                        separator = separators[i];                    }                }            }        }        return parse(str, separator);    }    /**     * Extracts a map of name/value pairs from the given string. Names are     * expected to be unique.     *     * @param str the string that contains a sequence of name/value pairs     * @param separator the name/value pairs separator     *     * @return a map of name/value pairs     */    public Map parse(final String str, char separator) {        if (str == null) {            return new HashMap();        }        return parse(str.toCharArray(), separator);    }    /**     * Extracts a map of name/value pairs from the given array of     * characters. Names are expected to be unique.     *     * @param chars the array of characters that contains a sequence of     * name/value pairs     * @param separator the name/value pairs separator     *     * @return a map of name/value pairs     */    public Map parse(final char[] chars, char separator) {        if (chars == null) {            return new HashMap();        }        return parse(chars, 0, chars.length, separator);    }    /**     * Extracts a map of name/value pairs from the given array of     * characters. Names are expected to be unique.     *     * @param chars the array of characters that contains a sequence of     * name/value pairs     * @param offset - the initial offset.     * @param length - the length.     * @param separator the name/value pairs separator     *     * @return a map of name/value pairs     */    public Map parse(        final char[] chars,        int offset,        int length,        char separator) {        if (chars == null) {            return new HashMap();        }        HashMap params = new HashMap();        this.chars = chars;        this.pos = offset;        this.len = length;        String paramName = null;        String paramValue = null;        while (hasChar()) {            paramName = parseToken(new char[] {                    '=', separator });            paramValue = null;            if (hasChar() && (chars[pos] == '=')) {                pos++; // skip '='                paramValue = parseQuotedToken(new char[] {                        separator });            }            if (hasChar() && (chars[pos] == separator)) {                pos++; // skip separator            }            if ((paramName != null) && (paramName.length() > 0)) {                if (this.lowerCaseNames) {                    paramName = paramName.toLowerCase();                }                params.put(paramName, paramValue);            }        }        return params;    }}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91女厕偷拍女厕偷拍高清| 亚洲观看高清完整版在线观看 | 91精品国产一区二区人妖| 亚洲大片一区二区三区| 欧美色窝79yyyycom| 麻豆精品在线观看| 久久五月婷婷丁香社区| 99视频热这里只有精品免费| 一区二区高清免费观看影视大全| 欧美性videosxxxxx| 青青国产91久久久久久| 精品免费99久久| 成人久久久精品乱码一区二区三区| 亚洲同性同志一二三专区| 欧洲av一区二区嗯嗯嗯啊| 免费久久99精品国产| 国产精品色呦呦| 欧美三片在线视频观看| 国产剧情一区二区| 亚洲欧美国产毛片在线| 日韩一卡二卡三卡| 99在线精品视频| 午夜精品一区二区三区三上悠亚 | 在线观看视频91| 久色婷婷小香蕉久久| 中文一区在线播放| 欧美一卡二卡在线观看| 成人app下载| 青青草国产成人av片免费| 国产欧美久久久精品影院 | 7777精品伊人久久久大香线蕉完整版| 久久精品久久久精品美女| 国产精品久久久久久久久搜平片 | 国产一区二区福利| 亚洲午夜激情网站| 欧美激情综合在线| 欧美一区二区在线视频| 91在线视频18| 男男视频亚洲欧美| 亚洲精品写真福利| 欧美激情在线观看视频免费| 欧美日韩在线播放三区四区| 成人国产电影网| 久久99精品国产麻豆不卡| 亚洲一区二区三区视频在线| 国产片一区二区三区| 日韩一区二区三区在线视频| 91亚洲精品一区二区乱码| 国产成人夜色高潮福利影视| 青青草97国产精品免费观看 | 精品国产91洋老外米糕| 欧美视频中文一区二区三区在线观看| 国产成人av网站| 久久av资源站| 免费成人av资源网| 亚洲香肠在线观看| 亚洲一二三四在线观看| 国产精品麻豆欧美日韩ww| 久久精品男人的天堂| 欧美精品一区二区三区四区 | 久久er精品视频| 麻豆中文一区二区| 一区二区高清免费观看影视大全 | 亚洲无线码一区二区三区| 国产精品久久久久桃色tv| 国产亚洲欧美中文| 久久综合久久鬼色| 久久精品日产第一区二区三区高清版 | 精品夜夜嗨av一区二区三区| 免费观看在线色综合| 日本少妇一区二区| 免费成人美女在线观看.| 青青草精品视频| 精品一区二区三区在线播放| 久久精品国产77777蜜臀| 老司机精品视频在线| 精品在线你懂的| 国产精品一区二区免费不卡| 美日韩一区二区| 极品少妇xxxx偷拍精品少妇| 国产精品白丝jk黑袜喷水| 国产一区美女在线| 国产精品一区二区久激情瑜伽| 国产黄色精品网站| 波多野结衣亚洲一区| 色综合天天做天天爱| 在线免费不卡视频| 在线不卡欧美精品一区二区三区| 欧美丰满嫩嫩电影| 2欧美一区二区三区在线观看视频 337p粉嫩大胆噜噜噜噜噜91av | 日韩理论片一区二区| 日韩欧美色电影| 成人av电影在线观看| 丁香亚洲综合激情啪啪综合| 福利一区福利二区| 精品一区二区精品| 亚洲黄色免费电影| 亚洲精品乱码久久久久久久久| 中文字幕亚洲在| 一区二区中文字幕在线| 亚洲黄色性网站| 性做久久久久久免费观看| 久久丁香综合五月国产三级网站| 国产美女娇喘av呻吟久久| av不卡一区二区三区| 欧美日韩国产经典色站一区二区三区| 欧美一区二区三区小说| 久久伊人中文字幕| 伊人一区二区三区| 久久国产人妖系列| 一本大道久久a久久精二百| 欧美美女bb生活片| 久久男人中文字幕资源站| 亚洲男人的天堂av| 老司机精品视频导航| 99精品视频中文字幕| 欧美一区二区三区播放老司机| 久久久精品黄色| 亚洲v日本v欧美v久久精品| 国产伦精品一区二区三区在线观看| 色综合咪咪久久| 久久综合久久99| 亚洲成人自拍偷拍| 国产精品自拍在线| 欧美狂野另类xxxxoooo| 综合亚洲深深色噜噜狠狠网站| 日本aⅴ免费视频一区二区三区| 成人小视频在线| 日韩欧美高清一区| 亚洲综合在线视频| 国产成人欧美日韩在线电影| 欧美一级片在线| 亚洲精品日韩一| 成人午夜视频在线观看| 日韩免费高清av| 香蕉乱码成人久久天堂爱免费| 成人一区在线看| 精品国产区一区| 日韩 欧美一区二区三区| 91免费版pro下载短视频| 久久久久久综合| 日韩1区2区3区| 欧美人伦禁忌dvd放荡欲情| 亚洲精品免费在线| 成人国产精品免费网站| 2023国产精华国产精品| 日本午夜精品视频在线观看| 一本久久综合亚洲鲁鲁五月天 | 伊人性伊人情综合网| 成人免费毛片高清视频| 91精品免费观看| 亚洲国产视频一区| 欧美亚洲国产一区二区三区 | 亚洲综合网站在线观看| 99久久久久久99| 国产精品国产三级国产aⅴ原创 | **欧美大码日韩| 国产成人午夜99999| 亚洲精品一区二区精华| 麻豆91小视频| 91精品国产综合久久福利软件| 亚洲一区二区三区小说| 欧美自拍丝袜亚洲| 一区二区三区欧美久久| 在线观看免费亚洲| 亚洲精品国产精华液| 日本韩国一区二区三区视频| 亚洲精品视频免费观看| 欧美写真视频网站| 亚洲国产精品久久久久婷婷884| 在线看一区二区| 性久久久久久久| 日韩精品一区二区在线观看| 久久精品国内一区二区三区| 欧美精品一区二区三区蜜桃视频| 狠狠色综合色综合网络| 久久久国产一区二区三区四区小说 | 91国内精品野花午夜精品 | 亚洲视频香蕉人妖| 91碰在线视频| 亚洲18色成人| 精品国产精品网麻豆系列 | 色婷婷av一区二区三区gif| 亚洲欧美韩国综合色| 欧美日韩五月天| 青青草国产精品97视觉盛宴| 久久精品人人爽人人爽| 91天堂素人约啪| 午夜精品视频在线观看| 精品999在线播放| 99久久精品免费观看| 亚洲观看高清完整版在线观看| 欧美一区二区三区啪啪| 国产成人免费视频网站| 一区二区成人在线| 精品久久一区二区三区| 成人国产亚洲欧美成人综合网| 亚洲午夜羞羞片| 久久久久久久久久久久久夜| aaa亚洲精品|