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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? tokenrepository.java~9~

?? jwap 協(xié)議 udp 可以用于手機(jī)通訊
?? JAVA~9~
字號(hào):
/** * JWAP - A Java Implementation of the WAP Protocols * Copyright (C) 2001-2004 Niko Bender * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */package net.sourceforge.jwap.util.wbxml;/** * * @author <a href="mailto:suvarna@witscale.com">Suvarna Kadam</a> */import java.io.FileInputStream;import java.io.FileNotFoundException;import java.io.IOException;import java.util.Hashtable;import java.util.Iterator;import java.util.Map;import java.util.Properties;import java.util.Vector;import javax.xml.parsers.DocumentBuilderFactory;import org.w3c.dom.Document;import org.w3c.dom.Element;import org.w3c.dom.NodeList;public class TokenRepository {	private static Properties urnMappings;	private static TokenRepository instance;	private static byte CODEPAGE_DEFAULT = (byte) 0;	private static byte currentCodepage = CODEPAGE_DEFAULT;	//	private byte wbxmlEncoding;	//	private byte charEncoding;	//	private String publicID;	private Document tokenDoc;	//	private Hashtable tags;	//	private Hashtable attributeNames;	//private Hashtable attributeNameTokens; // for decoder	//	private Hashtable attributeValues;	//	private Hashtable attributePrefixes;	private Hashtable[][] codepages;	private TokenRepository() {	}	public static TokenRepository getInstance(String publicIDInHex) {		if (instance == null) {			instance = new TokenRepository();			instance.initializeFor(publicIDInHex);		}		return instance;	}	public void initializeFor(String publicIDInHex) {		try {			Properties tokenRepositoryMappings = new Properties();			tokenRepositoryMappings.load(                                  TokenRepository.class.getResourceAsStream("/net/sourceforge/jwap/resources/wbxml/tokenRepositoryMappings.properties"));				//new FileInputStream("./tokenRepositoryMappings.properties"));                                //new FileInputStream("./net/sourceforge/jwap/resources/wbxml/tokenRepositoryMappings.properties"));			String fileName =				tokenRepositoryMappings.getProperty(publicIDInHex);                        if(fileName.equals(""))                        {                           return;                        }                        else                        {                         String tempstr="";                         tempstr=fileName.substring(1);                         fileName="/net/sourceforge/jwap/resources/wbxml"+tempstr;                        }			tokenDoc =				DocumentBuilderFactory					.newInstance()					.newDocumentBuilder()					.parse(					fileName);			initializeURNMappings();			initializeHeaderInfo();			currentCodepage = CODEPAGE_DEFAULT;		} catch (Exception exp) {			exp.printStackTrace();		}	}	private void initializeURNMappings() {		urnMappings = new Properties();		try {			urnMappings.load(                        TokenRepository.class.getResourceAsStream("/net/sourceforge/jwap/resources/wbxml/urnCodepageMappings.properties"));				//new FileInputStream("./urnCodepageMappings.properties"));		} catch (FileNotFoundException fnfExp) {			fnfExp.printStackTrace();		} catch (IOException ioExp) {			ioExp.printStackTrace();		}	}	private void initializeHeaderInfo() {		int total_codePages =			tokenDoc.getElementsByTagName("codepage").getLength();		codepages = new Hashtable[total_codePages][5];		for (int i = 0; i < codepages.length; i++) {			Element codepage = getCodepage(i);			initializeTags(codepage, i);			initializeAttributeNames(codepage, i);			initializeAttributeNameTokens(codepage, i);			initializeAttributeValues(codepage, i);		}		//		publicID = codePage.getAttribute("publicID");		//		String wbxmlEncodingStr = codePage.getAttribute("wbxmlVersion");		//		int dotPosition = wbxmlEncodingStr.indexOf('.');		//		byte majorVersion =		//			Byte.parseByte(wbxmlEncodingStr.substring(0, dotPosition));		//		majorVersion = (byte) (majorVersion - 1);		//		byte minorVersion =		//			Byte.parseByte(		//				wbxmlEncodingStr.substring(wbxmlEncodingStr.indexOf('.') + 1));		//		wbxmlEncoding = (byte) ((majorVersion << 4) + minorVersion);		//		String charEncodingStr = codePage.getAttribute("default_encoding");		//		charEncoding =		//			(byte) IANACharSet.getMIBEnum(charEncodingStr.toUpperCase());	}	private void initializeTags(Element codepage, int codePageNo) {		Hashtable tags = new Hashtable();		NodeList tagNodes = codepage.getElementsByTagName("tag");		Element aTag;		for (int i = 0; i < tagNodes.getLength(); i++) {			aTag = (Element) tagNodes.item(i);			tags.put(				aTag.getAttribute("name").toLowerCase(),				aTag.getAttribute("token-value"));		}		codepages[codePageNo][0] = tags;	}	private Element getCodepage(int codePageNo) {		NodeList allCodepages = tokenDoc.getElementsByTagName("codepage");		for (int i = 0; i < allCodepages.getLength(); i++) {			Element codepage = (Element) allCodepages.item(i);			if (Integer.parseInt(codepage.getAttribute("number").trim())				== codePageNo)				return codepage;		}		return null;	}	private void initializeAttributeNames(Element codepage, int codePageNo) {		Hashtable attributeNames = new Hashtable();		Hashtable attributePrefixes = new Hashtable();		NodeList attributeNameNodes =			codepage.getElementsByTagName("attribute-start");		Element anAttributeNameNode;		for (int i = 0; i < attributeNameNodes.getLength(); i++) {			anAttributeNameNode = (Element) attributeNameNodes.item(i);			String name = anAttributeNameNode.getAttribute("name");			String prefix = anAttributeNameNode.getAttribute("prefix");			String key = name + prefix;			attributeNames.put(				key.toLowerCase(),				anAttributeNameNode.getAttribute("token-value"));			if (attributePrefixes.containsKey(name))				 ((Vector) attributePrefixes.get(name)).addElement(prefix);			else {				Vector prefixes = new Vector();				prefixes.addElement(prefix);				attributePrefixes.put(name, prefixes);			}		}		codepages[codePageNo][1] = attributeNames;		codepages[codePageNo][2] = attributePrefixes;	}	private void initializeAttributeNameTokens(		Element codepage,		int codePageNo) {		Hashtable attributeNameTokens = new Hashtable();		NodeList attributeNameNodes =			tokenDoc.getElementsByTagName("attribute-start");		Element anAttributeNameNode;		for (int i = 0; i < attributeNameNodes.getLength(); i++) {			anAttributeNameNode = (Element) attributeNameNodes.item(i);			String token =				String.valueOf(					getByteValue(						anAttributeNameNode.getAttribute("token-value")));			String[] nameAndPrefixes = new String[2];			String name = anAttributeNameNode.getAttribute("name");			String prefix = anAttributeNameNode.getAttribute("prefix");			nameAndPrefixes[0] = name;			nameAndPrefixes[1] = prefix;			attributeNameTokens.put(token.toLowerCase(), nameAndPrefixes);		}		codepages[codePageNo][4] = attributeNameTokens;	}	private void initializeAttributeValues(Element codepage, int codePageNo) {		Hashtable attributeValues = new Hashtable();		NodeList attributeValueNodes =			codepage.getElementsByTagName("attribute-value");		Element anAttributeValueNode;		for (int i = 0; i < attributeValueNodes.getLength(); i++) {			anAttributeValueNode = (Element) attributeValueNodes.item(i);			attributeValues.put(				anAttributeValueNode.getAttribute("name").toLowerCase(),				anAttributeValueNode.getAttribute("token-value"));		}		codepages[codePageNo][3] = attributeValues;	}	public byte getTagToken(String tagName) {		Hashtable tags = codepages[currentCodepage][0];		return getByteValue(tags.get(tagName.toLowerCase()).toString());	}	private byte getByteValue(String value) {		try {			//byte tokenValue = Byte.parseByte(value, 16);			byte tokenValue = Integer.valueOf(value, 16).byteValue();			return tokenValue;		} catch (Exception exp) {			System.out.println("token not found!!!, returning literal");			return GlobalTokens.LITERAL;		}	}	public String getPublicIdentifier() {		Element codePage =			(Element) tokenDoc.getElementsByTagName("codepage").item(0);		return codePage.getAttribute("publicID");	}	public String getTagName(byte tokenValue) {		Hashtable tags = codepages[currentCodepage][0];		Iterator iterator = tags.entrySet().iterator();		return getKeyFromValue(iterator, tokenValue);	}	public String[] getAttributeNameAndPrefix(byte tokenValue) {		Hashtable attributeNameTokens = codepages[currentCodepage][4];		String token = String.valueOf(tokenValue);		return (String[]) attributeNameTokens.get(token);	}	public byte getAttributeNameToken(String attributeName, String prefix) {		Hashtable attributeNames = codepages[currentCodepage][1];		String token =			(String) attributeNames.get((attributeName + prefix).toLowerCase());		if (token == null)			return GlobalTokens.LITERAL;		return getByteValue(token);	}	public Vector getAttributePrefixes(String attributeName) {		Hashtable attributePrefixes = codepages[currentCodepage][2];		return (Vector) attributePrefixes.get(attributeName);	}	public String getAttributeValue(byte tokenValue) {		Hashtable attributeValues = codepages[currentCodepage][3];		Iterator iterator = attributeValues.entrySet().iterator();		return getKeyFromValue(iterator, tokenValue);	}	public byte getAttributeValueToken(String attributeValue) {		Hashtable attributeValues = codepages[currentCodepage][3];		String hexValue =			attributeValues.get(attributeValue.toLowerCase()).toString();		return getByteValue(hexValue);	}	private String getKeyFromValue(Iterator iterator, byte tokenValue) {		while (iterator.hasNext()) {			Map.Entry entry = (Map.Entry) iterator.next();			if (getByteValue(entry.getValue().toString()) == tokenValue)				return entry.getKey().toString();		}		return null;	}	/**	* Returns the attributeValues.	* @return Hashtable	*/	public Hashtable getAttributeValues() {		Hashtable attributeValues = codepages[currentCodepage][3];		return attributeValues;	}	public static void switchCodepage(String namespaceURN) {		if (namespaceURN == null)			currentCodepage = CODEPAGE_DEFAULT;		else {			byte codepage =				Integer					.valueOf(urnMappings.get(namespaceURN).toString())					.byteValue();			currentCodepage = codepage;		}	}	public static void setCurrentCodepage(byte codePageNo) {		currentCodepage = codePageNo;	}	public static byte getCurrentCodepage() {		return currentCodepage;	}	/**	 * @return String	 */	public String getCurrentNamespace() {		// TODO Auto-generated method stub		return null;	}}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
一区二区三区日韩在线观看| 欧美偷拍一区二区| 日韩精品一区在线| 久久精品国产亚洲高清剧情介绍 | 精品一区二区av| 欧美天堂一区二区三区| 丝袜诱惑制服诱惑色一区在线观看 | 免费欧美在线视频| 在线观看视频91| 婷婷中文字幕一区三区| 欧美日本一区二区三区四区| 日韩欧美二区三区| 国产精品69久久久久水密桃| 久久天堂av综合合色蜜桃网| 国产福利一区二区| 中文字幕不卡在线播放| 成人免费视频播放| 亚洲第一精品在线| 欧美一二区视频| 国内精品视频666| 欧美国产日本视频| 91偷拍与自偷拍精品| 一区二区三区美女视频| 91免费看视频| 亚洲一线二线三线久久久| 91精品国产全国免费观看| 美女久久久精品| 国产视频一区二区在线观看| 一道本成人在线| 亚洲1区2区3区4区| 欧美精品vⅰdeose4hd| 日本成人超碰在线观看| 精品国产三级电影在线观看| 91丨九色丨黑人外教| 亚洲国产综合人成综合网站| 欧美一区午夜视频在线观看| www.性欧美| 另类成人小视频在线| 欧美亚男人的天堂| 国产精品亚洲成人| 一区二区三区久久| 日韩精品最新网址| 欧美亚洲一区二区在线观看| 裸体一区二区三区| 日韩欧美在线123| 91麻豆精品视频| 日韩vs国产vs欧美| 国产精品久久三| 欧美日本高清视频在线观看| 国产成人av资源| 亚洲影院理伦片| 欧美韩国日本综合| 欧美区视频在线观看| 99久久伊人精品| 久久国产精品免费| 亚洲一区二区三区四区五区中文 | 制服丝袜在线91| 精品午夜久久福利影院 | 99久久综合国产精品| 欧美男女性生活在线直播观看| 久久久综合网站| 老司机精品视频在线| 午夜精品爽啪视频| 成人欧美一区二区三区小说 | 国产亚洲一区二区在线观看| 91国产免费看| av不卡在线播放| 国产综合色在线| 亚洲品质自拍视频网站| 2020日本不卡一区二区视频| 在线观看成人小视频| 波多野结衣欧美| 免费观看在线综合| 亚洲aⅴ怡春院| 亚洲精品乱码久久久久久黑人| 精品国产免费一区二区三区香蕉| 欧美图片一区二区三区| 国产精品456露脸| 国产在线播放一区三区四| 亚洲午夜三级在线| 午夜国产不卡在线观看视频| √…a在线天堂一区| 久久这里只有精品视频网| 欧美xxxxx牲另类人与| 777午夜精品视频在线播放| 成人免费三级在线| 国产91在线看| 国产精品91一区二区| 亚洲综合色网站| 亚洲综合区在线| 一区二区三区高清| 亚洲一区二区三区四区五区中文| aaa亚洲精品| 一区二区国产视频| 亚洲一区在线观看免费观看电影高清 | 亚洲精品日产精品乱码不卡| 国产视频一区不卡| 97se亚洲国产综合自在线不卡| 亚洲三级免费电影| 久久一区二区三区四区| 国产日韩精品一区二区浪潮av| 青青青爽久久午夜综合久久午夜| 国产精品电影院| 国产精品一二三区在线| 99精品桃花视频在线观看| 高潮精品一区videoshd| 欧美亚男人的天堂| 国产拍欧美日韩视频二区| 亚洲电影中文字幕在线观看| 色婷婷av一区二区三区软件| 日韩三级免费观看| 99久久国产综合精品女不卡| 欧美日韩国产高清一区二区| av午夜一区麻豆| 欧美在线视频你懂得| 欧美一区二区三区小说| 欧美午夜精品久久久久久孕妇| 欧美日韩在线一区二区| 日韩欧美一区二区在线视频| 国产精品毛片无遮挡高清| 亚洲国产精品自拍| 国产乱妇无码大片在线观看| 91啦中文在线观看| 91精品国产麻豆| 亚洲免费视频中文字幕| 一本色道久久综合亚洲精品按摩| 亚洲成av人综合在线观看| 国产风韵犹存在线视精品| 欧美三级电影在线观看| 亚洲视频一二三区| 奇米色一区二区三区四区| 日本道色综合久久| 精品在线播放免费| 三级久久三级久久| 成人免费高清在线| 欧美高清视频一二三区| 制服丝袜亚洲色图| 又紧又大又爽精品一区二区| 日本最新不卡在线| 色综合久久精品| 日韩美女天天操| 亚洲男人天堂一区| 国产高清不卡一区| 精品视频一区 二区 三区| 久久久久久久一区| 欧美tickle裸体挠脚心vk| 欧美一区二区三区爱爱| 欧美精品一区二区三区蜜桃| 亚洲免费观看在线观看| 麻豆久久久久久| 欧美少妇xxx| 中文字幕乱码亚洲精品一区| 亚洲欧美日韩一区| 丁香婷婷综合激情五月色| 欧美精品三级在线观看| 亚洲欧美aⅴ...| 国产精品夜夜爽| 91在线视频在线| 国产精品每日更新在线播放网址| 免费在线观看一区二区三区| 日本精品免费观看高清观看| 国产日韩欧美精品综合| 国产一区二区三区四区五区入口| 欧美撒尿777hd撒尿| 国产欧美精品国产国产专区| 韩日av一区二区| 欧美成人综合网站| 午夜久久久影院| 色综合一个色综合亚洲| 日本一区免费视频| 精品一区二区三区日韩| 8v天堂国产在线一区二区| 亚洲va国产天堂va久久en| 91年精品国产| 国产精品久久久久一区| 老司机午夜精品| 欧美日韩免费在线视频| 日日夜夜免费精品| 欧美三级日本三级少妇99| 天天av天天翘天天综合网色鬼国产 | 亚洲色图在线看| 国产91精品露脸国语对白| 精品国产三级电影在线观看| 国产伦精品一区二区三区免费| 91精品国产91久久综合桃花| 免费成人在线影院| 3d动漫精品啪啪1区2区免费| 三级亚洲高清视频| 欧美私人免费视频| 丝袜美腿亚洲一区| 欧美疯狂性受xxxxx喷水图片| 亚洲精品综合在线| 欧美日韩精品二区第二页| 午夜日韩在线电影| 欧美日本高清视频在线观看| 丝袜脚交一区二区| 欧美性受极品xxxx喷水| 精品一区二区免费看| 久久亚洲一区二区三区明星换脸| 国产成人在线影院|