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

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

?? documentserializableutilities.java

?? jxta平臺(tái)的開發(fā)包
?? JAVA
?? 第 1 頁 / 共 2 頁
字號(hào):
/* * Copyright (c) 2001 Sun Microsystems, Inc.  All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright *    notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright *    notice, this list of conditions and the following disclaimer in *    the documentation and/or other materials provided with the *    distribution. * * 3. The end-user documentation included with the redistribution, *    if any, must include the following acknowledgment: *       "This product includes software developed by the *       Sun Microsystems, Inc. for Project JXTA." *    Alternately, this acknowledgment may appear in the software itself, *    if and wherever such third-party acknowledgments normally appear. * * 4. The names "Sun", "Sun Microsystems, Inc.", "JXTA" and "Project JXTA" must *    not be used to endorse or promote products derived from this *    software without prior written permission. For written *    permission, please contact Project JXTA at http://www.jxta.org. * * 5. Products derived from this software may not be called "JXTA", *    nor may "JXTA" appear in their name, without prior written *    permission of Sun. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED.  IN NO EVENT SHALL SUN MICROSYSTEMS OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of Project JXTA.  For more * information on Project JXTA, please see * <http://www.jxta.org/>. * * This license is based on the BSD license adopted by the Apache Foundation. * * $Id: DocumentSerializableUtilities.java,v 1.8 2006/06/19 18:27:35 bondolo Exp $ */package net.jxta.util.documentSerializable;import net.jxta.document.*;import net.jxta.exception.*;import net.jxta.util.*;import java.util.*;import java.io.*;/** **/public class DocumentSerializableUtilities {	// Fix-Me: I didn't implement byte, short or float	// Fix-Me: I didn't implement arrays, ie addInt(Element element, String tagName, int values[]), etc	/**	 * Creates a Structured XML Document containing the serialized object	 *	 * @return	The created Document 	 * @throws DocumentSerializationException if Unable to parse the serialized object.	 */		public static XMLDocument createStructuredXmlDocument(String docType, DocumentSerializable documentSerializable) throws DocumentSerializationException {			XMLDocument xmlDoc =(XMLDocument) StructuredDocumentFactory.newStructuredDocument(MimeMediaType.XMLUTF8, docType);			documentSerializable.serializeTo(xmlDoc);			return xmlDoc;	}	/**	 * Deeply copy an element into another element	 *	 * @param toElement The target Element	 * @param fromElement The source Element	 */		public static void copyChildren(Element toElement, Element fromElement) {		// for now ... a quicky use of another utility		StructuredDocument intoDoc = toElement.getRoot();		StructuredDocumentUtils.copyChildren(intoDoc, toElement, fromElement);	}	/**	 *  Add an Element with the specified tagname and value (converted to a String)	 *	 * @param element Parent Element that the new child element will be added to	 * @param tagName TagName to be used for the created Child Element	 * @param documentSerializable This value will be serialized into the created child element\ 	 * @throws DocumentSerializationException if Unable to serialized object.	 **/	public static void addDocumentSerializable(Element element, String tagName, DocumentSerializable documentSerializable)  throws DocumentSerializationException {		StructuredDocument structuredDocument = (StructuredDocument) element.getRoot();		Element childElement = structuredDocument.createElement(tagName);		element.appendChild(childElement);		documentSerializable.serializeTo(childElement);	}	/**	 *  Create an object from its Document Serialized components	 *	 * @param element The relative root element of a Document Serialized Object	 * @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 the serialized object.	 **/	public static DocumentSerializable getDocumentSerializable(Element element, Class clazz) throws DocumentSerializationException {		try {			return getDocumentSerializable(element, (DocumentSerializable) clazz.newInstance());		} catch (DocumentSerializationException e) {			throw e;		} catch (Exception e) {			throw new DocumentSerializationException("Class must have a public no-arg constructor", e);		}	}		/**	 *  Initialize an object from its Document Serialized components	 *	 * @param element The relative root element of a Document Serialized Object	 * @param documentSerializable The object that will be populated from the Element	 * @return The same parameter passed to it 'documentSerializable' 	 * @throws DocumentSerializationException if Unable to parse the serialized object.	 **/	public static DocumentSerializable getDocumentSerializable(Element element, DocumentSerializable documentSerializable) throws DocumentSerializationException {		documentSerializable.initializeFrom(element);		return documentSerializable;	}	/**	 *  Create an object from its Document Serialized components	 *	 * @param element The Parent element which has a child Element with the serialized value	 * @param tagName The tagname of the element that contains the relative root element of a Document Serialized Object	 * @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 the serialized object.	 **/	public static DocumentSerializable getDocumentSerializable(Element element, String tagName, Class clazz) throws DocumentSerializationException {		Element childElement = getChildElement(element, tagName);				if (childElement != null)			return getDocumentSerializable(childElement, clazz);		else			return null;	}			/**	 *  Create a copy of any Document Serializable object.	 *  	 *  This is done by serializing and then deserializing the object (ie not very efficient)	 *	 * @param documentSerializable The Object to be copied	 * @return An copy of the presented object 	 * @throws DocumentSerializationException if Unable to serialize or parse object.	 **/	public static DocumentSerializable copyDocumentSerializable(DocumentSerializable documentSerializable) throws DocumentSerializationException {		StructuredDocument structuredDocument = createStructuredXmlDocument("temp", documentSerializable);		return getDocumentSerializable(structuredDocument, documentSerializable.getClass());	}	/**	 *  Create a child element of the specified tagName	 *  	 *  This is done by serializing and then deserializing the object (ie not very efficient)	 *	 * @param element The Parent Element	 * @param tagName The Tag Name for the new Element	 * @return The created Element	 **/	public static Element createChildElement(Element element, String tagName) {		StructuredDocument structuredDocument = (StructuredDocument) element.getRoot();		Element childElement = structuredDocument.createElement(tagName);		element.appendChild(childElement);		return childElement;	}	/**	 *  Get a child element of the specified tagName	 *  	 *  This is done by serializing and then deserializing the object (ie not very efficient)	 *	 * @param element The Parent Element	 * @param tagName The Tag Name for the new Element	 * @return The found Element	 **/	public static Element getChildElement(Element element, String tagName) {		Enumeration e = element.getChildren(tagName);				if (e.hasMoreElements())			return (Element) e.nextElement();		else			return null;	}	/**	 *  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 addInt(Element element, String tagName, int value) {		StructuredDocument structuredDocument = (StructuredDocument) element.getRoot();		Element childElement = structuredDocument.createElement(tagName, Integer.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 int getInt(Element element) {		return Integer.parseInt((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 int getInt(Element element, String tagName, int defaultValue) {		Element childElement = getChildElement(element, tagName);				if (childElement != null)			return getInt(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 addLong(Element element, String tagName, long value) {		StructuredDocument structuredDocument = (StructuredDocument) element.getRoot();		Element childElement = structuredDocument.createElement(tagName, Long.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 long getLong(Element element) {		return Long.parseLong((String) element.getValue());	}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
www.视频一区| 欧美一级一级性生活免费录像| 波多野结衣在线aⅴ中文字幕不卡| www.久久久久久久久| 色综合天天天天做夜夜夜夜做| 精品视频在线免费看| 精品无人区卡一卡二卡三乱码免费卡| 国产成人av网站| 91国产福利在线| 欧美va在线播放| 亚洲色图欧洲色图婷婷| 午夜成人免费电影| 日本中文在线一区| 成人免费视频视频| 69堂成人精品免费视频| 日本一区二区三区免费乱视频 | 日韩手机在线导航| 国产女主播一区| 亚洲va韩国va欧美va精品| 国产一区二区美女诱惑| 欧洲视频一区二区| 久久美女艺术照精彩视频福利播放| 亚洲人成小说网站色在线| 蜜臀av在线播放一区二区三区| 成人免费高清在线观看| 国产精品一级片在线观看| 91黄色激情网站| 精品电影一区二区三区| 亚洲一区二区三区小说| 国产成人在线色| 欧美一区二区三区在线看| 亚洲桃色在线一区| 国内精品久久久久影院一蜜桃| 色八戒一区二区三区| 久久精品亚洲精品国产欧美| 手机精品视频在线观看| 香蕉久久夜色精品国产使用方法 | 国产精品美女久久久久久2018| 午夜精品123| 91色porny| 国产亚洲一区二区三区在线观看| 天天色天天操综合| 91麻豆免费看| 国产精品欧美一区二区三区| 老司机午夜精品99久久| 欧美日韩久久久一区| 欧美日韩一区小说| 综合色天天鬼久久鬼色| 国产精品一区二区久激情瑜伽| 欧美电影在线免费观看| 亚洲精品免费电影| av在线一区二区| 国产欧美精品区一区二区三区| 久久精品久久99精品久久| 欧美色精品在线视频| 亚洲精品视频一区| 成人a免费在线看| 久久综合九色欧美综合狠狠| 日韩电影在线看| 欧美美女喷水视频| 亚洲午夜日本在线观看| 一本大道av一区二区在线播放| 国产精品乱码妇女bbbb| 国产呦精品一区二区三区网站| 日韩小视频在线观看专区| 亚洲一区二区视频| 91福利视频在线| 亚洲最大成人综合| 在线亚洲免费视频| 亚洲综合久久av| 欧亚洲嫩模精品一区三区| 亚洲黄色免费网站| 日本久久一区二区三区| 一区二区三区四区精品在线视频 | 中文字幕中文字幕一区| 国产成人三级在线观看| 精品国产精品网麻豆系列 | 91精品国产综合久久久久久| 视频一区国产视频| 在线播放视频一区| 精品一区二区综合| 2020国产精品自拍| 国产.欧美.日韩| 国产精品久久久久久妇女6080| 亚洲午夜激情av| 欧美日韩高清一区二区不卡| 日韩精品午夜视频| 欧美一区二区网站| 国产日韩欧美精品综合| 国产精品66部| 中文字幕乱码日本亚洲一区二区 | 国产精品午夜电影| 波多野结衣在线一区| 国产精品国产自产拍高清av王其| 成人免费观看视频| 亚洲久草在线视频| 国产一区二区三区免费| 欧美国产综合一区二区| 97精品电影院| 亚洲一区二区三区三| 69堂国产成人免费视频| 国产在线不卡视频| √…a在线天堂一区| 欧美综合在线视频| 麻豆精品国产传媒mv男同| 国产午夜精品一区二区| 色综合天天综合网天天看片| 日韩影院精彩在线| 国产欧美一区二区三区在线老狼| 日韩国产欧美三级| 欧美精品一区二区高清在线观看| 国产99久久久久久免费看农村| 国产精品麻豆视频| 欧美日本不卡视频| 韩国理伦片一区二区三区在线播放 | 久久久www成人免费毛片麻豆| 99国产精品久| 强制捆绑调教一区二区| 日本一区二区久久| 欧美久久婷婷综合色| 国产一区二区看久久| 樱桃视频在线观看一区| 欧美成人精品3d动漫h| 99精品视频在线播放观看| 日本系列欧美系列| 国产精品欧美一级免费| 欧美乱妇20p| 丁香婷婷深情五月亚洲| 一区二区三区免费| 久久亚洲影视婷婷| 欧美在线啊v一区| 麻豆精品视频在线| 亚洲激情第一区| 国产亚洲欧美一区在线观看| 一本到不卡精品视频在线观看 | www激情久久| 在线观看日韩电影| 国产精品一级片| 喷水一区二区三区| 亚洲情趣在线观看| 久久久91精品国产一区二区三区| 日本精品裸体写真集在线观看| 国产一区二区视频在线播放| 亚洲日本免费电影| 国产日产欧美一区二区视频| 在线观看91精品国产麻豆| 99国产精品久久久久久久久久| 国产呦萝稀缺另类资源| 日韩精品亚洲一区二区三区免费| 亚洲日穴在线视频| 精品国产青草久久久久福利| 日本韩国欧美一区二区三区| 国产一区二区三区电影在线观看 | 欧美在线观看你懂的| 成人av电影免费观看| 日本亚洲免费观看| 亚洲va欧美va天堂v国产综合| 国产精品国产馆在线真实露脸| 成人av资源在线| 韩国一区二区三区| 免费看日韩精品| 亚洲成人av福利| 一区二区三区视频在线看| 欧美猛男超大videosgay| 丁香婷婷综合色啪| 国产在线精品一区二区夜色| 午夜不卡在线视频| 亚洲乱码国产乱码精品精可以看 | 韩日欧美一区二区三区| 日韩av在线发布| 五月天精品一区二区三区| 亚洲一区自拍偷拍| 亚洲精品乱码久久久久久黑人| 久久精品视频免费| 欧美va亚洲va香蕉在线| 欧美一区二区视频在线观看| 欧美性猛交xxxx乱大交退制版| 91丨porny丨国产| 99视频国产精品| 成人视屏免费看| 国内精品写真在线观看| 久久99精品国产91久久来源| 男女视频一区二区| 日韩av中文字幕一区二区| 亚洲18影院在线观看| 亚洲成人资源在线| 婷婷丁香激情综合| 日韩精品福利网| 亚洲成av人影院| 亚洲va欧美va天堂v国产综合| 亚洲综合久久久| 性欧美大战久久久久久久久| 日本视频一区二区| 免费人成精品欧美精品| 免费在线看成人av| 国产在线精品一区在线观看麻豆| 国产一区二区精品久久91| 国产精品一区不卡| eeuss鲁一区二区三区| 色婷婷综合久久久中文一区二区|