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

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

?? configurationutils.java

?? java servlet著名論壇源代碼
?? JAVA
字號:
package net.myvietnam.mvncore.configuration;

/* ====================================================================
 * The Apache Software License, Version 1.1
 *
 * Copyright (c) 1999-2002 The Apache Software Foundation.  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 acknowledgement:
 *       "This product includes software developed by the
 *        Apache Software Foundation (http://www.apache.org/)."
 *    Alternately, this acknowledgement may appear in the software itself,
 *    if and wherever such third-party acknowledgements normally appear.
 *
 * 4. The names "The Jakarta Project", "Commons", and "Apache Software
 *    Foundation" must not be used to endorse or promote products derived
 *    from this software without prior written permission. For written
 *    permission, please contact apache@apache.org.
 *
 * 5. Products derived from this software may not be called "Apache"
 *    nor may "Apache" appear in their names without prior written
 *    permission of the Apache Software Foundation.
 *
 * 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 the Apache Software Foundation.  For more
 * information on the Apache Software Foundation, please see
 * <http://www.apache.org/>.
 */

import java.io.File;
import java.io.PrintStream;
import java.io.PrintWriter;
import java.io.StringWriter;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.Iterator;

import org.apache.commons.lang.StringUtils;

/**
 * Miscellaneous utility methods for configurations.
 *
 * @author <a href="mailto:herve.quiroz@esil.univ-mrs.fr">Herve Quiroz</a>
 * @author <a href="mailto:oliver.heger@t-online.de">Oliver Heger</a>
 */
public class ConfigurationUtils
{
    /** File separator. */
    protected static String fileSeparator = System.getProperty("file.separator");

    private ConfigurationUtils()
    {
        // to prevent instanciation...
    }

    /**
     * Dump the configuration key/value mappings to some ouput stream.
     *
     * @param configuration the configuration
     * @param out the output stream to dump the configuration to
     */
    public static void dump(Configuration configuration, PrintStream out)
    {
        for (Iterator i = configuration.getKeys(); i.hasNext(); )
        {
            String key = (String) i.next();
            Object value = configuration.getProperty(key);
            out.print(key);
            out.print("=");
            out.print(value);
            if (i.hasNext())
            {
                out.println();
            }
        }
    }

    /**
     * Dump the configuration key/value mappings to some writer.
     *
     * @param configuration the configuration
     * @param out the writer to dump the configuration to
     */
    public static void dump(Configuration configuration, PrintWriter out)
    {
        for (Iterator i = configuration.getKeys(); i.hasNext();)
        {
            String key = (String) i.next();
            Object value = configuration.getProperty(key);
            out.print(key);
            out.print("=");
            out.print(value);

            if (i.hasNext())
            {
                out.println();
            }
        }
    }

    /**
     * Get a string representation of the key/value mappings of a
     * configuration.
     *
     * @param configuration the configuration
     * @return a string representation of the configuration
     */
    public static String toString(Configuration configuration)
    {
        StringWriter writer = new StringWriter();
        dump(configuration, new PrintWriter(writer));
        return writer.toString();
    }

    /**
     * Constructs a URL from a base path and a file name. The file name can
     * be absolute, relative or a full URL. If necessary the base path URL is
     * applied.
     * @param basePath the base path URL (can be <b>null</b>)
     * @param file the file name
     * @return the resulting URL
     * @throws MalformedURLException if URLs are invalid
     */
    public static URL getURL(String basePath, String file)
    throws MalformedURLException
    {
        File f = new File(file);
        if(f.isAbsolute())                          // already absolute?
        {
            return f.toURL();
        }  /* if */

        try
        {
            if(basePath == null)
            {
                return new URL(file);
            }  /* if */
            else
            {
                URL base = new URL(basePath);
                return new URL(base, file);
            }  /* else */
        }  /* try */
        catch(MalformedURLException uex)
        {
            return constructFile(basePath, file).toURL();
        }  /* catch */
    }

