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

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

?? resource.java

?? jxta平臺的開發(fā)包
?? JAVA
?? 第 1 頁 / 共 3 頁
字號:
/* *  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 thproe 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 THE APACHE SOFTWARE FOUNDATION 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: Resource.java,v 1.30 2006/09/22 22:48:53 gonzo Exp $ */package net.jxta.ext.config;import java.awt.Color;import java.io.ByteArrayInputStream;import java.io.ByteArrayOutputStream;import java.io.File;import java.io.InputStream;import java.io.StringWriter;import java.io.IOException;import java.net.MalformedURLException;import java.net.URI;import java.net.URL;import java.util.ArrayList;import java.util.Iterator;import java.util.List;import javax.xml.namespace.QName;import javax.xml.parsers.DocumentBuilder;import javax.xml.parsers.DocumentBuilderFactory;import javax.xml.parsers.ParserConfigurationException;import javax.xml.transform.Transformer;import javax.xml.transform.TransformerConfigurationException;import javax.xml.transform.TransformerException;import javax.xml.transform.TransformerFactoryConfigurationError;import javax.xml.transform.TransformerFactory;import javax.xml.transform.dom.DOMSource;import javax.xml.transform.stream.StreamResult;import javax.xml.xpath.XPath;import javax.xml.xpath.XPathConstants;import javax.xml.xpath.XPathExpression;import javax.xml.xpath.XPathExpressionException;import javax.xml.xpath.XPathFactory;import org.w3c.dom.Attr;import org.w3c.dom.Document;import org.w3c.dom.DOMException;import org.w3c.dom.Element;import org.w3c.dom.Node;import org.w3c.dom.NodeList;import org.w3c.dom.Text;import org.xml.sax.SAXException;/** * XML resource accessor utility. * * @author     james todd [gonzo at jxta dot org] */public class Resource {    private final static String ROOT = "ROOT";    private final static String ELEMENT_DELIMITER = "/";    private final static String ATTRIBUTE_DELIMITER = "@";    private final static String DOT = ".";    private final static String FILE_SEPERATOR =        System.getProperty("file.separator", "/");    private final static char NEW_LINE = '\n';    private final static String EXCEPTION_PREFIX = "unable to find resource: ";    private final static Object lock = new Object();    private List resources = null;    private Element root = null;    private DocumentBuilder db = null;    private XPath xp = null;    /**     * Convenience {@link java.net.URL} conversion method.     *     * @param       s       specified {@link java.net.URL} in the form of a     *                      {@link java.lang.String}     * @return              {@link java.net.URL} representaion of the specified     *                      parameter     */        public static URL toURL(String s)    throws ConversionException {        return Conversion.toURL(s);    }    /**     * Convenience {@link java.net.URL} conversion method.     *     * @param       f       specified {@link java.net.URL} in the form of a     *                      {@link java.io.File}     * @return              {@link java.net.URL} representation of the specified     *                      parameter.     */        public static URL toURL(File f)    throws ConversionException {        return Conversion.toURL(f);    }        /**     * Default constructor.     */        public Resource() {        this(ROOT);    }        /**     * Constructor which overrides the default backing document root.     *     * @param       root        root element name     */        public Resource(String root) {        this.resources = new ArrayList();                  try {            this.root = getDocumentBuilder().newDocument().createElement(root);        } catch (DOMException de) {        }    }    /**     * Loads the specified resource.     *     * @param       resource        resource {@link java.net.URL} address     */        public void load(URL resource)    throws ResourceNotFoundException {        process(resource);    }        /**     * Loads the specified resource.     *     * <p>If the specified resource fails to convert to a {@link java.net.URL}     * a series of stream instantiation will be attempted.     *     * @param       resource        specified resource     * @throws      {@link net.jxta.ext.config.ResourceNotFoundException}   thrown if the specified     *                                                  resource is not resolvable     */        public void load(String resource)    throws ResourceNotFoundException {        Exception e = null;        try {            load(getClass().getResource(resource));        } catch (ResourceNotFoundException rnfe) {            e = rnfe;        }        if (e != null) {            try {                process(resource);            } catch (ResourceNotFoundException rnfe) {                if (!resource.startsWith(FILE_SEPERATOR)) {                    process(FILE_SEPERATOR + resource);                }            }        }    }    /**     * Loads the specified resource.     *     * @param       resource    specified resource as a {@link java.io.File}     * @throws      {@link net.jxta.ext.config.ResourceNotFoundException}    thrown if the specified resource     *                                              is not resolvable.     * @throws      {@link java.net.MalformedURLException}  thrown if the specified     *                                                  resource can not be converted     *                                                  to a {@link java.net.URL}     */        public void load(File resource)    throws ResourceNotFoundException, MalformedURLException {        load(resource.toURL());    }    /**     * Loads the specified resource relative to the provided {@link java.lang.Class}     *     * @param       resource        specified resource     * @param       clazz           {@link java.lang.Class} used to load the resource     * @throws      {@link net.jxta.ext.config.ResourceNotFoundException}   thrown if the specified     *                                                  resource is not resolvable.     */        public void load(String resource, Class clazz)    throws ResourceNotFoundException {            process(resource, clazz);    }    /**     * Loads the specified resource.     *     * @param       is      resource specified as a {@link java.io.InputStream}     * @throws      {@link net.jxta.ext.config.ResourceNotFoundException}   thrown if the specified     *                                                  resource is not resolvable.     */        public void load(InputStream is)    throws ResourceNotFoundException {        process(is);    }    /**     * Accessor for the named resource as a {@link java.io.InputStream}     *     * @param       resource     name of the resource     * @return      {@link java.io.InputStream}     a {@link java.io.InputStream}     *                                              for the specified resource.     */        public InputStream getResourceAsStream(String resource) {        return getResourceAsStream(resource, null);    }        /**     * Accessor for the named resource as a {@link java.io.InputStream}     *     * @param       resource    name of the resource     * @param       clazz       {@link java.lang.Class} used to load the resource.     */    public InputStream getResourceAsStream(String resource, Class clazz) {        if (clazz == null) {            clazz = Resource.class;        }        return clazz.getResourceAsStream(resource);    }        /**     * Accessor for the named resource.     *     * @param       key     specified resource name     * @return              resource value as a {@link java.lang.String} or null     *                      if the named resource is not resolvable     */    public String get(String key) {        return get(key, null);    }    /**     * Accessor for the named resource.     *     * @param       key     specified resource name     * @param       d       specified default value     * @return              resource value as a {@link java.lang.String} or the     *                      specified default value if the named resource is not     *                      resolvable     */        public String get(String key, String d) {        return getValue(key, d);    }    /**     * Accessor for the named resource.     *     * @param       key     specified resource name     * @return              resource value as an int     * @throws              {link ConversionException}  thrown in the event the     *                      named resource is not convertible to an integer or     *                      is not resolvable.     */        public int getInt(String key)    throws ConversionException {        return getInt(key, null);    }    /**     * Accessor for the named resource.     *     * @param       key     specified resource name     * @param       d       specified default value     * @return              resource value as an int or the specified default     *                      value if the named resource is not resolvable.     */        public int getInt(String key, int d) {        int i = 0;        try {            i = getInt(key, new Integer(d));        } catch (ConversionException ce) {}        return i;    }    /**     * Accessor for the named rsource.     *     * @param       key     specified resource name     * @param       d       specified default value     * @return              resource value as an int or the specified default     *                      value if the named resource is not resolvable.     * @throws      {@link net.jxta.ext.config.ConverstionException}    thrown in the event the named     *                                              resource is not convertible to     *                                              an int or is not resolvable.     */        public int getInt(String key, Integer d)    throws ConversionException {        String s = get(key, (d != null) ? d.toString() : null);        return Conversion.toInt(s);    }    /**     * Accessor for the named resource.     *     * @param       key     specified resource name     * @return              resource value as a long     * @exception   {@link net.jxta.ext.config.ConverstionException}    thrown in the event the named     *                                              resource is not convertible to     *                                              a long or is not resolvable.     */        public long getLong(String key)    throws ConversionException {        return getLong(key, null);    }        /**     * Accessor for the named resource.     *     * @param       key     specified resource name     * @param       d       specified default value     * @return              resource value as a long or the specified default     *                      value if the named resource is not covertible to a     *                      long or is not resovlable.     */        public long getLong(String key, long d) {        long i = 0;        try {            i = getLong(key, new Long(d));        } catch (ConversionException ce) {}        return i;    }       /**     * Accessor for the named resource.     *     * @param       key     specified resource name     * @param       d       specified default value     * @return              resource value as a long or the specified default     *                      value if the named resource is not covertible to a     *                      long or is not resovlable.     */        public long getLong(String key, Long d)    throws ConversionException {        String s = get(key, (d != null) ? d.toString() : null);        return Conversion.toLong(s);    }    /**     * Accessor for a named resource.     *

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩精品一区二区三区在线播放| 91影视在线播放| 26uuu精品一区二区在线观看| 免费黄网站欧美| 亚洲精品一区二区三区香蕉| 精品一区二区在线播放| 久久午夜羞羞影院免费观看| 国内精品伊人久久久久av一坑| 久久久久久久久免费| 国产精品羞羞答答xxdd| 成人欧美一区二区三区黑人麻豆 | 日本不卡视频在线观看| 亚洲精品一区二区三区99| 高清免费成人av| 一区二区成人在线视频| 欧美大片在线观看一区二区| 国产精品99久久久| 国产自产视频一区二区三区| 国产精品一区二区久激情瑜伽| 在线播放欧美女士性生活| 欧美日韩中文精品| 精品久久久久久久久久久久包黑料| 麻豆一区二区99久久久久| 久久亚洲一级片| 成人污视频在线观看| 亚洲成人av电影在线| 欧美大片在线观看| 色哟哟国产精品| 国内久久精品视频| 一区二区三区精品| 337p日本欧洲亚洲大胆色噜噜| 不卡av免费在线观看| 爽好多水快深点欧美视频| 国产女人18水真多18精品一级做| 色哟哟欧美精品| 国产精品2024| 亚洲成人av免费| 岛国精品一区二区| 日韩精品欧美成人高清一区二区| 精品日韩欧美在线| 色屁屁一区二区| 国产精品主播直播| 日韩在线一区二区三区| 国产精品进线69影院| 欧美电视剧免费全集观看| www.欧美日韩| 国产精品一卡二| 免费观看成人鲁鲁鲁鲁鲁视频| 亚洲欧美日韩一区二区三区在线观看| 日韩精品中午字幕| 欧美中文字幕一区| 成人一级片网址| 国产精品一区二区不卡| 奇米在线7777在线精品| 亚洲国产精品一区二区久久恐怖片 | 日韩欧美一级二级三级| 欧美三级视频在线观看| 91麻豆精品国产无毒不卡在线观看| 91视频免费看| 精品一区二区免费在线观看| 夜夜夜精品看看| 国产精品成人一区二区三区夜夜夜 | 亚洲成在人线免费| 亚洲欧洲日产国产综合网| 国产婷婷色一区二区三区在线| 欧美大片在线观看一区二区| 欧美一区二区三区影视| 欧美美女黄视频| 欧美日韩精品一区二区三区| 色94色欧美sute亚洲线路一久 | 国产日韩一级二级三级| 精品国产乱码久久久久久图片| 欧美一区二区三区婷婷月色| 51精品国自产在线| 在线播放国产精品二区一二区四区| 91九色最新地址| 在线亚洲人成电影网站色www| 久久99热国产| 狠狠色丁香久久婷婷综| 狠狠狠色丁香婷婷综合激情| 蜜芽一区二区三区| 久久精品久久精品| 国产美女在线精品| 成人性视频网站| 91在线一区二区| 91久久线看在观草草青青| 在线一区二区视频| 欧美四级电影网| 91麻豆精品国产91久久久 | 欧美日韩一区二区在线观看| 欧美在线观看一区二区| 欧美日本在线播放| 欧美成人女星排名| 国产欧美精品日韩区二区麻豆天美| 国产欧美精品一区二区色综合| 国产精品久久久久久户外露出| 日韩码欧中文字| 婷婷久久综合九色综合绿巨人| 免费的国产精品| 国产成都精品91一区二区三| 国产精品综合二区| av欧美精品.com| 在线观看视频一区二区欧美日韩| 欧美在线观看一区二区| 欧美一二三区在线观看| 国产亚洲女人久久久久毛片| 中文字幕一区二区5566日韩| 亚洲一区二区在线免费看| 日本亚洲三级在线| 国产精品中文有码| 在线免费观看不卡av| 日韩午夜精品电影| 国产精品久久久久久久浪潮网站 | 日韩一区二区三区精品视频| 国产亚洲一本大道中文在线| 亚洲激情五月婷婷| 久久99国产精品久久99| 99久久婷婷国产| 日韩一区二区免费在线电影| 欧美激情综合网| 日韩高清一区二区| 99综合电影在线视频| 国产日韩欧美高清在线| 国产iv一区二区三区| 欧美综合在线视频| 国产亚洲一区字幕| 日韩精品一二三区| 波多野洁衣一区| 欧美一级久久久久久久大片| 日韩美女精品在线| 国产中文一区二区三区| 色美美综合视频| 久久久久国色av免费看影院| 亚洲一区二区三区爽爽爽爽爽| 国产精品亚洲专一区二区三区 | 欧美三级中文字| 欧美激情一区三区| 免费一级欧美片在线观看| 色综合天天综合网天天狠天天 | 国产精品污污网站在线观看| 日韩高清在线一区| 91偷拍与自偷拍精品| 久久精品日产第一区二区三区高清版| 亚洲成人av一区二区| 99国产一区二区三精品乱码| 国产视频一区在线播放| 六月婷婷色综合| 久久精品国产亚洲aⅴ| 91丝袜呻吟高潮美腿白嫩在线观看| 欧美v亚洲v综合ⅴ国产v| 亚洲五月六月丁香激情| av网站免费线看精品| 国产精品久久综合| 风流少妇一区二区| 久久久国产午夜精品| 蜜臀av一区二区| 91精品国产综合久久精品性色| 亚洲国产你懂的| 欧美三级电影在线观看| 亚洲综合区在线| 欧美色区777第一页| 亚洲最大成人综合| 91成人免费在线视频| 亚洲一区二区美女| 色偷偷成人一区二区三区91| 亚洲欧美偷拍三级| 91麻豆文化传媒在线观看| 一区二区中文视频| 色婷婷激情综合| 一区二区三区视频在线看| 在线国产亚洲欧美| 亚洲午夜av在线| 91精品国产福利在线观看 | 久久综合久久综合久久综合| 国产精品免费免费| 国产一区免费电影| 国产日韩综合av| 高清视频一区二区| 亚洲男同1069视频| 欧美在线综合视频| 视频一区在线播放| 日韩欧美成人激情| 国产成人精品午夜视频免费| 中文字幕欧美三区| 91免费看`日韩一区二区| 亚洲一区二区中文在线| 日韩一区二区三区电影 | 国产夫妻精品视频| 国产精品护士白丝一区av| 91在线观看下载| 亚洲bt欧美bt精品777| 日韩一级片在线播放| 国产真实乱对白精彩久久| 国产精品麻豆欧美日韩ww| 色久优优欧美色久优优| 视频精品一区二区| 国产午夜精品理论片a级大结局| 99国内精品久久| 蜜桃视频在线一区| 亚洲欧洲日产国码二区|