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

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

?? tokenrepository.java~10~

?? jwap 協議 udp 可以用于手機通訊
?? JAVA~10~
字號:
/** * 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;                         TokenRepository.class.getResourceAsStream(fileName);                        }			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| 久久久久99精品国产片| 亚洲人成人一区二区在线观看| 青青草伊人久久| 91丝袜美女网| 久久久高清一区二区三区| 午夜不卡在线视频| a级高清视频欧美日韩| 日韩女优毛片在线| 亚洲图片欧美色图| 91免费观看视频| 国产欧美综合色| 九九国产精品视频| 欧美高清视频www夜色资源网| 国产精品久久午夜夜伦鲁鲁| 国产又黄又大久久| 欧美刺激脚交jootjob| 五月激情丁香一区二区三区| 欧洲一区在线观看| 亚洲主播在线观看| 色综合天天综合网国产成人综合天| 日本一区二区三区电影| 国产精品亚洲一区二区三区妖精| 久久综合色播五月| 国产真实乱子伦精品视频| 日韩欧美国产电影| 国产成人在线网站| 国产成人av影院| 国产婷婷色一区二区三区在线| 美女精品自拍一二三四| 欧美久久一二三四区| 亚洲麻豆国产自偷在线| 99久久精品免费看国产免费软件| 久久精品一区二区| 福利视频网站一区二区三区| 精品国产伦一区二区三区观看方式| 视频一区视频二区在线观看| 制服丝袜激情欧洲亚洲| 免费观看成人鲁鲁鲁鲁鲁视频| 欧美男男青年gay1069videost | 亚洲国产成人91porn| 一本到不卡免费一区二区| 亚洲色图欧洲色图婷婷| 在线免费观看一区| 日韩中文字幕一区二区三区| 日韩欧美在线综合网| 国产乱码精品一区二区三区忘忧草 | 久久99国产精品久久99| 一区二区三区四区激情| 亚洲精品美腿丝袜| 国产精品美女一区二区三区| 亚洲精品videosex极品| 一区二区在线免费观看| 亚洲婷婷综合久久一本伊一区| 国产精品午夜免费| 中文字幕欧美一| 亚洲高清免费观看| 久久精品国产在热久久| 成人免费电影视频| 成人午夜在线视频| 欧美一区二区在线播放| 欧美精品一区二区在线播放| 国产精品人人做人人爽人人添| 亚洲欧洲日韩av| 高清国产午夜精品久久久久久| 亚洲国产精品麻豆| 国产另类ts人妖一区二区| 国产成人亚洲综合色影视| 91.com在线观看| 全部av―极品视觉盛宴亚洲| 五月开心婷婷久久| 亚洲国产成人91porn| 91免费视频网址| 精品写真视频在线观看| 91精品国产入口| 亚洲精品国久久99热| 日韩一区二区三区高清免费看看| 国产成人aaa| 午夜成人在线视频| 自拍偷拍国产亚洲| 久久久久九九视频| 欧美男女性生活在线直播观看| 成人午夜精品在线| 蜜臀99久久精品久久久久久软件| 欧美成人艳星乳罩| 天天影视网天天综合色在线播放| 一本一道久久a久久精品| 国产欧美一区二区精品婷婷| 美女尤物国产一区| 日韩一区二区三区在线观看| 日韩精品午夜视频| 日韩精品一区二区三区视频| 久久爱www久久做| 欧美不卡在线视频| 国产福利91精品一区二区三区| 欧美精品xxxxbbbb| 一区二区三区鲁丝不卡| 欧美在线观看视频在线| 一区二区激情小说| 日本久久电影网| 免费欧美高清视频| 久久久久久久久97黄色工厂| 国产成人自拍在线| 亚洲一区二区三区四区的| 欧美性一区二区| 成人综合日日夜夜| 亚洲第四色夜色| 国产精品无遮挡| 欧美日韩精品一区二区| 国产成人精品一区二区三区网站观看 | 中文幕一区二区三区久久蜜桃| 国产一区二区三区免费看| 91精品国产91久久久久久一区二区| 精品一区二区在线观看| 精品国内片67194| 国产精品久久国产精麻豆99网站| 日韩精品每日更新| 日韩欧美在线123| 国产sm精品调教视频网站| 麻豆视频一区二区| 日本三级韩国三级欧美三级| 日韩av电影天堂| 日本v片在线高清不卡在线观看| 日韩av不卡一区二区| 国产精品麻豆视频| 国产精品护士白丝一区av| 亚洲欧美日韩精品久久久久| 亚洲黄色录像片| 日本中文字幕一区| 麻豆精品在线看| 亚洲欧美国产毛片在线| 久久久精品2019中文字幕之3| 精品国产亚洲一区二区三区在线观看| 94色蜜桃网一区二区三区| 国产精品亚洲综合一区在线观看| 一区二区三区四区在线播放| 国产日韩精品视频一区| 日韩欧美中文字幕一区| 日韩精品专区在线| 精品99久久久久久| 美女视频黄a大片欧美| 欧美精品一区二区久久久| 精品国产电影一区二区| 欧美mv和日韩mv的网站| 国产精品久久久久久久久免费相片| 综合精品久久久| 久久国产三级精品| 99久久久免费精品国产一区二区 | 国产精品一区在线观看乱码 | 欧美午夜电影网| 精品国产免费人成在线观看| 亚洲视频一区二区在线观看| 偷窥国产亚洲免费视频| 国产福利一区在线| 欧美三级视频在线| 国产精品人人做人人爽人人添| 五月天中文字幕一区二区| 国产精品亚洲专一区二区三区 | 色香色香欲天天天影视综合网| 91麻豆精品国产91久久久资源速度| 国产视频一区二区在线观看| 亚洲狠狠丁香婷婷综合久久久| 久久99国产精品免费网站| 91麻豆免费看| 久久久久久久久久看片| 午夜精品久久久| 91丨九色丨蝌蚪丨老版| 精品久久久久久综合日本欧美| 亚洲一区av在线| 成人av资源在线观看| 精品国内二区三区| 日韩精品久久久久久| 色婷婷av一区二区三区gif| 精品sm捆绑视频| 婷婷久久综合九色综合伊人色| 91麻豆精品视频| 国产欧美一区二区精品婷婷| 久久精品二区亚洲w码| 欧美日韩国产成人在线免费| 亚洲欧美日韩成人高清在线一区| 国产精品1024| 2024国产精品视频| 午夜av一区二区| 欧美精品黑人性xxxx| 性做久久久久久免费观看欧美| jizz一区二区| 国产精品美女久久久久高潮| 国产黄色精品网站| 久久久国产综合精品女国产盗摄| 精品无码三级在线观看视频| 538在线一区二区精品国产| 日韩中文字幕一区二区三区| 欧美人与性动xxxx| 亚洲成人精品在线观看| 午夜精品福利视频网站| 欧美一区二区黄| 麻豆国产欧美日韩综合精品二区| 久久久久久久久久久久久女国产乱| 国产aⅴ综合色|