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

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

?? documentserializableutilities.java

?? jxta平臺的開發包
?? JAVA
?? 第 1 頁 / 共 2 頁
字號:
	/**	 *  Get the value of a Child Element 	 *	 * @param element The Parant Element	 * @param tagName The Tag Name of the Child Element that will contain the value	 * @param defaultValue The return value if there is no Child Element with that Tag Name	 * @return the value converted from a String	 **/	public static long getLong(Element element, String tagName, long defaultValue) {		Element childElement = getChildElement(element, tagName);				if (childElement != null)			return getLong(childElement);		else			return defaultValue;	}				/**	 *  Add an Element with the specified tagname and value (converted to a String)	 *	 * @param element Parent Element that the new element will be added to	 * @param tagName TagName to be used for the created Child Element	 * @param value The value that will be stored in the Element as a String	 **/	public static void addDouble(Element element, String tagName, double value) {		StructuredDocument structuredDocument = (StructuredDocument) element.getRoot();		Element childElement = structuredDocument.createElement(tagName, Double.toString(value));		element.appendChild(childElement);	}	/**	 *  Get  the value of an element converted from a String	 *	 * @param element Element that contains the value	 * @return the value converted from a String	 **/	public static double getDouble(Element element) {		return Double.parseDouble((String) element.getValue());	}	/**	 *  Get the value of a Child Element 	 *	 * @param element The Parant Element	 * @param tagName The Tag Name of the Child Element that will contain the value	 * @param defaultValue The return value if there is no Child Element with that Tag Name	 * @return the value converted from a String	 **/	public static double getDouble(Element element, String tagName, double defaultValue) {		Element childElement = getChildElement(element, tagName);				if (childElement != null)			return getDouble(childElement);		else			return defaultValue;	}				/**	 *  Add an Element with the specified tagname and value (converted to a String)	 *	 * @param element Parent Element that the new element will be added to	 * @param tagName TagName to be used for the created Child Element	 * @param value The value that will be stored in the Element as a String	 **/	public static void addBoolean(Element element, String tagName, boolean value) {		StructuredDocument structuredDocument = (StructuredDocument) element.getRoot();		Element childElement = structuredDocument.createElement(tagName, value ? "true" : "false");		element.appendChild(childElement);	}	/**	 *  Get  the value of an element converted from a String ("true" or "false")	 *	 * @param element Element that contains the value	 * @return the value converted from a String	 **/	public static boolean getBoolean(Element element) {		return "true".equals((String) element.getValue());	}	/**	 *  Get the value of a Child Element 	 *	 * @param element The Parant Element	 * @param tagName The Tag Name of the Child Element that will contain the value	 * @param defaultValue The return value if there is no Child Element with that Tag Name	 * @return the value converted from a String	 **/	public static boolean getBoolean(Element element, String tagName, boolean defaultValue) {		Element childElement = getChildElement(element, tagName);				if (childElement != null)			return getBoolean(childElement);		else			return defaultValue;	}		/**	 *  Add an Element with the specified tagname and value	 *	 * @param element Parent Element that the new element will be added to	 * @param tagName TagName to be used for the created Child Element	 * @param value The value that will be stored in the Element	 **/	public static void addString(Element element, String tagName, String value) {		StructuredDocument structuredDocument = (StructuredDocument) element.getRoot();		Element childElement = structuredDocument.createElement(tagName, value);		element.appendChild(childElement);	}	/**	 *  Get  the value of an element as a String	 *	 * @param element Element that contains the value	 * @return the value converted from a String	 **/	public static String getString(Element element) {		return (String) element.getValue();	}	/**	 *  Get the value of a Child Element 	 *	 * @param element The Parant Element	 * @param tagName The Tag Name of the Child Element that will contain the value	 * @param defaultValue The return value if there is no Child Element with that Tag Name	 * @return The value found in the Element	 **/	public static String getString(Element element, String tagName, String defaultValue) {		Element childElement = getChildElement(element, tagName);				if (childElement != null)			return getString(childElement);		else			return defaultValue;	}	/**	 *  Convert a DocumentSerializable object to its XML representation as a String	 *  	 *  The Root TagName will be 'documentSerializable' by default	 *  	 * @param documentSerializable The Object to be converted to an XML Document	 * @return The String representation of an XML Document 	 * @throws DocumentSerializationException if Unable to serialize object.	 **/	public static String toXmlString(DocumentSerializable documentSerializable) throws DocumentSerializationException {		return toXmlString(documentSerializable, "documentSerializable");	}	/**	 *  Convert a DocumentSerializable object to its XML representation as a String	 *  	 *  The Root TagName will be 'documentSerializable' by default	 *  	 * @param documentSerializable The Object to be converted to an XML Document	 * @param rootTagName The Root tagName for the XML Document	 * @return The String representation of an XML Document 	 * @throws DocumentSerializationException if Unable to serialize object.	 **/	public static String toXmlString(DocumentSerializable documentSerializable, String rootTagName) throws DocumentSerializationException {		try {			StringWriter bout = new StringWriter();			XMLDocument document = DocumentSerializableUtilities.createStructuredXmlDocument(rootTagName, documentSerializable);			document.sendToWriter(bout);			bout.close();                        			return bout.toString();		} catch (IOException e) {			throw new DocumentSerializationException("Error converting to String", e);		}	}		/**	 *  Write a DocumentSerializable object as an XML Document to a Stream	 *  	 *  The Root TagName will be 'documentSerializable' by default	 *  	 * @param out The Stream to write the document to	 * @param documentSerializable The Object to be converted to an XML Document 	 * @throws DocumentSerializationException if Unable to serialize object. 	 * @throws IOException if I/O error while writing	 **/	public static void writeAsXmlString(OutputStream out, DocumentSerializable documentSerializable) throws IOException, DocumentSerializationException {		writeAsXmlString(out, documentSerializable, "documentSerializable");	}		/**	 *  Write a DocumentSerializable object as an XML Document to a Stream	 *  	 *  The Root TagName will be 'documentSerializable' by default	 *  	 * @param out The Stream to write the document to	 * @param rootTagName The Root tagName for the XML Document	 * @param documentSerializable The Object to be converted to an XML Document 	 * @throws DocumentSerializationException if Unable to serialize object. 	 * @throws IOException if I/O error while writing	 **/	public static void writeAsXmlString(OutputStream out, DocumentSerializable documentSerializable, String rootTagName) throws IOException, DocumentSerializationException {			StructuredDocument document = DocumentSerializableUtilities.createStructuredXmlDocument(rootTagName, documentSerializable);			document.sendToStream(out);	}	/**	 *  Write a DocumentSerializable object as an XML Document to StdErr	 *  	 *  The Root TagName will be 'documentSerializable' by default	 *  	 * @param documentSerializable The DocumentSerializable to be printed.	 **/	public static void printAsXmlString(DocumentSerializable documentSerializable) {		try {			if (documentSerializable == null)				System.err.println("<null DocumentSerializable>");			else				writeAsXmlString(System.err, documentSerializable);		} catch (Exception e) {			System.err.println("<Error converting DocumentSerializable to XML doc: " + e);		}	}		/**	 *  Create a DocumentSerializable Object from an XML Document	 *  	 * @param buf The XML document contained in a String	 * @param clazz The Class of the resurrected object (must implement DocumentSerializable and have a public no-arg constructor)	 * @return An object of type 'clazz' 	 * @throws DocumentSerializationException if Unable to parse object.	 **/	public static DocumentSerializable getDocumentSerializableFromXml(String buf, Class clazz) throws DocumentSerializationException {		try {			XMLDocument xmlDoc = (XMLDocument) StructuredDocumentFactory.newStructuredDocument(MimeMediaType.XMLUTF8, new StringReader( buf));			return getDocumentSerializable(xmlDoc.getRoot(), clazz);					} catch (IOException readErr) {			throw new DocumentSerializationException("Unable to read the document", readErr);		} catch (JxtaException e) {			throw new DocumentSerializationException("Unable to get the document", e);		}	}	/**	 *  Create a DocumentSerializable Object from an XML Document	 *  	 * @param buf The XML document contained in a byte buffer	 * @param clazz The Class of the resurrected object (must implement DocumentSerializable and have a public no-arg constructor)	 * @return An object of type 'clazz' 	 * @throws DocumentSerializationException if Unable to parse object.	 **/	public static DocumentSerializable getDocumentSerializableFromXml(byte buf[], Class clazz) throws DocumentSerializationException {		return getDocumentSerializableFromXml( new ByteArrayInputStream(buf), clazz);	}	/**	 *  Create a DocumentSerializable Object from an XML Document	 *  	 * @param in The Stream containing an XML Document to be read	 * @param clazz The Class of the resurrected object (must implement DocumentSerializable and have a public no-arg constructor)	 * @return An object of type 'clazz' 	 * @throws DocumentSerializationException if Unable to parse object.	 **/	public static DocumentSerializable getDocumentSerializableFromXml(InputStream in, Class clazz) throws DocumentSerializationException {		try {			XMLDocument xmlDoc = (XMLDocument) StructuredDocumentFactory.newStructuredDocument(MimeMediaType.XMLUTF8, in);			return getDocumentSerializable(xmlDoc.getRoot(), clazz);					} catch (IOException readErr) {			throw new DocumentSerializationException("Unable to read the document", readErr);		} catch (JxtaException e) {			throw new DocumentSerializationException("Unable to get the document", e);		}	}}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲国产日产av| 男女男精品视频网| 天堂影院一区二区| 国产成人在线观看免费网站| 欧美视频一区二区在线观看| 欧美tk—视频vk| 亚洲一区二区三区中文字幕| 国产精品一级片在线观看| 欧美三级乱人伦电影| 国产精品第13页| 国产一区二区伦理片| 中文字幕一区在线观看| 视频一区在线播放| 91美女蜜桃在线| 久久午夜羞羞影院免费观看| 婷婷国产v国产偷v亚洲高清| 91亚洲午夜精品久久久久久| 国产午夜精品美女毛片视频| 天天综合天天做天天综合| 97久久超碰国产精品| 久久久久国产成人精品亚洲午夜| 视频一区视频二区中文| 欧美视频中文字幕| 一个色综合av| 在线亚洲一区观看| 亚洲综合久久久| 91蜜桃在线观看| 亚洲女同一区二区| 色欲综合视频天天天| 亚洲情趣在线观看| 99re免费视频精品全部| 国产精品久久福利| 国产精品羞羞答答xxdd| 久久久综合激的五月天| 国产一区 二区 三区一级| 日韩午夜av一区| 另类综合日韩欧美亚洲| 5858s免费视频成人| 日本美女视频一区二区| 欧美一区二区视频免费观看| 日韩专区在线视频| 欧美一区二区视频观看视频| 热久久一区二区| 精品久久久久久久人人人人传媒 | 欧美视频自拍偷拍| 亚洲一本大道在线| 欧美精品九九99久久| 激情久久五月天| 亚洲国产精品黑人久久久| 国产成人综合视频| 中文字幕在线观看不卡| 不卡视频一二三四| 一区二区三区四区av| 91精品麻豆日日躁夜夜躁| 免费看欧美女人艹b| 久久蜜桃av一区精品变态类天堂| www.日韩在线| 亚洲第一av色| 久久久久久久久久久电影| av在线播放不卡| 青青草国产成人av片免费 | 欧美日韩精品综合在线| 日韩国产一二三区| 中文av字幕一区| 欧美精选午夜久久久乱码6080| 黄色日韩三级电影| 亚洲美腿欧美偷拍| 日韩欧美在线一区二区三区| 成人激情电影免费在线观看| 亚洲午夜一区二区三区| 久久综合九色综合97婷婷女人| 91视视频在线观看入口直接观看www | 亚洲精品一卡二卡| 日韩欧美成人午夜| 94-欧美-setu| 经典一区二区三区| 亚洲综合小说图片| 国产婷婷色一区二区三区四区| 色婷婷久久久亚洲一区二区三区 | 亚洲最新视频在线观看| www成人在线观看| 欧美人妖巨大在线| 91视频免费播放| 国产精品一色哟哟哟| 亚洲香肠在线观看| 国产精品乱码久久久久久| 日韩一区二区在线观看视频| 日本高清无吗v一区| 国产麻豆精品在线| 日韩激情一区二区| 悠悠色在线精品| 国产精品沙发午睡系列990531| 欧美一区二区精品在线| 91国产视频在线观看| 成人av片在线观看| 国产麻豆成人传媒免费观看| 日韩不卡手机在线v区| 亚洲精品视频免费看| 欧美激情资源网| 久久综合狠狠综合久久综合88| 欧美日韩一二三| 日本乱人伦aⅴ精品| a美女胸又www黄视频久久| 国产成人夜色高潮福利影视| 日韩avvvv在线播放| 亚洲成人一区在线| 亚洲高清免费在线| 亚洲最新视频在线观看| 一区二区三区欧美亚洲| 国产精品黄色在线观看| 国产精品久久影院| 中文字幕在线观看一区二区| 中文字幕一区三区| 中文字幕亚洲一区二区av在线| 国产精品色在线观看| 国产精品国产三级国产三级人妇 | 精品一区二区在线视频| 男人的天堂亚洲一区| 日本aⅴ亚洲精品中文乱码| 天天色综合天天| 日本美女视频一区二区| 精品一区二区三区欧美| 久久成人久久爱| 韩国成人福利片在线播放| 国产激情精品久久久第一区二区 | 成人爽a毛片一区二区免费| 国产精品自拍一区| 成人av午夜电影| 91麻豆国产精品久久| 欧美网站一区二区| 日韩午夜av电影| 国产人成亚洲第一网站在线播放| 中文字幕不卡在线观看| 一区二区三区蜜桃网| 婷婷久久综合九色综合绿巨人| 日本91福利区| 成人性生交大合| 在线日韩国产精品| 欧美一二区视频| 国产情人综合久久777777| 自拍偷拍欧美精品| 日韩黄色免费电影| 国产河南妇女毛片精品久久久| 成人国产精品免费观看动漫| 91免费视频网| 日韩一区二区视频| 亚洲欧洲国产日本综合| 日日摸夜夜添夜夜添精品视频| 国产呦精品一区二区三区网站| 成人美女视频在线观看| 欧美亚洲精品一区| 久久久国产精品麻豆| 夜夜揉揉日日人人青青一国产精品 | 国产91精品欧美| 欧美日韩卡一卡二| 国产亲近乱来精品视频 | 欧美日韩一区二区在线观看视频| 日韩欧美一区二区免费| 亚洲人成伊人成综合网小说| 午夜久久久久久久久| 粉嫩av一区二区三区| 欧美伦理电影网| 中文字幕一区在线观看| 久久www免费人成看片高清| 99精品欧美一区二区三区小说| 日韩无一区二区| 亚洲国产一区视频| voyeur盗摄精品| www一区二区| 奇米影视7777精品一区二区| 一本大道久久a久久综合婷婷| 久久久精品黄色| 老鸭窝一区二区久久精品| 欧美三级在线播放| 亚洲视频网在线直播| 国产suv精品一区二区三区| 日韩欧美一区中文| 首页国产欧美久久| 欧美在线三级电影| 亚洲免费av网站| 高清成人在线观看| 久久精品亚洲精品国产欧美| 日本aⅴ免费视频一区二区三区| 欧美午夜一区二区三区| 最新久久zyz资源站| 国产精品中文字幕欧美| 精品黑人一区二区三区久久| 首页国产欧美日韩丝袜| 欧美少妇性性性| 亚洲午夜精品网| 欧美中文字幕一区| 亚洲精品菠萝久久久久久久| 9久草视频在线视频精品| 国产欧美一区在线| 懂色av中文一区二区三区| 久久亚洲综合色一区二区三区| 久久精品二区亚洲w码| 欧美一区二区不卡视频| 日本不卡一区二区三区高清视频| 欧美精品777|