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

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

?? configuration.java

?? velocity 的腳本語言的全部代碼集合
?? JAVA
?? 第 1 頁 / 共 4 頁
字號:
package org.apache.velocity.runtime.configuration;

/*
 * Copyright (c) 2001 The Java Apache Project.  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. All advertising materials mentioning features or use of this
 *    software must display the following acknowledgment:
 *    "This product includes software developed by the Java Apache
 *    Project for use in the Apache JServ servlet engine project
 *    <http://java.apache.org/>."
 *
 * 4. The names "Apache JServ", "Apache JServ Servlet Engine", "Turbine",
 *    "Apache Turbine", "Turbine Project", "Apache Turbine Project" and
 *    "Java Apache Project" must not be used to endorse or promote products
 *    derived from this software without prior written permission.
 *
 * 5. Products derived from this software may not be called "Apache JServ"
 *    nor may "Apache" nor "Apache JServ" appear in their names without
 *    prior written permission of the Java Apache Project.
 *
 * 6. Redistributions of any form whatsoever must retain the following
 *    acknowledgment:
 *    "This product includes software developed by the Java Apache
 *    Project for use in the Apache JServ servlet engine project
 *    <http://java.apache.org/>."
 *
 * THIS SOFTWARE IS PROVIDED BY THE JAVA APACHE PROJECT "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 JAVA APACHE PROJECT 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 the Java Apache Group. For more information
 * on the Java Apache Project and the Apache JServ Servlet Engine project,
 * please see <http://java.apache.org/>.
 *
 */

import java.io.IOException;
import java.io.File;
import java.io.FileInputStream;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.LineNumberReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.Reader;

import java.util.ArrayList;
import java.util.Enumeration;
import java.util.Hashtable;
import java.util.Iterator;
import java.util.NoSuchElementException;
import java.util.Properties;
import java.util.StringTokenizer;
import java.util.Vector;

import org.apache.commons.collections.ExtendedProperties;

/**
 * This class extends normal Java properties by adding the possibility
 * to use the same key many times concatenating the value strings
 * instead of overwriting them.
 *
 * <p>The Extended Properties syntax is explained here:
 *
 * <ul>
 *  <li>
 *   Each property has the syntax <code>key = value</code>
 *  </li>
 *  <li>
 *   The <i>key</i> may use any character but the equal sign '='.
 *  </li>
 *  <li>
 *   <i>value</i> may be separated on different lines if a backslash
 *   is placed at the end of the line that continues below.
 *  </li>
 *  <li>
 *   If <i>value</i> is a list of strings, each token is separated
 *   by a comma ','.
 *  </li>
 *  <li>
 *   Commas in each token are escaped placing a backslash right before
 *   the comma.
 *  </li>
 *  <li>
 *   If a <i>key</i> is used more than once, the values are appended
 *   like if they were on the same line separated with commas.
 *  </li>
 *  <li>
 *   Blank lines and lines starting with character '#' are skipped.
 *  </li>
 *  <li>
 *   If a property is named "include" (or whatever is defined by
 *   setInclude() and getInclude() and the value of that property is
 *   the full path to a file on disk, that file will be included into
 *   the ConfigurationsRepository. You can also pull in files relative
 *   to the parent configuration file. So if you have something
 *   like the following:
 *
 *   include = additional.properties
 *
 *   Then "additional.properties" is expected to be in the same
 *   directory as the parent configuration file.
 * 
 *   Duplicate name values will be replaced, so be careful.
 *
 *  </li>
 * </ul>
 *
 * <p>Here is an example of a valid extended properties file:
 *
 * <p><pre>
 *      # lines starting with # are comments
 *
 *      # This is the simplest property
 *      key = value
 *
 *      # A long property may be separated on multiple lines
 *      longvalue = aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa \
 *                  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 *
 *      # This is a property with many tokens
 *      tokens_on_a_line = first token, second token
 *
 *      # This sequence generates exactly the same result
 *      tokens_on_multiple_lines = first token
 *      tokens_on_multiple_lines = second token
 *
 *      # commas may be escaped in tokens
 *      commas.excaped = Hi\, what'up?
 * </pre>
 *
 * <p><b>NOTE</b>: this class has <b>not</b> been written for
 * performance nor low memory usage.  In fact, it's way slower than it
 * could be and generates too much memory garbage.  But since
 * performance is not an issue during intialization (and there is not
 * much time to improve it), I wrote it this way.  If you don't like
 * it, go ahead and tune it up!
 *
 *
 * @author <a href="mailto:stefano@apache.org">Stefano Mazzocchi</a>
 * @author <a href="mailto:jon@latchkey.com">Jon S. Stevens</a>
 * @author <a href="mailto:daveb@miceda-data">Dave Bryson</a>
 * @author <a href="mailto:jvanzyl@apache.org">Jason van Zyl</a>
 * @author <a href="mailto:geirm@optonline.net">Geir Magnusson Jr.</a>
 * @author <a href="mailto:leon@opticode.co.za">Leon Messerschmidt</a>
 * @author <a href="mailto:kjohnson@transparent.com>Kent Johnson</a>
 * @version $Id: Configuration.java,v 1.34 2003/05/04 17:14:37 geirm Exp $
 *
 * @deprecated As of version 1.1, please use ExtendedProperties from
 * the Jakarta Commons Collections component.
 */
