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

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

?? wbxmldecoder.java~3~

?? jwap 協(xié)議 udp 可以用于手機通訊
?? JAVA~3~
?? 第 1 頁 / 共 2 頁
字號:
		while (maskedTokenValue != 01) { // END (of parent element)
			byte actualTokenValue = getTokenValue(maskedTokenValue);
			if (isInlineStrToken(maskedTokenValue)) // element has text content
				writeContentAsInlineStr(parent);
			else {
				if (isEntityToken(actualTokenValue)) // element has entity
					writeEntityContent(parent);
				else if (maskedTokenValue == GlobalTokens.OPAQUE)
					// element contains opaque data
					writeOpaqueContent(parent);
				else if (isStringTableReferenceToken(maskedTokenValue)) {
					byte indexInStringTable = wbxmlStream.readByte();
					writeContentFromStrTable(parent, indexInStringTable);
				} else if (actualTokenValue == GlobalTokens.SWITCH_PAGE) {
					byte codepageNo = wbxmlStream.readByte();
					TokenRepository.setCurrentCodepage(codepageNo);
					// TODO specify namespace with xmlns attribute
				} else {
					String elementName =
						tokenRepository.getTagName(actualTokenValue);

					Element childElement =
						xmlDocument.createElement(elementName);
					//childElement.setPrefix(tokenRepository.getCurrentNamespace());
					parent.appendChild(childElement);
					if (hasAttributes(maskedTokenValue))
						setAttributes(childElement);
					if (hasContent(maskedTokenValue)) {
						writeChildElement(childElement);
						maskedTokenValue = wbxmlStream.readByte();
						continue;
					}
				}

			}
			maskedTokenValue = wbxmlStream.readByte();
		}
	}

	private void writeContentFromStrTable(
		Element parent,
		int indexInStringTable) {
		char c = 0x0;
		int endIndex =
			stringTable.toString().indexOf(
				new String(new char[] { c }),
				indexInStringTable);
		String content = stringTable.substring(indexInStringTable, endIndex);
		Text txtContent = xmlDocument.createTextNode(content);
		parent.appendChild(txtContent);
	}

	private boolean hasAttributes(byte tokenValue) {
		return ((tokenValue & attributeBitMask) == attributeBitMask);
	}

	private boolean hasContent(byte tokenValue) {
		return (tokenValue & parentBitMask) == parentBitMask;
	}

	private void setAttributes(Element element) throws IOException {
		byte attrTokenValue = wbxmlStream.readByte();
		String currentAttrName = "";
		while (attrTokenValue != 01) { // END (of attribue list)
			if (isInlineStrToken(attrTokenValue))
				writeAttrValueAsInlineStr(element, currentAttrName);
			else {
				if (isEntityToken(attrTokenValue))
					writeEntityAsAttribute(element, currentAttrName);
				else if (isStringTableReferenceToken(attrTokenValue)) {
					byte indexInStringTable = wbxmlStream.readByte();
					writeAttributeFromStrTable(
						element,
						currentAttrName,
						indexInStringTable);
				} else {
					if (isAttrNameToken(attrTokenValue))
						currentAttrName =
							writeAttribute(element, attrTokenValue);
					else {
						if (isAttrValueToken(attrTokenValue))
							writeAttrValue(
								element,
								currentAttrName,
								attrTokenValue);
					}
				}
			}
			attrTokenValue = wbxmlStream.readByte();
		}

	}

	private String writeAttribute(Element element, byte attrTokenValue) {
		String[] attributeNameAndPrefix =
			tokenRepository.getAttributeNameAndPrefix(attrTokenValue);
		String attributeValue = "";
		String attributeName = attributeNameAndPrefix[0].toString();
		boolean hasPrefix = attributeNameAndPrefix[1] != null;
		if (hasPrefix)
			attributeValue = attributeNameAndPrefix[1].trim();
		Attr attrNode = xmlDocument.createAttribute(attributeName);
		attrNode.setValue(attributeValue);
		element.setAttributeNode(attrNode);
		return attributeName;
	}

	private void writeAttrValue(
		Element element,
		String attrName,
		byte attrTokenValue)
		throws IOException {
		String partialAttrValue = element.getAttribute(attrName);
		String attrValue =
			partialAttrValue
				+ tokenRepository.getAttributeValue(attrTokenValue);
		element.setAttribute(attrName, attrValue);
	}

	private void writeAttributeFromStrTable(
		Element element,
		String attrName,
		byte indexInStringTable) {
		String partialAttrValue = element.getAttribute(attrName);
		char c = 0x0;
		int endIndex =
			stringTable.toString().indexOf(
				new String(new char[] { c }),
				indexInStringTable);
		String attrValue =
			partialAttrValue
				+ stringTable.substring(indexInStringTable, endIndex);
		element.setAttribute(attrName, attrValue);

	}

	private void writeAttrValueAsInlineStr(Element element, String attrName)
		throws IOException {
		byte aChar = wbxmlStream.readByte();
		byte[] content = new byte[1024];
		int count = 0;
		while (aChar != 0x0) {
			content[count++] = aChar;
			aChar = wbxmlStream.readByte();
		}

		String previous_value = element.getAttribute(attrName);
		StringBuffer attrValue =
			new StringBuffer(
				previous_value.equals("null") ? "" : previous_value);
		attrValue =
			attrValue.append(new String(content, 0, count, this.encoding));
		element.setAttribute(attrName, attrValue.toString());
	}

	private void writeEntityAsAttribute(Element element, String attrName)
		throws IOException {
		String previous_value = element.getAttribute(attrName);
		StringBuffer attrValue =
			new StringBuffer(
				previous_value.equals("null") ? "" : previous_value);

		byte aChar = wbxmlStream.readByte();
		while ((aChar & (byte) 0x80) == 0x80) {
			// is aChar's continuation flag(MSB) is on)
			aChar = (byte) (aChar & 0x7f); //extract remaining 7 bits;
			String str1 = Integer.toString(aChar, 2);
			attrValue.append(str1);
			aChar = wbxmlStream.readByte();
		}

		String str2 = Integer.toString(aChar, 2);
		// last byte in multiple byte format
		while (str2.length() < 7)
			str2 = "0" + str2;
		attrValue.append(str2);
		int multipleByteValue = Integer.parseInt(attrValue.toString(), 2);
		element.setAttribute(attrName, "&#" + multipleByteValue + ";");
	}

	private void writeContentAsInlineStr(Element element) throws IOException {
		byte aChar = wbxmlStream.readByte();
		byte[] content = new byte[1024];
		int count = 0;
		while (aChar != 0x0) {
			content[count++] = aChar;
			aChar = wbxmlStream.readByte();
		}
		String attrValue = new String(content, 0, count, this.encoding);
		Text txtContent = xmlDocument.createTextNode(attrValue);
		element.appendChild(txtContent);
	}

	private boolean isEntityToken(byte tokenValue) {
		return tokenValue == GlobalTokens.ENTITY;
		// todo for other global tokens
	}

	private boolean isStringTableReferenceToken(byte tokenValue) {
		return tokenValue == GlobalTokens.STR_T;
	}

	private void writeEntityContent(Element element) throws IOException {
		StringBuffer attrValue = new StringBuffer();
		byte aChar = wbxmlStream.readByte();
		while ((aChar & (byte) 0x80) == 0x80) {
			// is aChar's continuation flag(MSB) is on)
			aChar = (byte) (aChar & 0x7f); //extract remaining 7 bits;
			String str1 = Integer.toString(aChar, 2);
			attrValue.append(str1);
			aChar = wbxmlStream.readByte();
		}

		String str2 = Integer.toString(aChar, 2);
		// last byte in multiple byte format
		while (str2.length() < 7)
			str2 = "0" + str2;
		attrValue.append(str2);
		int multipleByteValue = Integer.parseInt(attrValue.toString(), 2);
		Text txtContent =
			xmlDocument.createTextNode(Integer.toString(multipleByteValue));
		element.appendChild(txtContent);
	}

	private void writeOpaqueContent(Element element) throws IOException {
		//	StringBuffer opaqueData = new StringBuffer();
		byte lengthOfOpaqueData = wbxmlStream.readByte();
		// TODO for multi-byte length
		byte[] opaqueDataBuf = new byte[lengthOfOpaqueData];
		for (int i = 0; i < lengthOfOpaqueData; i++) {
			opaqueDataBuf[i] = wbxmlStream.readByte();

		}
		byte b = wbxmlStream.readByte();
		while (b != 1) {
			b = wbxmlStream.readByte();
		}
		String opaqueDataStr = new String(opaqueDataBuf, this.encoding);
		Text txtContent = xmlDocument.createTextNode("");
		//System.out.println("Opaque____" + opaqueDataStr);
		element.appendChild(txtContent);
	}
	private boolean isInlineStrToken(byte tokenValue) {
		return tokenValue == GlobalTokens.STR_ISTR_I;
	}

	private boolean isAttrNameToken(byte tokenValue) {
		return (tokenValue >= 0); // tokenValue is positive implies MSB is 0
	}

	private boolean isAttrValueToken(byte tokenValue) {
		return (tokenValue < 0);
		// tokenValue is negative that implies MSB is 1
	}

	private byte getTokenValue(byte maskedTokenValue) {
		byte unmaskedTokenValue = (byte) (maskedTokenValue & ((byte) 0x3f));
		// 3f =~ 0011 1111
		return unmaskedTokenValue;
	}

}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩精品一区二区三区在线播放| 久久午夜国产精品| 日韩一区二区三区在线视频| 国产无遮挡一区二区三区毛片日本| 亚洲美女区一区| 国产在线一区观看| 欧美三级中文字| 国产精品久久久久久福利一牛影视| 美腿丝袜亚洲一区| 欧美网站一区二区| 中文字幕一区二区三区色视频| 黑人巨大精品欧美一区| 欧美人狂配大交3d怪物一区| 成人免费在线视频| 粉嫩久久99精品久久久久久夜| 欧美一区二区三区成人| 亚洲午夜激情av| 91豆麻精品91久久久久久| 中文字幕一区在线观看视频| 国产suv精品一区二区三区| 日韩欧美国产1| 日韩国产欧美一区二区三区| 欧美日韩在线观看一区二区| 一区二区三区精品在线| 91在线小视频| 中文字幕亚洲综合久久菠萝蜜| 丁香亚洲综合激情啪啪综合| 久久精品网站免费观看| 国产精品影视在线观看| 久久久99免费| 国产91丝袜在线播放| 亚洲国产成人一区二区三区| 国产91丝袜在线18| 亚洲天堂福利av| 欧美伊人精品成人久久综合97 | 欧美高清hd18日本| 午夜成人在线视频| 欧美一区二区久久久| 免费高清在线一区| 国产亚洲欧美色| 懂色av中文一区二区三区| 亚洲国产综合在线| 欧美日韩一区二区电影| 亚洲va欧美va国产va天堂影院| 欧美色欧美亚洲另类二区| 性感美女极品91精品| 欧美电视剧在线看免费| 高清国产一区二区| 一区二区在线看| 7777精品伊人久久久大香线蕉的| 青椒成人免费视频| 国产偷v国产偷v亚洲高清| 91免费精品国自产拍在线不卡| 夜夜精品视频一区二区| 在线不卡中文字幕播放| 精品综合久久久久久8888| 国产欧美日韩在线视频| 色婷婷精品大视频在线蜜桃视频| 亚洲一区二区三区四区在线观看 | 欧美蜜桃一区二区三区| 精品在线观看视频| 亚洲欧洲性图库| 欧美精品久久久久久久久老牛影院| 久久99最新地址| 国产精品福利影院| 91精品国产综合久久福利 | 免费欧美高清视频| 国产精品乱人伦一区二区| 91精品福利视频| 韩国v欧美v亚洲v日本v| 一区二区三区.www| 国产喂奶挤奶一区二区三区| 欧美三日本三级三级在线播放| 激情综合五月婷婷| 亚洲精品免费在线| 久久精品无码一区二区三区| 欧美福利电影网| 99视频超级精品| 精品一区二区久久久| 亚洲资源中文字幕| 国产精品五月天| 6080亚洲精品一区二区| 成人黄色电影在线| 国产suv一区二区三区88区| 亚洲一区二区在线视频| 中文子幕无线码一区tr| 精品日韩一区二区三区免费视频| 91蝌蚪porny成人天涯| 国产经典欧美精品| 欧美一区二区三区四区五区| 天天综合日日夜夜精品| 中文字幕乱码亚洲精品一区| 欧美精品777| 日本高清成人免费播放| 丰满少妇在线播放bd日韩电影| 日韩一区精品字幕| 亚洲黄网站在线观看| 欧美激情综合五月色丁香小说| 678五月天丁香亚洲综合网| 日本乱人伦一区| 91视频xxxx| 成人性生交大片免费看中文| 久久精品噜噜噜成人av农村| 天使萌一区二区三区免费观看| 一区二区在线观看视频在线观看| 国产精品美女久久久久av爽李琼| 久久久亚洲精品石原莉奈| 欧美大片在线观看| 日韩欧美高清一区| 日韩视频免费观看高清完整版 | 蜜桃视频免费观看一区| 亚洲成人手机在线| 日韩有码一区二区三区| 免费看精品久久片| 精品一区二区在线免费观看| 激情另类小说区图片区视频区| 蜜臀av一区二区三区| 另类成人小视频在线| 激情综合网天天干| 国产电影精品久久禁18| 成人污污视频在线观看| 成人丝袜高跟foot| 91在线精品一区二区| 一本色道综合亚洲| 欧美性猛片aaaaaaa做受| 欧美视频中文一区二区三区在线观看 | 成人免费视频视频在线观看免费| 成人一区在线观看| 色噜噜狠狠成人网p站| 欧美在线播放高清精品| 欧美高清视频不卡网| 处破女av一区二区| 久久久欧美精品sm网站| 日韩久久精品一区| 精品福利二区三区| 国产亚洲欧美中文| 国产精品国产自产拍高清av| 一区二区三区国产豹纹内裤在线| 亚洲综合一区二区三区| 日本不卡一二三区黄网| 国产精品自拍一区| 一本大道久久精品懂色aⅴ| 欧美嫩在线观看| 欧美国产成人精品| 夜夜揉揉日日人人青青一国产精品 | 国产福利电影一区二区三区| 国产精品白丝jk白祙喷水网站| av一本久道久久综合久久鬼色| 欧美亚洲自拍偷拍| 精品国产乱码久久久久久1区2区 | 日韩亚洲国产中文字幕欧美| 欧美精品一区二区三区蜜臀| 亚洲欧洲日产国码二区| 日韩激情在线观看| 岛国av在线一区| 91麻豆精品国产无毒不卡在线观看| 精品电影一区二区| 一个色综合网站| 国产一区二区0| 欧美精品丝袜中出| 国产精品久久久久一区二区三区 | 国产一区二区三区免费看 | 韩国女主播成人在线| 日本道色综合久久| 国产亚洲成年网址在线观看| 亚洲一区二区三区在线| 国产精品99久久久久久久女警 | 欧美一区二区三区公司| 日韩一区在线看| 国产乱一区二区| 91精品在线免费| 亚洲欧美另类小说视频| 国产乱码精品一区二区三区av| 欧美日韩mp4| 中文字幕在线不卡视频| 国产一区欧美一区| 欧美一卡二卡三卡| 亚洲一二三区在线观看| www.亚洲在线| 国产欧美日韩激情| 久久99这里只有精品| 7777精品伊人久久久大香线蕉的 | 日韩电影在线免费观看| 99久久久久久99| 欧美极品美女视频| 国产精品一区在线观看乱码| 精品久久久久久久久久久久久久久 | 久久亚洲精品小早川怜子| 奇米精品一区二区三区在线观看| 在线一区二区三区四区五区| 亚洲女厕所小便bbb| 99免费精品视频| 国产精品福利影院| 91丝袜美腿高跟国产极品老师| 久久久91精品国产一区二区精品 | 国产亚洲自拍一区| 国产精品一品二品| 国产无遮挡一区二区三区毛片日本| 另类小说一区二区三区| 欧美草草影院在线视频|