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

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

?? maps.java

?? ZK 基礎介紹 功能操作 模塊 結合數據庫操作
?? JAVA
?? 第 1 頁 / 共 2 頁
字號:
/* Maps.java{{IS_NOTE	Purpose: Utilities for Map	Description: 	History:	 2001/4/25, Tom M. Yeh: Created.}}IS_NOTECopyright (C) 2001 Potix Corporation. All Rights Reserved.{{IS_RIGHT	This program is distributed under GPL Version 2.0 in the hope that	it will be useful, but WITHOUT ANY WARRANTY.}}IS_RIGHT*/package org.zkoss.util;import java.util.List;import java.util.LinkedList;import java.util.Map;import java.util.HashMap;import java.util.Iterator;import java.io.IOException;import java.io.InputStream;import java.io.BufferedReader;import java.io.InputStreamReader;import java.io.PushbackInputStream;import org.zkoss.lang.D;import org.zkoss.lang.Strings;import org.zkoss.mesg.MCommon;import org.zkoss.util.logging.Log;/** * Utilities for process Map. * * @author tomyeh */public class Maps {	private static final Log log = Log.lookup(Maps.class);	/**	 * Reads a property list (key and element pairs) from the input stream,	 * by specifying the charset.	 * <p>Like java.util.Properties, it translates \\u, \n, \r, \t and \f.	 * However, it enhanced Properties as follows.	 *	 * <ul>	 *  <li>It accepts any charset, not just 8859-1.</li>	 *  <li>It uses a different syntax to let value spread over multiple	 *  lines, descrubed below.</li>	 *  <li>Whitespace is trimmed around '=' and at the beginning of	 * the key and the ending of the value.</li>	 *  <li>Illegal lines are ignored (Properties.load considers it	 * as a key with an empty value).</li>	 *  <li>Only '=' is accepted as the separator of key and value.</li>	 *  <li>Only '#' is accepted as comment lines.</li>	 * </ul>	 *	 * <p>To spead a value over multiple lines, you could,	 * unlike java.util.Properties.load, append '{' to the end of a line.	 * Then, all the following lines are considerred as part of a value,	 * unless encountering a line containing only one '}'.<br>	 * Example:	 * <pre><code>abc = {	 *line 1	 *line 2	 *}	 *xyz = {	 *line 1	 *line 2	 *}</code></pre>	 *	 * <p>Moreover, you could prefix a group of keys with certain prefix:	 * <pre><code>org.zkoss.some. {	 * a = aaa	 * b = bbb	 *}</code></pre>	 *	 * It actually defines two keys: "org.zkoss.some.a" and "org.zkoss.some.b".	 *	 * <p>Note: (1) whitespace in the {...} block are all preserved.<br>	 * (2) if only whitespaces is between '=' and '{', they are ignored.	 *	 * @param charset the charset; if null, it detects UTF-16 BOM (0xfe 0xff	 * or 0xff 0xfe). If no UTF-16 BOM, UTF-8 is always assumed.	 * Note 1: UTF-8's BOM (0xef 0xbb 0xbf) is optional, so we don't count on it.	 * Note 2: ISO-8859-1 is not used because we cannot tell its difference	 * from UTF-8 (while some of our properties files are in UTF-8).	 *	 * @param caseInsensitive whether the key used to access the map	 * is case-insensitive. If true, all keys are converted to lower cases.	 */	public final static void load(Map map, InputStream sm, String charset,	boolean caseInsensitive) throws IOException {		final PushbackInputStream pis = new PushbackInputStream(sm, 3);		if (charset == null || charset.startsWith("UTF")) {			final byte[] ahead = new byte[3];			int n = pis.read(ahead);			if (n >= 2			&& ((ahead[0] == (byte)0xfe && ahead[1] == (byte)0xff)				|| (ahead[0] == (byte)0xff && ahead[1] == (byte)0xfe))) {				charset = "UTF-16";				//don't eat UTF-16 BOM, since Java use it to know endian			} else if (n == 3 && ahead[0] == (byte)0xef			&& ahead[1] == (byte)0xbb && ahead[2] == (byte)0xbf) {				charset = "UTF-8";				n = 0; //eat UTF-8 BOM since Java won't handle it			} else if (charset == null) {				charset = "UTF-8";			}			if (n > 0)				pis.unread(ahead, 0, n);		}		final BufferedReader in =			new BufferedReader(new InputStreamReader(pis, charset));		final List prefixes = new LinkedList();		String prefix = null;		String line;		for (int lno = 1; (line = in.readLine()) != null; ++lno) {			int len = line.length();			if (len == 0)				continue;			final Strings.Result res =				Strings.nextToken(line, 0, new char[] {'=', '{', '}'}, true, false);			if (res == null || res.token.startsWith("#"))				continue; //nothing found			if (res.separator == (char)0) {				if (res.token.length() > 0)					log.warning(">>Igored: a key, "+res.token+", without value, line "+lno);				continue;			}			if (res.separator == '{') {				//res.token.lenth() could be zero				if (Strings.skipWhitespaces(line, res.next) < len) //non-space following '{'					throw new IllegalSyntaxException("Invalid nest: '{' must be the last character, line "+lno);				prefixes.add(new Integer(res.token.length()));				prefix = prefix != null ? prefix + res.token: res.token;				continue;			}			if (res.separator == '}' ) {				if (Strings.skipWhitespaces(line, res.next) < len) //non-space following '}'					throw new IllegalSyntaxException("Invalid nesting: '}' must be the last character, line "+lno);				if (prefixes.isEmpty())					throw new IllegalSyntaxException("Invalid nesting: '}' does have any preceding '{', line "+lno);				final Integer i = (Integer)prefixes.remove(prefixes.size() - 1); //pop				prefix = prefixes.isEmpty() ?					null: prefix.substring(0, prefix.length() - i.intValue());				continue;			}			if (res.token.length() == 0) {				log.warning(">>Ignored: wihout key, line "+lno);				continue;			}//			assert res.separator == '=': "Wrong separator: "+res.separator;			final String val;			String key = caseInsensitive ? res.token.toLowerCase(): res.token;			int j = Strings.skipWhitespaces(line, res.next);			int k = Strings.skipWhitespacesBackward(line, len - 1);			if (j == k && line.charAt(k) == '{') { //pack multiple lines				final StringBuffer sb = new StringBuffer();				for (int lnoFrom = lno;;) {					line = in.readLine();					++lno;					if (line == null){						log.warning(							">>Ignored: invalid multiple-line format: '={' does not have following '}', "+lnoFrom);						break;					}					len = line.length();					if (len > 0) {						j = Strings.skipWhitespacesBackward(line, len - 1);						if (j >= 0 && line.charAt(j) == '}') {							if (j > 0)								j = 1 + Strings.skipWhitespacesBackward(line, j - 1);							if (j == 0) //no non-space before }								break;						}					}					if (sb.length() > 0)						sb.append('\n');					sb.append(line);				}				val = sb.toString();			} else {				val = j <= k ? line.substring(j, k + 1): "";			}			map.put(prefix != null ? prefix + key: key, val);		}		if (!prefixes.isEmpty())			log.warning(">>Ignored: unclosed nesting '{': "+prefixes.size());	}	/**	 * Reads a property list (key and element pairs) from the input stream,	 * by specifying the charset.	 */	public final static void load(Map map, InputStream sm, String charset)	throws IOException {		load(map, sm, charset, false);	}	/** Reads a property list (key and element pairs) from the input stream,	 * by detecting correct charset.	 *	 * @param caseInsensitive whether the key used to access the map	 * is case-insensitive. If true, all keys are converted to lower cases.	 */	public final static void load(Map map, InputStream sm,	boolean caseInsensitive) throws IOException {		load(map, sm, null, caseInsensitive);	}	/** Reads a property list (key and element pairs) from the input stream,	 * by detecting correct charset.	 */	public final static void load(Map map, InputStream sm) throws IOException {		load(map, sm, null, false);	}	/**	 * Parses a string into a map.	 *	 * <p>For example, if the following string is parsed:<br/>	 * a12=12,b3,c6=abc=125,x=y	 *	 * <p>Then, a map with the following content is returned:<br/>	 * ("a12", "12"), ("b3", null), ("c6", "abc=125"), ("x", "y")	 *	 * <p>If = is omitted, it is considered as a key with the null value.	 * If you want to consider it as the value, use	 * {@link #parse(Map, String, char, char, boolean)} instead.	 * Actually, this is the same as parse(map, src, separator, quote, false);	 *	 * <p>Notice: only the first = after separator is meaningful,	 * so you don't have to escape the following =.	 *	 * <p>Beside specifying the quote character, you could use back slash	 * quote a single character (as Java does).	 *	 * @param map the map to put parsed results to; null to create a	 * new hash map	 * @param src the string to parse	 * @param separator the separator, e.g., ' ' or ','.	 * @param quote the quote character to surrounding value, e.g.,	 * name = 'value'. If (char)0, no quotation is recognized.	 * Notice: if value is an expression, it is better to specify (char)0	 * because expression might contain strings.	 * @return the map being generated	 *	 * @exception IllegalSyntaxException if syntax errors	 * @see CollectionsX#parse	 * @see #toString(Map, char, char)	 */	public static final Map 

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲图片激情小说| 国产精品久久久久久久久搜平片 | 欧美性做爰猛烈叫床潮| 在线观看精品一区| 91老司机福利 在线| 91在线丨porny丨国产| 成人午夜精品在线| 北岛玲一区二区三区四区| 丁香婷婷深情五月亚洲| 91免费视频观看| 波波电影院一区二区三区| 不卡av在线免费观看| 风间由美一区二区三区在线观看 | 亚洲精品免费在线观看| 亚洲欧美国产高清| 伊人性伊人情综合网| 亚洲一区在线播放| 日韩国产在线一| 激情都市一区二区| 成人高清免费观看| 在线观看日韩一区| 欧美成人午夜电影| 中文字幕日韩精品一区 | 欧洲亚洲国产日韩| 日韩一区二区三区三四区视频在线观看| 欧美日韩一区二区三区免费看 | 欧美aaa在线| 国产成人在线视频网站| 97久久人人超碰| 欧美一区日韩一区| 国产精品日韩成人| 视频一区二区不卡| 成人免费视频播放| 欧美日韩精品专区| 国产亚洲女人久久久久毛片| 亚洲手机成人高清视频| 韩国精品主播一区二区在线观看| 国产精一品亚洲二区在线视频| 粗大黑人巨茎大战欧美成人| 欧美性大战xxxxx久久久| 日韩欧美卡一卡二| 亚洲日本中文字幕区| 久久爱另类一区二区小说| 一本大道久久a久久综合| 日韩久久免费av| 一区二区三区在线视频免费| 久久草av在线| 欧美日韩一区久久| 1000部国产精品成人观看| 蓝色福利精品导航| 欧美日韩精品一区二区三区| 中文成人av在线| 蜜臀av一级做a爰片久久| 色香蕉久久蜜桃| 中文字幕欧美三区| 激情综合网av| 5858s免费视频成人| 玉米视频成人免费看| 粉嫩欧美一区二区三区高清影视| 欧美一区二区三区免费| 亚洲一区二区黄色| 91香蕉视频黄| 亚洲欧洲美洲综合色网| 成人深夜在线观看| 久久久久久久网| 美国毛片一区二区三区| 欧美美女网站色| 亚洲一区二区精品久久av| 91香蕉视频污| 亚洲精品视频在线观看免费| 成人免费高清视频在线观看| 久久精品在线免费观看| 成人国产精品免费| 久久久亚洲高清| 激情六月婷婷久久| 337p粉嫩大胆色噜噜噜噜亚洲| 日韩不卡在线观看日韩不卡视频| 欧美日韩在线免费视频| 亚洲国产wwwccc36天堂| 精品视频免费在线| 天天影视色香欲综合网老头| 欧美日韩国产一区二区三区地区| 一区二区三区精品视频| 欧美综合天天夜夜久久| 亚洲一区二区三区中文字幕| 欧美色图第一页| 日韩高清在线不卡| 日韩精品一区二区在线观看| 精品一二三四区| 日本一区二区三区在线不卡| 粉嫩欧美一区二区三区高清影视| 国产欧美综合色| 色综合久久九月婷婷色综合| 一区二区三区丝袜| 555www色欧美视频| 国产一区二区三区美女| 中文字幕在线不卡视频| 欧美三级午夜理伦三级中视频| 日本伊人午夜精品| 国产嫩草影院久久久久| 色综合久久综合网欧美综合网| 亚洲va欧美va天堂v国产综合| 日韩视频在线永久播放| 国产成人av一区二区| 亚洲免费观看高清完整版在线观看熊 | 国产精品天美传媒| 色www精品视频在线观看| 日韩二区在线观看| 国产精品无码永久免费888| 91精品国产欧美一区二区| 国模冰冰炮一区二区| 亚洲精选一二三| 日韩欧美国产小视频| 99久久精品免费看国产免费软件| 亚洲第一激情av| 国产欧美一区二区精品久导航| 91精品福利视频| 国产一区二区三区蝌蚪| 亚洲一区二区三区在线| 国产欧美日韩精品在线| 欧美日韩一区高清| 成年人午夜久久久| 捆绑调教美女网站视频一区| 最新中文字幕一区二区三区| 欧美www视频| 在线观看不卡一区| 成人av网站免费观看| 日韩中文字幕1| 亚洲色图一区二区| 国产视频一区二区在线| 欧美一区二区三区啪啪| 日本高清视频一区二区| 国产91在线观看丝袜| 秋霞影院一区二区| 亚洲va欧美va人人爽| 亚洲精品成人少妇| 国产精品午夜电影| 国产嫩草影院久久久久| 国产亚洲女人久久久久毛片| 日韩免费成人网| 欧美一区二区观看视频| 欧美精品亚洲二区| 欧美三级乱人伦电影| 一本久久a久久精品亚洲| 丁香天五香天堂综合| 国产在线观看免费一区| 久久99精品久久久久久动态图| 香蕉乱码成人久久天堂爱免费| 亚洲女人小视频在线观看| 中文无字幕一区二区三区| 久久丝袜美腿综合| 精品对白一区国产伦| 日韩欧美一区二区视频| 91精品国产色综合久久 | 日韩中文字幕亚洲一区二区va在线 | 2017欧美狠狠色| 欧美videofree性高清杂交| 欧美一级精品大片| 91精品国产麻豆| 欧美一区二区三级| 日韩欧美黄色影院| 久久久亚洲高清| 中文字幕精品在线不卡| 国产精品二区一区二区aⅴ污介绍| 亚洲国产精品ⅴa在线观看| 国产精品久久久久影院亚瑟| 亚洲欧洲精品成人久久奇米网| 国产精品白丝在线| 亚洲综合清纯丝袜自拍| 亚洲成人av免费| 日韩av一级电影| 紧缚捆绑精品一区二区| 成人成人成人在线视频| 欧美曰成人黄网| 911精品国产一区二区在线| 欧美www视频| 亚洲图片你懂的| 日韩极品在线观看| 国产成人av电影免费在线观看| 99热在这里有精品免费| 欧美午夜片在线看| 欧美xxxxx裸体时装秀| 国产精品久久久久一区二区三区共 | 3atv一区二区三区| 精品不卡在线视频| 亚洲精品午夜久久久| 理论电影国产精品| 91在线无精精品入口| 日韩欧美不卡一区| 亚洲嫩草精品久久| 久久国产精品色婷婷| 91免费观看国产| 久久先锋影音av鲁色资源网| 中文字幕视频一区二区三区久| 婷婷成人综合网| 9i在线看片成人免费| 日韩精品一区二区三区在线观看| 综合激情成人伊人| 激情小说亚洲一区| 欧美视频一区二区三区|