public class Configuration extends Hashtable
{
    // $$$ GMJ : remove post version 1.1
    // intended to help deprecate this class w/o having to modify 
    // the jakarta commons collections class which contains
    // extended properties.  We need this when someone wants to 
    // configure velocity w/ a Configuration : the strategy is simply
    // to shadow the Configuration with the EP
    private ExtendedProperties deprecationCrutch = new ExtendedProperties();


    /**
     * Default configurations repository.
     */
    private Configuration defaults;

    /**
     * The file connected to this repository (holding comments and
     * such).
     *
     * @serial
     */
    protected String file;

    /**
     * Base path of the configuration file used to create
     * this Configuration object.
     */
    protected String basePath;

    /**
     * File separator.
     */
    protected String fileSeparator = System.getProperty("file.separator");

    /**
     * Has this configuration been intialized.
     */
    protected boolean isInitialized = false;

    /**
     * This is the name of the property that can point to other
     * properties file for including other properties files.
     */
    protected static String include = "include";

    /**
     * These are the keys in the order they listed
     * in the configuration file. This is useful when
     * you wish to perform operations with configuration
     * information in a particular order.
     */
    protected ArrayList keysAsListed = new ArrayList();

    /**
     * This class is used to read properties lines.  These lines do
     * not terminate with new-line chars but rather when there is no
     * backslash sign a the end of the line.  This is used to
     * concatenate multiple lines for readability.
     */
    class PropertiesReader extends LineNumberReader
    {
        /**
         * Constructor.
         *
         * @param reader A Reader.
         */
        public PropertiesReader(Reader reader)
        {
            super(reader);
        }

        /**
         * Read a property.
         *
         * @return A String.
         * @exception IOException.
         */
        public String readProperty() throws IOException
        {
            StringBuffer buffer = new StringBuffer();

            try
            {
                while (true)
                {
                    String line = readLine().trim();
                    if ((line.length() != 0) && (line.charAt(0) != '#'))
                    {
                        if (line.endsWith("\\"))
                        {
                            line = line.substring(0, line.length() - 1);
                            buffer.append(line);
                        }
                        else
                        {
                            buffer.append(line);
                            break;
                        }
                    }
                }
            }
            catch (NullPointerException e)
            {
                return null;
            }

            return buffer.toString();
        }
    }

    /**
     * This class divides into tokens a property value.  Token
     * separator is "," but commas into the property value are escaped
     * using the backslash in front.
     */
    class PropertiesTokenizer extends StringTokenizer
    {
        /**
         * The property delimiter used while parsing (a comma).
         */
        static final String DELIMITER = ",";

        /**
         * Constructor.
         *
         * @param string A String.
         */
        public PropertiesTokenizer(String string)
        {
            super(string, DELIMITER);
        }

        /**
         * Check whether the object has more tokens.
         *
         * @return True if the object has more tokens.
         */
        public boolean hasMoreTokens()
        {
            return super.hasMoreTokens();
        }

        /**
         * Get next token.
         *
         * @return A String.
         */
        public String nextToken()
        {
            StringBuffer buffer = new StringBuffer();

            while (hasMoreTokens())
            {
                String token = super.nextToken();
                if (token.endsWith("\\"))
                {
                    buffer.append(token.substring(0, token.length() - 1));
                    buffer.append(DELIMITER);
                }
                else
                {
                    buffer.append(token);
                    break;
                }
            }

            return buffer.toString().trim();
        }
    }

    /**
     * Creates an empty extended properties object.
     */
    public Configuration ()
    {
        super();
    }

    /**
     * Creates and loads the extended properties from the specified
     * file.
     *
     * @param file A String.
     * @exception IOException.
     */
    public Configuration (String file) throws IOException
    {
        this(file,null);
    }