    /**
     * Helper method for constructing a file object from a base path and a
     * file name. This method is called if the base path passed to
     * <code>getURL()</code> does not seem to be a valid URL.
     * @param basePath the base path
     * @param fileName the file name
     * @return the resulting file
     */
    static File constructFile(String basePath, String fileName)
    {
        // code from DOM4JConfiguration
        File file = null;
        if (StringUtils.isEmpty(basePath))
        {
            // Good luck... This will fail 99 out of 100 times.
            file = new File(fileName);
        }
        else
        {
            StringBuffer fName = new StringBuffer();
            fName.append(basePath);

            // My best friend. Paranoia.
            if (!basePath.endsWith(fileSeparator))
            {
                fName.append(fileSeparator);
            }

            //
            // 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 (fileName.startsWith("." + fileSeparator))
            {
                fName.append(fileName.substring(2));
            }
            else
            {
                fName.append(fileName);
            }

            file = new File(fName.toString());
        }
        return file;
    }
}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
蜜桃视频在线观看一区| 成人手机电影网| 中文字幕视频一区| 欧美成人一区二区三区| 色婷婷久久一区二区三区麻豆| 免费视频最近日韩| 一区二区不卡在线视频 午夜欧美不卡在| 欧美一区二区三区色| 99久久精品国产一区二区三区| 久久 天天综合| 亚洲成人一区二区在线观看| 欧美国产激情一区二区三区蜜月| 欧美一区二区免费视频| 色综合天天综合在线视频| 国产盗摄精品一区二区三区在线 | 欧美日韩视频在线一区二区| 国产精品一区不卡| 免费欧美高清视频| 爽好多水快深点欧美视频| 成人欧美一区二区三区黑人麻豆| 久久综合久久久久88| 欧美久久一二三四区| 91福利小视频| 91美女视频网站| 成人黄色在线网站| 岛国一区二区三区| 国产成人三级在线观看| 国产一区二区福利视频| 另类人妖一区二区av| 三级欧美在线一区| 婷婷久久综合九色国产成人| 一区二区三区四区不卡视频| 亚洲视频精选在线| 综合久久综合久久| 自拍av一区二区三区| 中文字幕在线播放不卡一区| 国产精品毛片无遮挡高清| 欧美激情在线一区二区| 国产人成一区二区三区影院| 国产人成亚洲第一网站在线播放| 久久久精品蜜桃| 久久久久国产免费免费| 久久久午夜精品| 日本一区二区免费在线观看视频| 国产无一区二区| 久久久av毛片精品| 中文字幕免费不卡在线| 成人欧美一区二区三区小说| 亚洲美女屁股眼交3| 亚洲成人激情自拍| 麻豆一区二区三| 国产精品一区二区x88av| 成人一区二区视频| 一本色道久久综合精品竹菊| 欧美性色黄大片| 欧美一区二区三区在线| 久久久不卡影院| 一区在线观看视频| 亚洲成人免费观看| 日本aⅴ免费视频一区二区三区| 精品一区二区免费看| 成人中文字幕合集| 欧美色成人综合| 精品国产一二三| 国产精品免费视频网站| 亚洲国产你懂的| 偷拍自拍另类欧美| 国产精品自拍在线| 91丨porny丨户外露出| 欧美人与禽zozo性伦| 精品福利二区三区| 亚洲人成电影网站色mp4| 亚洲国产美女搞黄色| 国内精品免费**视频| av在线不卡免费看| 成人网在线免费视频| 欧美日韩午夜精品| 综合婷婷亚洲小说| 国产亚洲综合性久久久影院| 亚洲人成小说网站色在线| 亚洲成av人片一区二区梦乃 | 秋霞电影网一区二区| 国产乱子伦视频一区二区三区 | 91色porny蝌蚪| 欧美精品久久久久久久久老牛影院 | 免费人成在线不卡| 成人av一区二区三区| 欧美色男人天堂| 国产女人18毛片水真多成人如厕| 亚洲国产精品自拍| 国产高清不卡一区| 91精品在线一区二区| 国产精品初高中害羞小美女文 | 色综合久久综合中文综合网| 日韩一区二区精品葵司在线| 亚洲婷婷在线视频| 91蜜桃在线观看| 日韩一区二区精品在线观看| 日韩天堂在线观看| 91成人免费在线视频| 欧美性三三影院| 欧美国产日韩在线观看| 日本免费在线视频不卡一不卡二 | 麻豆精品新av中文字幕| 色综合色综合色综合| 久久久国产午夜精品| 日本色综合中文字幕| 欧洲一区在线电影| 一区二区中文视频| 国产精品1024| 精品国产精品一区二区夜夜嗨| 亚洲在线视频网站| 白白色亚洲国产精品| 国产午夜精品一区二区三区视频 | 国产一区免费电影| 欧美高清性hdvideosex| 一区二区三区四区蜜桃| 日韩精品中午字幕| 成人蜜臀av电影| 国产精品国产三级国产| 亚洲成人激情自拍| 91丨porny丨国产| 欧美高清在线一区二区| 国产凹凸在线观看一区二区| 欧美性视频一区二区三区| 中文字幕在线观看一区| 激情都市一区二区| 7777精品伊人久久久大香线蕉完整版 | 一区二区三区在线视频观看58| 99久久综合狠狠综合久久| 欧美激情一区二区三区在线| 国产伦精一区二区三区| 久久久久久日产精品| 久久av资源站| 2023国产精品视频| 国产精品一二三四五| 久久先锋影音av鲁色资源网| 国产最新精品精品你懂的| 精品国精品国产| 国产精品12区| 国产精品国产三级国产普通话蜜臀| 欧美日韩一区不卡| 色呦呦一区二区三区| 国产激情精品久久久第一区二区 | 日韩视频国产视频| 国产片一区二区三区| 国产一区福利在线| 久久噜噜亚洲综合| 国产成人在线免费| 国产精品乱码一区二区三区软件 | 色婷婷综合久久久中文一区二区 | 国产欧美日韩综合精品一区二区| 国产aⅴ精品一区二区三区色成熟| 亚洲免费视频中文字幕| 久久美女艺术照精彩视频福利播放| 97久久精品人人爽人人爽蜜臀| av色综合久久天堂av综合| 亚洲自拍偷拍av| 一区二区免费视频| 中文字幕一区二区三区在线观看| 欧美一二三在线| 在线日韩国产精品| 欧美主播一区二区三区美女| 韩国三级在线一区| 日韩成人伦理电影在线观看| 亚洲精品videosex极品| 国产精品盗摄一区二区三区| 欧美国产精品一区| 国产日本亚洲高清| 欧美一级日韩一级| 欧美日韩视频在线一区二区| 在线免费亚洲电影| 福利一区二区在线| 国产福利精品导航| 亚洲制服丝袜av| 国产精品久久久久aaaa樱花 | 国产一区二区网址| 亚洲最大色网站| 亚洲地区一二三色| ●精品国产综合乱码久久久久| 亚洲一区二区三区视频在线| 色久综合一二码| 性做久久久久久久久| 国产91露脸合集magnet| 久久久久久日产精品| 成人av影院在线| 五月婷婷欧美视频| 国产精品初高中害羞小美女文| 国产精品全国免费观看高清| 伊人夜夜躁av伊人久久| 亚洲理论在线观看| 亚洲乱码国产乱码精品精的特点 | 久久久久久免费网| 波多野结衣一区二区三区| 日本伊人色综合网| 国产精品国产三级国产aⅴ无密码| 精品污污网站免费看| 成人av资源下载| 日本成人在线不卡视频| 亚洲另类在线视频|