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

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

?? xmlpullparserfactory.java

?? wap瀏覽器 日程安排 Rss 棋牌游戲
?? JAVA
字號:
/* -*-             c-basic-offset: 4; indent-tabs-mode: nil; -*-  //------100-columns-wide------>|*/// for license please see accompanying LICENSE.txt file (available also at http://www.xmlpull.org/)package org.xmlpull.v1;import java.io.InputStream;import java.util.Enumeration;import java.util.Hashtable;import java.util.Vector;/** * This class is used to create implementations of XML Pull Parser defined in XMPULL V1 API. * The name of actual factory class will be determined based on several parameters. * It works similar to JAXP but tailored to work in J2ME environments * (no access to system properties or file system) so name of parser class factory to use * and its class used for loading (no class loader - on J2ME no access to context class loaders) * must be passed explicitly. If no name of parser factory was passed (or is null) * it will try to find name by searching in CLASSPATH for * META-INF/services/org.xmlpull.v1.XmlPullParserFactory resource that should contain * a comma separated list of class names of factories or parsers to try (in order from * left to the right). If none found, it will throw an exception. * * <br /><strong>NOTE:</strong>In J2SE or J2EE environments, you may want to use * <code>newInstance(property, classLoaderCtx)</code> * where first argument is * <code>System.getProperty(XmlPullParserFactory.PROPERTY_NAME)</code> * and second is <code>Thread.getContextClassLoader().getClass()</code> . * * @see XmlPullParser * * @author <a href="http://www.extreme.indiana.edu/~aslom/">Aleksander Slominski</a> * @author Stefan Haustein */public class XmlPullParserFactory {    /** used as default class to server as context class in newInstance() */    final static Class referenceContextClass;    static {        XmlPullParserFactory f = new XmlPullParserFactory();        referenceContextClass = f.getClass();    }    /** Name of the system or midlet property that should be used for     a system property containing a comma separated list of factory     or parser class names (value:     org.xmlpull.v1.XmlPullParserFactory). */    public static final String PROPERTY_NAME =        "org.xmlpull.v1.XmlPullParserFactory";    private static final String RESOURCE_NAME =        "/META-INF/services/" + PROPERTY_NAME;    // public static final String DEFAULT_PROPERTY =    //    "org.xmlpull.xpp3.XmlPullParser,org.kxml2.io.KXmlParser";    protected Vector parserClasses;    protected String classNamesLocation;    protected Vector serializerClasses;    // features are kept there    protected Hashtable features = new Hashtable();    /**     * Protected constructor to be called by factory implementations.     */    protected XmlPullParserFactory() {    }    /**     * Set the features to be set when XML Pull Parser is created by this factory.     * <p><b>NOTE:</b> factory features are not used for XML Serializer.     *     * @param name string with URI identifying feature     * @param state if true feature will be set; if false will be ignored     */    public void setFeature(String name,                           boolean state) throws XmlPullParserException {        features.put(name, new Boolean(state));    }    /**     * Return the current value of the feature with given name.     * <p><b>NOTE:</b> factory features are not used for XML Serializer.     *     * @param name The name of feature to be retrieved.     * @return The value of named feature.     *     Unknown features are <string>always</strong> returned as false     */    public boolean getFeature (String name) {        Boolean value = (Boolean) features.get(name);        return value != null ? value.booleanValue() : false;    }    /**     * Specifies that the parser produced by this factory will provide     * support for XML namespaces.     * By default the value of this is set to false.     *     * @param awareness true if the parser produced by this code     *    will provide support for XML namespaces;  false otherwise.     */    public void setNamespaceAware(boolean awareness) {        features.put (XmlPullParser.FEATURE_PROCESS_NAMESPACES, new Boolean (awareness));    }    /**     * Indicates whether or not the factory is configured to produce     * parsers which are namespace aware     * (it simply set feature XmlPullParser.FEATURE_PROCESS_NAMESPACES to true or false).     *     * @return  true if the factory is configured to produce parsers     *    which are namespace aware; false otherwise.     */    public boolean isNamespaceAware() {        return getFeature (XmlPullParser.FEATURE_PROCESS_NAMESPACES);    }    /**     * Specifies that the parser produced by this factory will be validating     * (it simply set feature XmlPullParser.FEATURE_VALIDATION to true or false).     *     * By default the value of this is set to false.     *     * @param validating - if true the parsers created by this factory  must be validating.     */    public void setValidating(boolean validating) {        features.put (XmlPullParser.FEATURE_VALIDATION, new Boolean (validating));    }    /**     * Indicates whether or not the factory is configured to produce parsers     * which validate the XML content during parse.     *     * @return   true if the factory is configured to produce parsers     * which validate the XML content during parse; false otherwise.     */    public boolean isValidating() {        return getFeature (XmlPullParser.FEATURE_VALIDATION);    }    /**     * Creates a new instance of a XML Pull Parser     * using the currently configured factory features.     *     * @return A new instance of a XML Pull Parser.     * @throws XmlPullParserException if a parser cannot be created which satisfies the     * requested configuration.     */    public XmlPullParser newPullParser() throws XmlPullParserException {        if (parserClasses == null) throw new XmlPullParserException                ("Factory initialization was incomplete - has not tried "+classNamesLocation);        if (parserClasses.size() == 0) throw new XmlPullParserException                ("No valid parser classes found in "+classNamesLocation);        final StringBuffer issues = new StringBuffer ();        for (int i = 0; i < parserClasses.size (); i++) {            final Class ppClass = (Class) parserClasses.elementAt (i);            try {                final XmlPullParser pp = (XmlPullParser) ppClass.newInstance();                //            if( ! features.isEmpty() ) {                //Enumeration keys = features.keys();                // while(keys.hasMoreElements()) {                for (Enumeration e = features.keys (); e.hasMoreElements ();) {                    final String key = (String) e.nextElement();                    final Boolean value = (Boolean) features.get(key);                    if(value != null && value.booleanValue()) {                        pp.setFeature(key, true);                    }                }                return pp;            } catch(Exception ex) {                issues.append (ppClass.getName () + ": "+ ex.toString ()+"; ");            }        }        throw new XmlPullParserException ("could not create parser: "+issues);    }    /**     * Creates a new instance of a XML Serializer.     *     * <p><b>NOTE:</b> factory features are not used for XML Serializer.     *     * @return A new instance of a XML Serializer.     * @throws XmlPullParserException if a parser cannot be created which satisfies the     * requested configuration.     */    public XmlSerializer newSerializer() throws XmlPullParserException {        if (serializerClasses == null) {            throw new XmlPullParserException                ("Factory initialization incomplete - has not tried "+classNamesLocation);        }        if(serializerClasses.size() == 0) {            throw new XmlPullParserException                ("No valid serializer classes found in "+classNamesLocation);        }        final StringBuffer issues = new StringBuffer ();        for (int i = 0; i < serializerClasses.size (); i++) {            final Class ppClass = (Class) serializerClasses.elementAt (i);            try {                final XmlSerializer ser = (XmlSerializer) ppClass.newInstance();                //                for (Enumeration e = features.keys (); e.hasMoreElements ();) {                //                    String key = (String) e.nextElement();                //                    Boolean value = (Boolean) features.get(key);                //                    if(value != null && value.booleanValue()) {                //                        ser.setFeature(key, true);                //                    }                //                }                return ser;            } catch(Exception ex) {                issues.append (ppClass.getName () + ": "+ ex.toString ()+"; ");            }        }        throw new XmlPullParserException ("could not create serializer: "+issues);    }    /**     * Create a new instance of a PullParserFactory that can be used     * to create XML pull parsers (see class description for more     * details).     *     * @return a new instance of a PullParserFactory, as returned by newInstance (null, null);      */    public static XmlPullParserFactory newInstance () throws XmlPullParserException {        return newInstance(null, null);    }    public static XmlPullParserFactory newInstance (String classNames, Class context)        throws XmlPullParserException {        if (context == null) {            //NOTE: make sure context uses the same class loader as API classes            //      this is the best we can do without having access to context classloader in J2ME            //      if API is in the same classloader as implementation then this will work            context = referenceContextClass;        }        String  classNamesLocation = null;        if (classNames == null || classNames.length() == 0 || "DEFAULT".equals(classNames)) {            try {                InputStream is = context.getResourceAsStream (RESOURCE_NAME);                if (is == null) throw new XmlPullParserException                        ("resource not found: "+RESOURCE_NAME                             +" make sure that parser implementing XmlPull API is available");                final StringBuffer sb = new StringBuffer();                while (true) {                    final int ch = is.read();                    if (ch < 0) break;                    else if (ch > ' ')                        sb.append((char) ch);                }                is.close ();                classNames = sb.toString ();            }            catch (Exception e) {                throw new XmlPullParserException (null, null, e);            }            classNamesLocation = "resource "+RESOURCE_NAME+" that contained '"+classNames+"'";        } else {            classNamesLocation =                "parameter classNames to newInstance() that contained '"+classNames+"'";        }        XmlPullParserFactory factory = null;        final Vector parserClasses = new Vector ();        final Vector serializerClasses = new Vector ();        int pos = 0;        while (pos < classNames.length ()) {            int cut = classNames.indexOf (',', pos);            if (cut == -1) cut = classNames.length ();            final String name = classNames.substring (pos, cut);            Class candidate = null;            Object instance = null;            try {                candidate = Class.forName (name);                // necessary because of J2ME .class issue                instance = candidate.newInstance ();            }            catch (Exception e) {}            if (candidate != null) {                boolean recognized = false;                if (instance instanceof XmlPullParser) {                    parserClasses.addElement (candidate);                    recognized = true;                }                if (instance instanceof XmlSerializer) {                    serializerClasses.addElement (candidate);                    recognized = true;                }                if (instance instanceof XmlPullParserFactory) {                    if (factory == null) {                        factory = (XmlPullParserFactory) instance;                    }                    recognized = true;                }                if (!recognized) {                    throw new XmlPullParserException ("incompatible class: "+name);                }            }            pos = cut + 1;        }        if (factory == null) {            factory = new XmlPullParserFactory ();        }        factory.parserClasses = parserClasses;        factory.serializerClasses = serializerClasses;        factory.classNamesLocation = classNamesLocation;        return factory;    }}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩有码一区二区三区| 成人的网站免费观看| 欧美在线短视频| 天天影视色香欲综合网老头| 欧美精品久久久久久久多人混战 | 中文字幕一区二区三区在线不卡| 丁香另类激情小说| 一区二区三区欧美| 国产视频一区二区三区在线观看| 波多野结衣中文字幕一区 | 国产精品白丝av| 一区二区三区四区视频精品免费| 欧美挠脚心视频网站| 国产一二三精品| 日本伊人色综合网| 亚洲美女视频一区| 国产精品私人影院| 久久久亚洲国产美女国产盗摄 | 国产一区二区三区日韩| 亚洲精品一二三区| 国产精品久久久久一区| 欧美xxxx老人做受| 欧美高清hd18日本| 欧美日韩电影在线播放| 99视频热这里只有精品免费| 国产一区二区三区在线观看免费视频| 亚洲成av人在线观看| 亚洲特黄一级片| 国产日韩欧美高清在线| 欧美va亚洲va香蕉在线| 精品播放一区二区| 欧美丰满美乳xxx高潮www| 欧美精品色综合| 欧美挠脚心视频网站| 91在线观看视频| 欧美视频在线一区二区三区 | 麻豆极品一区二区三区| 丝瓜av网站精品一区二区| 日本成人中文字幕在线视频| 久久成人免费日本黄色| 国产精品一区二区久久精品爱涩| 粉嫩aⅴ一区二区三区四区| 99久久久无码国产精品| 欧美三级在线播放| 欧美国产综合一区二区| 国产精品白丝在线| 日韩福利视频网| 狠狠色狠狠色综合系列| 色综合久久天天| 精品99一区二区| 三级一区在线视频先锋| 成人免费视频国产在线观看| 欧美乱妇23p| 亚洲欧美乱综合| 国产在线国偷精品产拍免费yy| 成人91在线观看| 国产无人区一区二区三区| 亚洲第一二三四区| 在线欧美日韩国产| 中文字幕精品综合| 国产精品一区不卡| 日韩欧美电影一区| 天天av天天翘天天综合网 | 91丝袜呻吟高潮美腿白嫩在线观看| 欧美一级免费大片| 五月天一区二区| 欧美三级日本三级少妇99| 亚洲三级在线播放| 99久久99久久精品免费观看| 欧美—级在线免费片| 九九九精品视频| 欧美一区午夜视频在线观看 | 日韩中文字幕一区二区三区| eeuss鲁片一区二区三区在线观看| 337p日本欧洲亚洲大胆色噜噜| 日韩电影免费在线看| 日韩手机在线导航| 看电影不卡的网站| 国产无遮挡一区二区三区毛片日本| 黄一区二区三区| 亚洲女同一区二区| 欧美色老头old∨ideo| 奇米四色…亚洲| 国产精品久久久久久久久晋中| 91亚洲永久精品| 日韩电影在线看| 欧美激情在线看| 欧美日精品一区视频| 国产福利一区二区三区视频| 国产精品国产三级国产普通话蜜臀 | 欧洲一区在线观看| 国产在线日韩欧美| 亚洲自拍偷拍综合| 欧美激情综合五月色丁香| 欧美日韩另类国产亚洲欧美一级| 国产剧情一区二区三区| 亚洲成人三级小说| 国产精品欧美一区喷水| 日韩写真欧美这视频| 色综合欧美在线视频区| 国产**成人网毛片九色 | 91麻豆自制传媒国产之光| 免费成人av资源网| 亚洲成人资源在线| 亚洲精品乱码久久久久久日本蜜臀| 精品国产伦一区二区三区观看方式| 91蝌蚪国产九色| 91丨九色丨国产丨porny| 六月婷婷色综合| 精品一区二区在线观看| 日韩精品久久理论片| 一区二区三区在线免费视频| 1000部国产精品成人观看| 国产精品久久毛片av大全日韩| 国产欧美一区二区精品忘忧草| 2021国产精品久久精品| 欧美变态凌虐bdsm| 精品国产乱码久久久久久夜甘婷婷 | 中文字幕日韩欧美一区二区三区| 精品精品欲导航| 久久久亚洲欧洲日产国码αv| 欧美国产精品一区二区| 亚洲精品一区在线观看| 中文字幕乱码一区二区免费| 国产精品情趣视频| 五月婷婷激情综合| 国产成人av一区二区三区在线| 盗摄精品av一区二区三区| 91丨porny丨国产| 欧美一区二区三区小说| 久久久久青草大香线综合精品| 国产欧美精品在线观看| 亚洲欧美日韩综合aⅴ视频| 美日韩一区二区| 99这里只有久久精品视频| 538在线一区二区精品国产| 久久一区二区视频| 亚洲图片欧美视频| 成人av电影免费观看| 精品成人在线观看| 日韩二区三区四区| 91精彩视频在线| 亚洲欧美视频在线观看视频| 国产一区二区不卡| 欧美精品一区二区三区视频| 亚洲一卡二卡三卡四卡五卡| 欧美亚洲国产一区二区三区va | 91黄色免费网站| 亚洲日本成人在线观看| 国产精选一区二区三区| 精品免费视频.| 国产综合色产在线精品| 日韩欧美国产系列| 精东粉嫩av免费一区二区三区| 欧美另类变人与禽xxxxx| 日韩精品1区2区3区| 欧美一区二区成人6969| 秋霞电影一区二区| 日韩亚洲欧美一区| 国产一区二区看久久| 国产精品美日韩| 一本到不卡精品视频在线观看| 一区二区三区电影在线播| 色狠狠桃花综合| 亚洲自拍偷拍欧美| 亚洲精品一区二区在线观看| 成人在线一区二区三区| 亚洲bt欧美bt精品| 国产亚洲欧美一区在线观看| 成人网男人的天堂| 天堂蜜桃91精品| 中文字幕不卡三区| 欧美午夜电影网| 风间由美一区二区三区在线观看| 亚洲欧美一区二区三区孕妇| 91精品国产综合久久香蕉的特点| 国产成人av一区二区| 亚洲国产一区二区三区 | 欧美一级艳片视频免费观看| a级高清视频欧美日韩| 日本伊人午夜精品| 专区另类欧美日韩| 国产日产亚洲精品系列| 欧美日高清视频| 91美女福利视频| 成人福利电影精品一区二区在线观看| 亚洲在线视频一区| 国产精品伦理一区二区| 久久亚洲精品国产精品紫薇| 欧美久久高跟鞋激| 欧美三级电影网| 欧美伊人久久大香线蕉综合69| av成人免费在线观看| 国产 欧美在线| 97久久超碰精品国产| 91小宝寻花一区二区三区| 色综合夜色一区| 欧美色倩网站大全免费| 欧美色窝79yyyycom| 欧美嫩在线观看|