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

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

?? wbxmldecoder.java~9~

?? jwap 協議 udp 可以用于手機通訊
?? JAVA~9~
?? 第 1 頁 / 共 2 頁
字號:
			//exp.printStackTrace();
		}

	}

	private void writeChildElement(Element parent) throws IOException {
		byte maskedTokenValue = wbxmlStream.readByte();
		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一区二区三区免费野_久草精品视频
亚洲欧美韩国综合色| 欧美激情综合在线| 91蜜桃网址入口| 国内精品不卡在线| 精品一区二区三区在线观看 | 麻豆国产精品一区二区三区| 天堂成人免费av电影一区| 亚洲一区二区视频| 亚洲妇女屁股眼交7| 日韩和欧美一区二区三区| 午夜视频在线观看一区二区| 亚洲一区在线播放| 日韩精品久久久久久| 麻豆精品一区二区三区| 国产毛片精品国产一区二区三区| 国内精品久久久久影院一蜜桃| 国产麻豆视频一区二区| 国产盗摄视频一区二区三区| 福利电影一区二区| 在线观看视频欧美| 欧美电影免费观看高清完整版在 | 日韩一区和二区| 日韩一区二区三区三四区视频在线观看| 欧美高清视频一二三区| 91超碰这里只有精品国产| 777欧美精品| 国产欧美日韩在线| 亚洲精品免费在线| 日韩经典中文字幕一区| 国内成人精品2018免费看| 91在线一区二区三区| 欧美揉bbbbb揉bbbbb| 2020国产精品自拍| 亚洲一区二区三区视频在线 | 亚洲自拍偷拍图区| 黑人巨大精品欧美一区| 91美女在线观看| 日韩精品一区二区三区在线| 中文字幕av免费专区久久| 亚洲综合免费观看高清完整版在线| 免费精品视频在线| 91网站在线观看视频| 欧美mv日韩mv亚洲| 亚洲精品久久久蜜桃| 黄色小说综合网站| 欧美亚洲动漫精品| 国产精品私人自拍| 久久国产精品区| 欧美日韩性生活| 国产精品久久久久久久蜜臀| 欧美aⅴ一区二区三区视频| 99国内精品久久| 久久久久久久网| 粉嫩欧美一区二区三区高清影视| 欧美午夜影院一区| 国产精品久久久久精k8| 久久91精品国产91久久小草| 日本乱人伦一区| 国产精品乱码人人做人人爱| 美美哒免费高清在线观看视频一区二区 | 国产精品久久久久婷婷| 久久精品国产999大香线蕉| 91福利在线导航| 综合激情成人伊人| 成人黄色a**站在线观看| 久久精品一区二区三区不卡牛牛 | 亚洲另类春色国产| 成人av综合在线| 国产欧美1区2区3区| 精品一区二区三区免费播放 | 26uuu精品一区二区在线观看| 日韩国产在线一| 欧美天堂一区二区三区| 亚洲精品久久久久久国产精华液| 波多野结衣精品在线| 国产人成亚洲第一网站在线播放| 韩国v欧美v日本v亚洲v| 精品成人免费观看| 国产传媒欧美日韩成人| 久久精品日产第一区二区三区高清版 | 亚欧色一区w666天堂| 欧美视频中文一区二区三区在线观看| 亚洲精品视频在线看| 欧美性受极品xxxx喷水| 亚洲综合久久久久| 欧美肥妇毛茸茸| 奇米影视在线99精品| 精品久久久久一区二区国产| 精品一区二区三区视频| 国产亚洲欧美日韩在线一区| 高清av一区二区| 一本大道久久a久久精品综合| 亚洲欧美色图小说| 成人黄色片在线观看| 欧美日韩美少妇| 亚洲欧美乱综合| 欧美人与性动xxxx| 老色鬼精品视频在线观看播放| 久久久亚洲综合| 国产麻豆成人传媒免费观看| 国产精品久久久久久福利一牛影视 | 麻豆一区二区三区| 久久蜜桃一区二区| 色老头久久综合| 免费久久99精品国产| 国产精品免费观看视频| 欧美影片第一页| 韩国精品免费视频| 一区二区三区中文字幕| 精品国产一区二区精华| 色婷婷精品久久二区二区蜜臀av | 东方欧美亚洲色图在线| 亚洲一区在线观看免费| 精品黑人一区二区三区久久| 不卡电影一区二区三区| 日本成人在线不卡视频| 国产精品国产三级国产三级人妇| 欧美乱熟臀69xxxxxx| 成人免费的视频| 秋霞国产午夜精品免费视频| 国产精品福利一区二区三区| 欧美一区二区播放| 色一情一乱一乱一91av| 狠狠色丁香久久婷婷综合_中| 国产精品白丝在线| 久久毛片高清国产| 欧美精选一区二区| 在线看不卡av| 成人av网址在线观看| 久久激情五月激情| 日韩精品一二区| 亚洲精品欧美综合四区| 欧美—级在线免费片| 欧美成人艳星乳罩| 欧美精品乱码久久久久久按摩 | 欧美日韩在线播| 99热精品一区二区| 国产高清不卡一区二区| 久久电影网站中文字幕| 视频一区欧美日韩| 亚洲综合激情另类小说区| 亚洲欧洲在线观看av| 国产农村妇女精品| 久久久国产午夜精品| 久久综合九色综合欧美亚洲| 欧美一区二区三区视频免费播放| 欧美日韩一区二区三区高清| 欧美亚日韩国产aⅴ精品中极品| 不卡的av网站| 成人综合激情网| 国产成人av电影免费在线观看| 国产在线精品免费av| 久久99国内精品| 国产一区二区三区黄视频| 九九视频精品免费| 国产一区不卡视频| 懂色av一区二区夜夜嗨| 不卡在线观看av| 色综合久久九月婷婷色综合| 91丨porny丨在线| 欧美亚洲日本国产| 欧美久久一区二区| 欧美一级二级三级蜜桃| 精品成人一区二区三区| 国产视频一区二区在线观看| 国产精品理论片在线观看| 亚洲黄一区二区三区| 五月天国产精品| 久久精品国产秦先生| 国产91色综合久久免费分享| av亚洲精华国产精华精华| 色伊人久久综合中文字幕| 欧美日韩精品久久久| 日韩精品一区二区三区视频| 国产欧美1区2区3区| 亚洲三级免费观看| 蜜臀91精品一区二区三区| 九九视频精品免费| 成人午夜精品一区二区三区| 91高清视频免费看| 日韩欧美国产综合| 亚洲视频一区在线| 美女视频黄 久久| 成人app网站| 91精品在线一区二区| 国产日韩精品久久久| 亚洲精品欧美综合四区| 久久99精品久久只有精品| av网站一区二区三区| 欧美日韩大陆在线| 国产精品久久久久国产精品日日| 亚洲高清三级视频| 波多野结衣亚洲一区| 日韩欧美另类在线| 亚洲精品水蜜桃| 韩国欧美国产1区| 欧洲日韩一区二区三区| www国产亚洲精品久久麻豆| 亚洲国产日韩在线一区模特| 国产成人精品网址|