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

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

?? configuration.java

?? velocity 的腳本語言的全部代碼集合
?? JAVA
?? 第 1 頁 / 共 4 頁
字號:
                             * use this.
                             */
                            file = new File(value);
                        }
                        else
                        {   
                            /* 
                             * We have a relative path, and we have
                             * two possible forms here. If we have the
                             * "./" form then just strip that off first
                             * before continuing.
                             */
                            if (value.startsWith("." + fileSeparator))
                            {
                                value = value.substring(2);
                            }
                            
                            file = new File(basePath + value);
                        }
                        
                        if (file != null && file.exists() && file.canRead())
                        {
                            load ( new FileInputStream(file));
                        }
                    }
                    else
                    {
                        addProperty(key,value);
                        //setProperty(key,value);
                    }                       
                }
            }
        }
        catch (NullPointerException e)
        {
            /*
             * Should happen only when EOF is reached.
             */
            return;
        }
    }

    /**
     *  Gets a property from the configuration.
     *
     *  @param key property to retrieve
     *  @return value as object. Will return user value if exists,
     *          if not then default value if exists, otherwise null
     */
    public Object getProperty( String key)
    {
        /*
         *  first, try to get from the 'user value' store
         */
        Object o = this.get(key);

        if ( o == null)
        {
            /*
             *  if there isn't a value there, get it from the
             *  defaults if we have them
             */
            if (defaults != null)
            {
                o = defaults.get(key);
            }
        }

        return o;
    }
    
    /**
     * Add a property to the configuration. If it already
     * exists then the value stated here will be added
     * to the configuration entry. For example, if
     *
     * resource.loader = file
     *
     * is already present in the configuration and you
     *
     * addProperty("resource.loader", "classpath")
     *
     * Then you will end up with a Vector like the
     * following:
     *
     * ["file", "classpath"]
     *
     * @param String key
     * @param String value
     */
    //public void setProperty(String key, Object token)
    public void addProperty(String key, Object token)
    {

        // $$$ GMJ : remove after 1.1 release
        // for deprecation help
        deprecationCrutch.addProperty( key, token );

        Object o = this.get(key);

        /*
         *  $$$ GMJ
         *  FIXME : post 1.0 release, we need to not assume
         *  that a scalar is a String - it can be an Object
         *  so we should make a little vector-like class
         *  say, Foo that wraps (not extends Vector),
         *  so we can do things like
         *  if ( !( o instanceof Foo) )
         *  so we know it's our 'vector' container
         *
         *  This applies throughout
         */
        
        if (o instanceof String)
        {
            Vector v = new Vector(2);
            v.addElement(o);
            v.addElement(token);
            put(key, v);
        }
        else if (o instanceof Vector)
        {
            ((Vector) o).addElement(token);
        }
        else
        {
            /*
             * This is the first time that we have seen
             * request to place an object in the 
             * configuration with the key 'key'. So
             * we just want to place it directly into
             * the configuration ... but we are going to
             * make a special exception for String objects
             * that contain "," characters. We will take
             * CSV lists and turn the list into a vector of
             * Strings before placing it in the configuration.
             * This is a concession for Properties and the
             * like that cannot parse multiple same key
             * values.
             */
            if (token instanceof String &&
                ((String)token).indexOf(PropertiesTokenizer.DELIMITER) > 0)
            {
                PropertiesTokenizer tokenizer = 
                    new PropertiesTokenizer((String)token);
                    
                while (tokenizer.hasMoreTokens())
                {
                    String value = tokenizer.nextToken();
                    
                    /*
                     * we know this is a string, so make sure it
                     * just goes in rather than risking vectorization
                     * if it contains an escaped comma
                     */
                    addStringProperty(key,value);
                }
            }
            else
            {
                /*
                 * We want to keep track of the order the keys
                 * are parsed, or dynamically entered into
                 * the configuration. So when we see a key
                 * for the first time we will place it in
                 * an ArrayList so that if a client class needs
                 * to perform operations with configuration
                 * in a definite order it will be possible.
                 */

                /*
                 * safety check
                 */

                if( !containsKey( key ) )
                {
                    keysAsListed.add(key);
                }

                /*
                 * and the value
                 */
                put(key, token);
            }                
        }
    }


    /**
     *  Sets a string property w/o checking for commas - used
     *  internally when a property has been broken up into
     *  strings that could contain escaped commas to prevent
     *  the inadvertant vectorization.
     *
     *  Thanks to Leon Messerschmidt for this one.
     *
     */
    private  void addStringProperty(String key, String token)
    {
        Object o = this.get(key);

        /*
         *  $$$ GMJ
         *  FIXME : post 1.0 release, we need to not assume
         *  that a scalar is a String - it can be an Object
         *  so we should make a little vector-like class
         *  say, Foo that wraps (not extends Vector),
         *  so we can do things like
         *  if ( !( o instanceof Foo) )
         *  so we know it's our 'vector' container
         *
         *  This applies throughout
         */

        /*
         *  do the usual thing - if we have a value and 
         *  it's scalar, make a vector, otherwise add
         *  to the vector
         */
 
        if (o instanceof String)
        {
            Vector v = new Vector(2);
            v.addElement(o);
            v.addElement(token);
            put(key, v);
        }
        else if (o instanceof Vector)
        {
            ((Vector) o).addElement(token);
        }
        else
        {
            if( !containsKey( key ) )
            {
                keysAsListed.add(key);
            }

            put( key, token);
        }
    }

    /**
     * Set a property, this will replace any previously
     * set values. Set values is implicitly a call
     * to clearProperty(key), addProperty(key,value).
     *
     * @param String key
     * @param String value
     */
    public void setProperty(String key, Object value)
    {
        clearProperty(key);
        addProperty(key,value);
    }
    
    /**
     * Save the properties to the given outputstream.
     *
     * @param output An OutputStream.
     * @param header A String.
     * @exception IOException.
     */
    public synchronized void save(OutputStream output,
                                  String Header)
        throws IOException
    {
        if(output != null)
        {
            PrintWriter theWrtr = new PrintWriter(output);
            if(Header != null)
            {
                theWrtr.println(Header);
            }
            Enumeration theKeys = keys();
            while(theKeys.hasMoreElements())
            {
                String key = (String) theKeys.nextElement();
                Object value = get((Object) key);
                if(value != null)
                {
                    if(value instanceof String)
                    {
                        StringBuffer currentOutput = new StringBuffer();
                        currentOutput.append(key);
                        currentOutput.append("=");
                        currentOutput.append((String) value);
                        theWrtr.println(currentOutput.toString());
                    }
                    else if(value instanceof Vector)
                    {
                        Vector values = (Vector) value;
                        Enumeration valuesEnum = values.elements();
                        while(valuesEnum.hasMoreElements())
                        {
                            String currentElement = 
                                   (String) valuesEnum.nextElement();
                            StringBuffer currentOutput = new StringBuffer();
                            currentOutput.append(key);
                            currentOutput.append("=");
                            currentOutput.append(currentElement);
                            theWrtr.println(currentOutput.toString());
                        }
                    }
                }    
                theWrtr.println();
                theWrtr.flush();
            }    
        }        
    }

    /**
     * Combines an existing Hashtable with this Hashtable.
     *
     * Warning: It will overwrite previous entries without warning.
     *
     * @param Configuration
     */
    public void combine (Configuration c)
    {
        for (Iterator i = c.getKeys() ; i.hasNext() ;)
        {
            String key = (String) i.next();
            //clearProperty(key);
            setProperty( key, c.get(key) );
        }
    }
    
    /**
     * Clear a property in the configuration.
     *
     * @param String key to remove along with corresponding value.
     */
    public void clearProperty(String key)
    {
        // $$$ GMJ : remove after 1.1 release
        // for deprecation help
        deprecationCrutch.clearProperty( key  );

        if (containsKey(key))
        {
            /*
             * we also need to rebuild the keysAsListed or else
             * things get *very* confusing
             */

            for(int i = 0; i < keysAsListed.size(); i++)
            {
                if ( ( (String) keysAsListed.get(i)).equals( key ) )
                {
                    keysAsListed.remove(i);
                    break;
                }
            }

            remove(key);
        }            
    }

    /**
     * Get the list of the keys contained in the configuration
     * repository.
     *
     * @return An Iterator.
     */
    public Iterator getKeys()
    {
        return keysAsListed.iterator();
    }

    /**
     * Get the list of the keys contained in the configuration
     * repository that match the specified prefix.
     *
     * @param prefix The prefix to test against.
     * @return An Iterator of keys that match the prefix.
     */
    public Iterator getKeys(String prefix)
    {
        Iterator keys = getKeys();
        ArrayList matchingKeys = new ArrayList();
        
        while( keys.hasNext() )
        {
            Object key = keys.next();
            
            if( key instanceof String && ((String) key).startsWith(prefix) )
            {
                matchingKeys.add(key);
            }
        }
        return matchingKeys.iterator();
    }

    /**
     * Create a Configurations object that is a subset
     * of this one. Take into account duplicate keys
     * by using the setProperty() in Configuration.
     *
     * @param String prefix
     */
    public Configuration subset(String prefix)
    {
        Configuration c = new Configuration();
        Iterator keys = getKeys();
        boolean validSubset = false;
        
        while( keys.hasNext() )
        {
            Object key = keys.next();
            
            if( key instanceof String && ((String) key).startsWith(prefix) )
            {
                if (!validSubset)
                {
                    validSubset = true;
                }
                
                String newKey = null;
                
                /*
                 * Check to make sure that c.subset(prefix) doesn't
                 * blow up when there is only a single property
                 * with the key prefix. This is not a useful
                 * subset but it is a valid subset.
                 */
                if ( ((String)key).length() == prefix.length())
                {
                    newKey = prefix;
                }
                else
                {
                    newKey = ((String)key).substring(prefix.length() + 1);
                }                    
                
                /*
                 * Make sure to use the setProperty() method and not
                 * just put(). setProperty() takes care of catching
                 * all the keys in the order they appear in a
                 * properties files or the order they are set
                 * dynamically.
                 */

                c.setProperty(newKey, get(key));
            }
        }
        
        if (validSubset)
        {
            return c;
        }
        else
        {
            return null;
        }
    }

    /**
     * Display the configuration for debugging
     * purposes.
     */
    public void display()
    {
        Iterator i = getKeys();
        
        while (i.hasNext())
        {
            String key = (String) i.next();
            Object value = get(key);
            System.out.println(key + " => " + value);
        }
    }     

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
99re视频精品| 国产清纯白嫩初高生在线观看91 | 99久久精品一区二区| 18涩涩午夜精品.www| 日本乱人伦aⅴ精品| 亚洲mv在线观看| 日韩欧美一区二区免费| 国产精品综合视频| 丁香网亚洲国际| 一区二区三区四区不卡在线| 欧美日韩亚洲综合在线| 久久9热精品视频| 国产精品入口麻豆九色| 欧美视频一二三区| 九一九一国产精品| 国产精品你懂的| 欧美日韩国产另类一区| 国内精品久久久久影院薰衣草| 国产精品女同一区二区三区| 欧美色窝79yyyycom| 精品中文字幕一区二区| 国产精品美女久久久久久| 欧美少妇bbb| 国产在线视频精品一区| 亚洲婷婷综合久久一本伊一区| 欧美日韩国产高清一区| 国产精品综合二区| 亚洲制服丝袜在线| 久久蜜桃av一区精品变态类天堂 | 日韩一区二区三区四区| 成人一区在线观看| 欧美日韩精品综合在线| 精品一区二区在线视频| **欧美大码日韩| 日韩视频国产视频| aaa国产一区| 老汉av免费一区二区三区| 中文字幕亚洲在| 欧美一区二区三区啪啪| 不卡视频在线看| 男女激情视频一区| 成人免费一区二区三区视频| 欧美一级一级性生活免费录像| 成人美女在线视频| 日本不卡一区二区三区高清视频| 欧美韩日一区二区三区四区| 欧美日韩国产综合一区二区| 国产91丝袜在线18| 日韩精品一区第一页| 国产精品福利影院| 日韩精品最新网址| 欧美综合欧美视频| 成人网页在线观看| 美女在线视频一区| 一区二区三区91| 国产女同性恋一区二区| 91精品国产麻豆国产自产在线| 99免费精品视频| 精品久久国产97色综合| 欧美视频你懂的| 成人少妇影院yyyy| 久久99久久久久久久久久久| 一级做a爱片久久| 国产婷婷色一区二区三区四区| 欧美男男青年gay1069videost | 亚洲一线二线三线视频| 国产欧美一区二区在线| 欧美一级爆毛片| 欧洲精品视频在线观看| 不卡的av中国片| 国产麻豆日韩欧美久久| 亚洲一区在线观看视频| 亚洲欧洲精品一区二区三区| 久久久久久久久岛国免费| 91精品中文字幕一区二区三区| 日本福利一区二区| 成人ar影院免费观看视频| 国产精品白丝av| 久久精品国产一区二区三| 午夜电影网亚洲视频| 一区二区三区四区在线免费观看 | 99精品视频中文字幕| 国产伦精品一区二区三区免费迷| 亚洲va国产天堂va久久en| 一区二区三区不卡在线观看| 国产精品久久久久久久久果冻传媒| 久久亚洲精华国产精华液| 欧美一级爆毛片| 欧美一区二区三区思思人| 欧美日韩精品是欧美日韩精品| 色综合天天性综合| 波多野结衣在线一区| 粉嫩绯色av一区二区在线观看| 国产一区二区三区精品欧美日韩一区二区三区| 日韩精品亚洲一区二区三区免费| 亚洲国产精品自拍| 亚洲国产欧美一区二区三区丁香婷| 亚洲女同女同女同女同女同69| 亚洲天堂2016| 亚洲精选在线视频| 亚洲综合丝袜美腿| 亚洲国产一二三| 亚洲成av人**亚洲成av**| 亚洲国产精品久久人人爱| 亚洲一区二区三区美女| 一二三区精品视频| 亚洲大型综合色站| 天使萌一区二区三区免费观看| 午夜亚洲福利老司机| 图片区小说区区亚洲影院| 在线成人小视频| 在线播放91灌醉迷j高跟美女 | 欧美亚洲动漫另类| 欧美性videosxxxxx| 欧美日韩国产精品成人| 欧美精品色综合| 91精品国产麻豆国产自产在线| 日韩欧美一卡二卡| 久久久久久久久久久黄色| 国产偷v国产偷v亚洲高清| 国产精品久久网站| 亚洲欧美激情一区二区| 亚洲午夜电影网| 日本欧美大码aⅴ在线播放| 美国精品在线观看| 国产成a人亚洲| proumb性欧美在线观看| 色天天综合色天天久久| 欧美日本在线视频| 精品国产乱码久久久久久影片| 国产视频一区在线播放| ...av二区三区久久精品| 亚洲国产精品自拍| 久久99久久99| 成人黄色软件下载| 欧美亚洲丝袜传媒另类| 日韩一区二区精品葵司在线| 26uuu另类欧美| 国产精品夫妻自拍| 午夜电影一区二区| 国产美女视频一区| 97精品电影院| 91精品国产福利| 久久精品视频一区二区三区| 亚洲欧洲美洲综合色网| 天堂午夜影视日韩欧美一区二区| 久久99热这里只有精品| av激情综合网| 亚洲不卡av一区二区三区| 美女视频黄 久久| av影院午夜一区| 欧美精品乱码久久久久久按摩 | 日本成人在线网站| 国产91丝袜在线播放九色| 欧美性一级生活| 精品国产三级电影在线观看| 中文字幕日韩av资源站| 日韩电影网1区2区| 成人国产精品免费观看动漫| 欧美日韩国产片| 国产亚洲欧美一区在线观看| 亚洲一区二区视频在线观看| 国产一区欧美一区| 欧美主播一区二区三区美女| www国产亚洲精品久久麻豆| 亚洲靠逼com| 国产真实乱偷精品视频免| 色婷婷国产精品| 久久一留热品黄| 亚洲国产日韩av| 国产91精品在线观看| 欧美精品少妇一区二区三区 | 国产亚洲综合性久久久影院| 亚洲一区二区三区四区中文字幕| 国模大尺度一区二区三区| 欧美午夜理伦三级在线观看| 久久人人爽人人爽| 亚洲6080在线| av亚洲精华国产精华精| 日韩午夜av一区| 一个色综合av| 成人黄色软件下载| 精品久久99ma| 亚欧色一区w666天堂| 成人av网址在线| 欧美videos中文字幕| 亚洲一卡二卡三卡四卡| 成人综合激情网| 精品久久久三级丝袜| 亚洲高清免费在线| 成人欧美一区二区三区| 精品一区二区三区在线视频| 欧美午夜不卡在线观看免费| 国产精品久线观看视频| 久久99国产精品免费网站| 欧美丝袜丝nylons| 中文字幕在线视频一区| 国产乱色国产精品免费视频| 91麻豆精品国产91久久久| 亚洲精品伦理在线|