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

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

?? wbxmldecoder.java~4~

?? jwap 協議 udp 可以用于手機通訊
?? JAVA~4~
?? 第 1 頁 / 共 2 頁
字號:
		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一区二区三区免费野_久草精品视频
色八戒一区二区三区| 天堂成人国产精品一区| 国产乱码精品一区二区三区忘忧草| 欧美精品视频www在线观看| 亚洲一区二区精品久久av| 欧美亚州韩日在线看免费版国语版| 亚洲国产cao| 日韩欧美视频在线| 国产成人免费在线视频| 国产精品久久一级| 欧洲日韩一区二区三区| 丝袜美腿亚洲色图| 精品国产免费一区二区三区四区 | 精品国产一区久久| 国产精品一区免费视频| 国产女主播一区| 91在线观看下载| 夜夜嗨av一区二区三区中文字幕 | 蜜桃av一区二区三区| 欧美tk丨vk视频| 97久久精品人人做人人爽| 亚洲国产精品久久久男人的天堂| 日韩欧美一级片| 99免费精品视频| 同产精品九九九| 国产欧美日韩精品一区| 欧美日韩一区不卡| 国产在线精品一区二区夜色| 国产精品福利电影一区二区三区四区| 在线观看网站黄不卡| 精品在线你懂的| 亚洲最大成人综合| 精品福利在线导航| 色综合一区二区| 狠狠网亚洲精品| 亚洲国产aⅴ天堂久久| 久久只精品国产| 欧美日韩精品系列| 成人午夜免费电影| 另类欧美日韩国产在线| 天天免费综合色| 中文字幕乱码日本亚洲一区二区| 欧美日韩中文一区| 成人午夜视频在线| 捆绑变态av一区二区三区| 亚洲视频一二三区| 久久先锋影音av| 7777精品伊人久久久大香线蕉最新版| 不卡影院免费观看| 国内不卡的二区三区中文字幕| 曰韩精品一区二区| 日本一区二区免费在线观看视频| 69p69国产精品| 一本大道久久a久久精品综合| 极品少妇xxxx偷拍精品少妇| 亚洲午夜日本在线观看| 国产精品麻豆网站| 久久人人爽爽爽人久久久| 91精品国产一区二区三区 | 青青草97国产精品免费观看| 亚洲女人****多毛耸耸8| 久久夜色精品一区| 69精品人人人人| 欧美日韩高清影院| 色综合久久精品| 波多野结衣亚洲| 高清久久久久久| 国产永久精品大片wwwapp | 波多野结衣在线一区| 国产资源在线一区| 麻豆成人综合网| 蜜桃av一区二区在线观看| 天堂影院一区二区| 亚洲线精品一区二区三区| 亚洲美女视频在线| 亚洲欧美色图小说| **性色生活片久久毛片| 国产精品久久久久永久免费观看 | 蜜臀av在线播放一区二区三区| 午夜在线电影亚洲一区| 亚洲国产人成综合网站| 亚洲一区国产视频| 亚洲大片一区二区三区| 亚洲国产日韩综合久久精品| 亚洲18女电影在线观看| 日韩激情在线观看| 奇米一区二区三区| 麻豆成人综合网| 国产精品综合网| 风间由美一区二区三区在线观看 | www国产精品av| 精品免费视频.| 久久免费视频色| 艳妇臀荡乳欲伦亚洲一区| 一区二区三区中文字幕电影| 亚洲自拍偷拍麻豆| 日韩在线卡一卡二| 国产综合久久久久影院| 高清成人在线观看| 91麻豆国产在线观看| 欧美日本在线视频| 2023国产精品自拍| 国产精品第四页| 亚洲高清久久久| 韩日av一区二区| 99re免费视频精品全部| 欧美亚洲一区二区在线观看| 日韩一级高清毛片| 国产精品毛片大码女人| 亚洲va国产天堂va久久en| 韩国精品免费视频| 91蝌蚪porny| 91精品国产一区二区三区| 国产日韩欧美精品电影三级在线| ㊣最新国产の精品bt伙计久久| 亚洲第四色夜色| 国产精品69久久久久水密桃| 欧美中文字幕久久| 亚洲精品在线观看网站| 亚洲欧美色一区| 精品一区二区三区在线播放| 91丨porny丨国产| 精品成人私密视频| 亚洲精品成人悠悠色影视| 精品一二三四在线| 色综合咪咪久久| 久久久亚洲精品一区二区三区| 一级女性全黄久久生活片免费| 国产在线视频一区二区| 91激情在线视频| 日本一区二区三区电影| 国产一区二区三区在线观看免费| 色丁香久综合在线久综合在线观看| 日韩精品一区二区三区中文不卡 | 精品处破学生在线二十三| 亚洲免费av网站| 国内精品写真在线观看| 欧美午夜精品久久久久久超碰 | 欧美日韩国产综合草草| 欧美大片在线观看| 一卡二卡三卡日韩欧美| 国产日韩欧美高清| 午夜精品久久久| 亚洲大片免费看| 欧美优质美女网站| 亚洲va欧美va国产va天堂影院| 欧美日本在线观看| 日韩高清一级片| 日韩一卡二卡三卡| 精品制服美女久久| 久久影院视频免费| 懂色av一区二区三区蜜臀| 综合电影一区二区三区| 欧美在线视频全部完| 日韩不卡一区二区三区| 日韩精品专区在线影院重磅| 狠狠狠色丁香婷婷综合久久五月| 国产欧美一区在线| 不卡视频在线看| 亚洲一线二线三线视频| 91麻豆精品91久久久久同性| 狠狠色综合色综合网络| 国产精品美女久久久久久久| 日本乱人伦一区| 欧美a一区二区| 久久精品无码一区二区三区| 99久久亚洲一区二区三区青草| 一区二区三区四区亚洲| 91麻豆精品国产91久久久久久久久| 久久精品国产久精国产爱| 国产婷婷一区二区| 色先锋aa成人| 久久激情综合网| 1000部国产精品成人观看| 欧美日韩aaaaa| 国产精品自在在线| 亚洲欧美色综合| 欧美电影免费观看高清完整版在| 成人性视频免费网站| 午夜精品福利视频网站| 久久天堂av综合合色蜜桃网| 91丨九色丨黑人外教| 麻豆一区二区三区| 国产麻豆成人传媒免费观看| 亚洲欧美偷拍卡通变态| 日韩精品综合一本久道在线视频| 成人深夜在线观看| 日韩精品视频网| 综合久久综合久久| 日韩欧美高清一区| 色综合天天综合狠狠| 久久99在线观看| 亚洲午夜久久久久中文字幕久| 久久综合999| 88在线观看91蜜桃国自产| 成人一区在线观看| 免费欧美日韩国产三级电影| 日韩美女视频一区二区| 久久久久久99精品| 在线观看91精品国产麻豆|