    /**
     * Creates and loads the extended properties from the specified
     * file.
     *
     * @param file A String.
     * @exception IOException.
     */
    public Configuration (String file, String defaultFile)
        throws IOException
    {
        this.file = file;
        
        basePath = new File(file).getAbsolutePath();
        basePath = basePath.substring(0, basePath.lastIndexOf(fileSeparator) + 1);
        
        this.load(new FileInputStream(file));
        
        if (defaultFile != null)
        {
            defaults = new Configuration(defaultFile);
        }            
    }

    /**
     * Private initializer method that sets up the generic
     * resources.
     *
     * @exception IOException, if there was an I/O problem.
     */
    private void init( Configuration exp ) throws IOException
    {
        isInitialized = true;
    }
    
    /**
     * Indicate to client code whether property
     * resources have been initialized or not.
     */
    public boolean isInitialized()
    {
        return isInitialized;
    }        

    /**
     * Gets the property value for including other properties files.
     * By default it is "include".
     *
     * @return A String.
     */
    public String getInclude()
    {
        return Configuration.include;
    }

    /**
     * Sets the property value for including other properties files.
     * By default it is "include".
     *
     * @param inc A String.
     */
    public void setInclude(String inc)
    {
		Configuration.include = inc;
    }

    /**
     * Load the properties from the given input stream.
     *
     * @param input An InputStream.
     * @exception IOException.
     */
    public synchronized void load(InputStream input)
        throws IOException
    {
        PropertiesReader reader =
            new PropertiesReader(new InputStreamReader(input));

        try
        {
            while (true)
            {
                String line = reader.readProperty();
                int equalSign = line.indexOf('=');

                if (equalSign > 0)
                {
                    String key = line.substring(0, equalSign).trim();
                    String value = line.substring(equalSign + 1).trim();

                    /*
                     * Configure produces lines like this ... just
                     * ignore them.
                     */
                    if ("".equals(value))
                        continue;

                    if (getInclude() != null && 
                        key.equalsIgnoreCase(getInclude()))
                    {
                        /*
                         * Recursively load properties files.
                         */
                        File file = null;
                        
                        if (value.startsWith(fileSeparator))
                        {
                            /*
                             * We have an absolute path so we'll

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
2023国产精品| 99久久精品国产毛片| 91精品国产丝袜白色高跟鞋| 亚洲国产精品天堂| 8x福利精品第一导航| 免费一级片91| 久久久国产一区二区三区四区小说 | 日本网站在线观看一区二区三区| 777欧美精品| 久久av资源网| 中文成人综合网| 色综合色狠狠综合色| 性久久久久久久久久久久| 91精品国产色综合久久久蜜香臀| 麻豆国产精品官网| 国产精品水嫩水嫩| 欧美性生活久久| 久久国产精品第一页| 中文字幕久久午夜不卡| 欧洲精品一区二区| 极品少妇一区二区| 亚洲美女免费在线| 日韩免费看的电影| 97精品国产露脸对白| 日日骚欧美日韩| 欧美国产日韩a欧美在线观看| 一本一本大道香蕉久在线精品| 香港成人在线视频| 国产农村妇女毛片精品久久麻豆| 97精品国产97久久久久久久久久久久| 五月婷婷综合网| 中文字幕电影一区| 555夜色666亚洲国产免| 成熟亚洲日本毛茸茸凸凹| 亚洲777理论| 中文字幕久久午夜不卡| 7777精品伊人久久久大香线蕉超级流畅| 激情小说欧美图片| 亚洲一区二区三区激情| 国产亚洲综合色| 7777精品伊人久久久大香线蕉经典版下载 | 精品sm捆绑视频| 91久久精品一区二区二区| 狠狠色2019综合网| 亚欧色一区w666天堂| 国产精品国产三级国产aⅴ无密码 国产精品国产三级国产aⅴ原创 | av高清不卡在线| 久久超碰97中文字幕| 亚洲最新视频在线观看| 国产女人aaa级久久久级| 日韩一区二区三区精品视频| 91女厕偷拍女厕偷拍高清| 国产制服丝袜一区| 免费久久精品视频| 五月天丁香久久| 亚洲男帅同性gay1069| 国产午夜亚洲精品午夜鲁丝片| 91.麻豆视频| 91福利国产精品| 99久久亚洲一区二区三区青草| 久久丁香综合五月国产三级网站| 亚洲成人激情自拍| 夜夜揉揉日日人人青青一国产精品| 欧美国产欧美亚州国产日韩mv天天看完整| 欧美一级二级在线观看| 欧美日韩一区二区三区四区五区 | 一片黄亚洲嫩模| 中文字幕一区二区三区四区不卡| 国产人妖乱国产精品人妖| 亚洲三级电影全部在线观看高清| 久久综合九色综合久久久精品综合| 欧美精品乱码久久久久久| 欧美三级电影在线观看| 色www精品视频在线观看| 91麻豆国产福利精品| 成人午夜精品一区二区三区| 粉嫩av一区二区三区| 成人精品国产福利| 大白屁股一区二区视频| 精品综合免费视频观看| 精品制服美女丁香| 国产精品 日产精品 欧美精品| 九九国产精品视频| 国产91精品露脸国语对白| 成人黄色电影在线| 91蜜桃免费观看视频| 欧美在线观看视频一区二区三区| 欧美性生活大片视频| 3d成人h动漫网站入口| 欧美一区二区三级| 久久精品一区四区| 中文字幕亚洲电影| 一区二区三区电影在线播| 香蕉久久一区二区不卡无毒影院 | 不卡视频在线看| 91免费视频观看| 欧美久久久久久蜜桃| 日韩欧美激情四射| 中文字幕成人网| 亚洲综合免费观看高清完整版在线 | www国产亚洲精品久久麻豆| 久久精品视频网| 最新不卡av在线| 日本亚洲电影天堂| 国产精品66部| 欧美视频在线一区| 精品国产乱码久久久久久图片 | 成人黄色电影在线| 欧美日韩不卡视频| 久久久精品国产免费观看同学| 亚洲人吸女人奶水| 婷婷六月综合网| 国产精品一区二区91| 91啪在线观看| 26uuu色噜噜精品一区| 日本va欧美va精品发布| 国产suv一区二区三区88区| 在线免费不卡视频| 337p粉嫩大胆色噜噜噜噜亚洲| 中文字幕一区二区三区在线观看 | 日韩电影在线免费| 成人深夜福利app| 欧美二区三区91| 国产精品麻豆视频| 青青草国产成人av片免费| 成人成人成人在线视频| 91麻豆精品国产91久久久更新时间| 国产日韩欧美精品综合| 婷婷一区二区三区| 91在线免费看| 久久嫩草精品久久久久| 性感美女极品91精品| 99久久精品99国产精品| 精品国产一区二区精华| 亚洲国产aⅴ天堂久久| av不卡一区二区三区| 久久久蜜桃精品| 青青草国产成人av片免费| 色美美综合视频| 国产免费久久精品| 久久精品国产77777蜜臀| 在线视频欧美区| ㊣最新国产の精品bt伙计久久| 狠狠色狠狠色综合日日91app| 欧美亚洲一区三区| 亚洲欧美日韩中文字幕一区二区三区 | 日韩精品一区二区三区在线播放| 亚洲最大成人网4388xx| av网站免费线看精品| 国产农村妇女毛片精品久久麻豆 | 国产精品蜜臀在线观看| 国产乱人伦偷精品视频免下载| 欧美美女bb生活片| 亚洲国产美女搞黄色| 91色综合久久久久婷婷| 国产精品女人毛片| 成人福利视频在线| 国产精品久久久久久久久久久免费看| 国产在线一区二区综合免费视频| 日韩精品一区二区三区在线播放| 色婷婷久久一区二区三区麻豆| 国产欧美一区二区精品性色超碰 | 国产精品九色蝌蚪自拍| 成人激情图片网| 中文字幕av免费专区久久| 国产精品99久久久久久宅男| 日韩一区二区高清| 日本美女一区二区| 欧美大片一区二区三区| 久久爱www久久做| 精品国产免费视频| 精彩视频一区二区| 久久这里只精品最新地址| 国产精品911| 中文字幕电影一区| 色综合久久九月婷婷色综合| 亚洲人吸女人奶水| 欧美三级日韩三级| 日韩激情视频在线观看| 日韩女同互慰一区二区| 国产真实乱子伦精品视频| 国产欧美日韩在线观看| 北条麻妃国产九九精品视频| 亚洲乱码中文字幕综合| 欧美性xxxxx极品少妇| 日日摸夜夜添夜夜添国产精品| 欧美一区二区三区日韩视频| 激情综合亚洲精品| 国产精品乱人伦| 欧美三区免费完整视频在线观看| 日韩不卡手机在线v区| 精品国产电影一区二区| 北岛玲一区二区三区四区| 亚洲综合一区二区三区| 日韩精品一区二区三区中文精品| 国产美女主播视频一区| 亚洲欧美国产毛片在线| 9191精品国产综合久久久久久| 精品一区二区av| 亚洲欧美国产毛片在线|