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

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

?? tokenrepository.java~8~

?? jwap 協議 udp 可以用于手機通訊
?? JAVA~8~
字號:
/** * 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);                        }			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;	}}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
色嗨嗨av一区二区三区| 欧美肥妇free| 欧美另类z0zxhd电影| 亚洲制服丝袜一区| 97精品国产露脸对白| 亚洲一区二区三区小说| 91精品国产免费久久综合| 日日夜夜免费精品| 日韩美女主播在线视频一区二区三区 | 91视视频在线直接观看在线看网页在线看| 精品伦理精品一区| 粉嫩在线一区二区三区视频| 中文字幕一区二区三区精华液| 国产成人亚洲综合a∨婷婷| 中文字幕一区日韩精品欧美| 91久久国产最好的精华液| 青草av.久久免费一区| 国产精品毛片高清在线完整版| 成人91在线观看| 蜜桃一区二区三区四区| 日韩精品一区二区三区中文不卡| 国产不卡在线一区| 亚洲国产精品久久久久婷婷884| 欧美不卡视频一区| 69p69国产精品| 91精品福利在线| 成年人国产精品| 国产传媒久久文化传媒| 免费一级片91| 久久99最新地址| 亚洲精品美国一| 亚洲欧美日韩中文播放| 国产三区在线成人av| 26uuu成人网一区二区三区| 欧美日韩一区二区三区在线看| 久久成人18免费观看| 久久国产精品色| 日韩av电影天堂| 欧美精品777| 欧美在线|欧美| 91在线视频在线| 欧美优质美女网站| 在线播放国产精品二区一二区四区| 欧美性感一类影片在线播放| 在线中文字幕不卡| 日韩一级免费观看| 精品国产一区二区三区久久影院| 久久久蜜桃精品| 一区二区三区精品在线观看| 日韩中文字幕区一区有砖一区 | 国产精品1区二区.| 色妞www精品视频| 久久久久国产精品麻豆ai换脸| 国产精品你懂的| 国产一区二区三区免费看| 91在线视频18| 国产欧美精品国产国产专区| 午夜欧美大尺度福利影院在线看| 成人性生交大片免费看在线播放| 欧美丰满一区二区免费视频| 自拍偷拍国产精品| av网站免费线看精品| 精品精品国产高清一毛片一天堂| 亚洲精品一卡二卡| 风间由美性色一区二区三区| 精品久久久久一区二区国产| 亚洲福中文字幕伊人影院| 91香蕉视频污| 亚洲成av人片一区二区梦乃| 欧美系列一区二区| 亚洲电影一级黄| 欧美日韩中文精品| 视频在线观看一区| 欧美精品在欧美一区二区少妇| 亚洲v中文字幕| 欧美一区二区三区四区在线观看 | 亚洲成在人线免费| 日韩一区二区三区视频在线观看| 亚洲一区在线观看免费| 91丨porny丨最新| 亚洲永久免费视频| 久久综合久色欧美综合狠狠| 97精品久久久午夜一区二区三区 | 亚洲一二三四久久| 日韩欧美不卡一区| 不卡视频一二三| 国产在线不卡一区| 亚洲一二三四在线| 中文字幕成人网| 在线播放一区二区三区| 精品制服美女丁香| 欧美一区二区视频观看视频| 国产在线播放一区| 亚洲美女一区二区三区| 精品国产99国产精品| 99r国产精品| 国产一区在线观看视频| 亚洲综合色噜噜狠狠| 久久综合久久久久88| 欧美二区在线观看| 99视频有精品| 国产69精品久久99不卡| 精品一区二区免费在线观看| 悠悠色在线精品| 日韩毛片视频在线看| 欧美精品一区二区三区高清aⅴ| 在线视频亚洲一区| 91色九色蝌蚪| 成人av在线播放网址| 高清在线成人网| 成人精品视频.| 91美女片黄在线观看91美女| 日本黄色一区二区| 色噜噜狠狠色综合欧洲selulu| 91丨九色丨黑人外教| 在线中文字幕一区| 欧美日韩在线三级| 欧美一级午夜免费电影| www国产成人| 综合色天天鬼久久鬼色| 亚洲影视在线播放| 经典三级在线一区| 丁香六月综合激情| av中文字幕不卡| 欧美三级午夜理伦三级中视频| 欧美日韩免费不卡视频一区二区三区| 欧美视频一区二| 国产日韩三级在线| 性久久久久久久久久久久| 国产东北露脸精品视频| 99久久er热在这里只有精品66| 色综合一个色综合亚洲| 欧美日韩国产系列| 国产精品视频一区二区三区不卡| 亚洲欧美经典视频| 久久精品国产77777蜜臀| av影院午夜一区| 久久奇米777| 蜜桃av噜噜一区| 欧美天天综合网| 国产精品嫩草影院com| 亚州成人在线电影| 色香蕉久久蜜桃| 精品日韩在线一区| 五月开心婷婷久久| 色综合色综合色综合色综合色综合| 日韩欧美美女一区二区三区| 综合欧美一区二区三区| a4yy欧美一区二区三区| 欧美韩日一区二区三区四区| 美女一区二区视频| 2021久久国产精品不只是精品| 亚洲成人自拍网| 欧美日韩精品一区二区三区四区| 亚洲乱码精品一二三四区日韩在线| 国产成人在线视频网址| 久久嫩草精品久久久精品| 国产精品一区二区男女羞羞无遮挡 | 精品写真视频在线观看| 久久久久久一级片| 成人a免费在线看| 一区二区激情小说| 欧美视频一区二区三区| 国产一区二区三区黄视频| 国产日韩精品一区| 亚洲欧洲国产日本综合| 日韩一级高清毛片| 久久免费午夜影院| 日韩美女视频一区二区| 午夜精品一区二区三区三上悠亚 | 中文字幕国产一区| 一区二区三区日韩在线观看| eeuss鲁片一区二区三区在线看 | 91看片淫黄大片一级| 东方aⅴ免费观看久久av| 从欧美一区二区三区| 成人免费视频视频| 一本久久a久久免费精品不卡| 成人不卡免费av| 91在线视频官网| 欧美色电影在线| 91九色最新地址| 欧美这里有精品| 日韩欧美一区电影| 中文字幕精品一区| 中文字幕在线观看不卡| 欧美精品一区二区久久婷婷| 91精品国产入口| 国产成人综合亚洲91猫咪| 麻豆精品一区二区| 美女高潮久久久| 另类调教123区| 久久国产福利国产秒拍| 国产福利精品一区| 成人av网站在线观看免费| 色诱亚洲精品久久久久久| 91国产丝袜在线播放| 欧美性欧美巨大黑白大战| 日韩一区二区在线观看视频播放| 欧美一级精品在线|