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

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

?? config.java

?? oscache-2.4.1-full
?? JAVA
字號:
/*
 * Copyright (c) 2002-2007 by OpenSymphony
 * All rights reserved.
 */
package com.opensymphony.oscache.base;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import java.io.IOException;
import java.io.InputStream;
import java.net.URL;

import java.util.Properties;

/**
 * Responsible for holding the Cache configuration properties. If the default
 * constructor is used, this class will load the properties from the
 * <code>cache.configuration</code>.
 *
 * @author   <a href="mailto:fabian.crabus@gurulogic.de">Fabian Crabus</a>
 * @version  $Revision: 412 $
 */
public class Config implements java.io.Serializable {
    
    private static final transient Log log = LogFactory.getLog(Config.class);

    /**
     * Name of the properties file.
     */
    private final static String PROPERTIES_FILENAME = "/oscache.properties";

    /**
     * Properties map to hold the cache configuration.
     */
    private Properties properties = null;

    /**
     * Create an OSCache Config that loads properties from oscache.properties.
     * The file must be present in the root of OSCache's classpath. If the file
     * cannot be loaded, an error will be logged and the configuration will
     * remain empty.
     */
    public Config() {
        this(null);
    }

    /**
     * Create an OSCache configuration with the specified properties.
     * Note that it is the responsibility of the caller to provide valid
     * properties as no error checking is done to ensure that required
     * keys are present. If you're unsure of what keys should be present,
     * have a look at a sample oscache.properties file.
     *
     * @param p The properties to use for this configuration. If null,
     * then the default properties are loaded from the <code>oscache.properties</code>
     * file.
     */
    public Config(Properties p) {
        if (log.isDebugEnabled()) {
            log.debug("OSCache: Config called");
        }

        if (p == null) {
            this.properties = loadProperties(PROPERTIES_FILENAME, "the default configuration");
        } else {
            this.properties = p;
        }
    }

    /**
     * Retrieve the value of the named configuration property. If the property
     * cannot be found this method will return <code>null</code>.
     *
     * @param key The name of the property.
     * @return The property value, or <code>null</code> if the value could
     * not be found.
     *
     * @throws IllegalArgumentException if the supplied key is null.
     */
    public String getProperty(String key) {
        if (key == null) {
            throw new IllegalArgumentException("key is null");
        }

        if (properties == null) {
            return null;
        }

        return properties.getProperty(key);
    }

    /**
     * Retrieves all of the configuration properties. This property set
     * should be treated as immutable.
     *
     * @return The configuration properties.
     */
    public Properties getProperties() {
        return properties;
    }

    public Object get(Object key) {
        return properties.get(key);
    }

    /**
     * Sets a configuration property.
     *
     * @param key   The unique name for this property.
     * @param value The value assigned to this property.
     *
     * @throws IllegalArgumentException if the supplied key is null.
     */
    public void set(Object key, Object value) {
        if (key == null) {
            throw new IllegalArgumentException("key is null");
        }

        if (value == null) {
            return;
        }

        if (properties == null) {
            properties = new Properties();
        }

        properties.put(key, value);
    }
    
    /**
     * Load the properties from the specified URL.
     * @param url a non null value of the URL to the properties
     * @param info additional logger information if the properties can't be read
     * @return the loaded properties specified by the URL
     * @since 2.4
     */
    public static Properties loadProperties(URL url, String info) {
        log.info("OSCache: Getting properties from URL " + url + " for " + info);

        Properties properties = new Properties();
        InputStream in = null;

        try {
            in = url.openStream();
            properties.load(in);
            log.info("OSCache: Properties read " + properties);
        } catch (Exception e) {
            log.error("OSCache: Error reading from " + url, e);
            log.error("OSCache: Ensure the properties information in " + url+ " is readable and in your classpath.");
        } finally {
            try {
                in.close();
            } catch (IOException e) {
                log.warn("OSCache: IOException while closing InputStream: " + e.getMessage());
            }
        }
        
        return properties;
    }

    /**
     * Load the specified properties file from the classpath. If the file
     * cannot be found or loaded, an error will be logged and no
     * properties will be set.
     * @param filename the properties file with path
     * @param info additional logger information if file can't be read
     * @return the loaded properties specified by the filename
     * @since 2.4
     */
    public static Properties loadProperties(String filename, String info) {
        URL url = null;
        
        ClassLoader threadContextClassLoader = Thread.currentThread().getContextClassLoader();
        if (threadContextClassLoader != null) {
            url = threadContextClassLoader.getResource(filename);
        }
        if (url == null) {
            url = Config.class.getResource(filename);
            if (url == null) {
                log.warn("OSCache: No properties file found in the classpath by filename " + filename);
                return new Properties();
            }
        }
        
        return loadProperties(url, info);
    }

}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
成人美女视频在线观看| 五月天网站亚洲| 国产在线播放一区| 亚洲精品国产精品乱码不99 | 国产欧美一二三区| 国产精品美女久久久久久久久久久| 亚洲电影一区二区三区| 欧美日韩在线综合| 亚洲二区在线观看| 国产欧美日韩综合| 日韩美女啊v在线免费观看| 一区二区三区精品视频| 国产一区二区三区蝌蚪| 久久男人中文字幕资源站| 成人激情午夜影院| 欧美精品一区二区高清在线观看| 久久久久久久综合| 精品国产欧美一区二区| 精品国产三级电影在线观看| 国产日韩精品一区二区三区在线| 日韩精品亚洲专区| 日韩免费观看高清完整版在线观看| 麻豆成人av在线| 日本久久电影网| 久久精品国产一区二区三区免费看| 久久久久久久久99精品| 欧美浪妇xxxx高跟鞋交| 韩日av一区二区| 亚洲精品国产一区二区精华液 | 99视频在线观看一区三区| 欧美日韩国产高清一区二区| 亚洲欧美日韩中文字幕一区二区三区| 国内精品国产三级国产a久久 | 在线免费精品视频| 亚洲精品视频在线| 日本高清成人免费播放| 成人免费在线播放视频| 99久久婷婷国产综合精品电影| 国产精品女同一区二区三区| 懂色av中文一区二区三区| 国产夜色精品一区二区av| 国内精品伊人久久久久av影院| 91精品国产高清一区二区三区| 丝袜亚洲另类欧美综合| 欧美一区二区三区四区高清| 奇米色一区二区| 欧美成人免费网站| 国产一区二区三区久久久| 国产午夜精品美女毛片视频| 国产 日韩 欧美大片| 国产精品久久久久桃色tv| 91在线观看视频| 亚洲国产成人高清精品| 日韩精品一区二区三区视频在线观看 | 99r国产精品| 久久亚洲欧美国产精品乐播 | 99久久久久久| 国产99久久久精品| 99久久国产综合精品女不卡| 欧美中文字幕一区二区三区| 欧美视频精品在线| 亚洲精品久久久蜜桃| 在线免费不卡视频| 午夜精品久久久久久久久久| 欧美一区二区高清| 国产成人综合精品三级| 亚洲日本丝袜连裤袜办公室| 在线电影一区二区三区| 经典三级一区二区| 99国产精品视频免费观看| 欧美日韩国产影片| 国产欧美精品一区| 久久精品国产免费看久久精品| 国产99久久久国产精品潘金网站| 欧美精品乱码久久久久久按摩| 欧美变态tickle挠乳网站| 一区二区视频在线看| 国产曰批免费观看久久久| 欧美日韩在线精品一区二区三区激情| 337p粉嫩大胆色噜噜噜噜亚洲| 亚洲一级不卡视频| av电影天堂一区二区在线观看| 亚洲精品在线一区二区| 日韩电影一区二区三区| 久久久亚洲欧洲日产国码αv| 综合激情网...| 7777精品伊人久久久大香线蕉完整版| 久久久久久久一区| 青娱乐精品视频在线| 91污在线观看| 成人激情图片网| 欧美一区2区视频在线观看| 亚洲一区二区三区四区在线免费观看 | 国产成人av一区二区三区在线| 黄一区二区三区| 777久久久精品| 91久久精品日日躁夜夜躁欧美| 久草精品在线观看| 五月天久久比比资源色| 亚洲视频一区在线| 欧美国产日韩亚洲一区| 日韩精品一区二区在线观看| 久久久综合九色合综国产精品| 欧美日韩国产影片| 色视频一区二区| 91天堂素人约啪| 99re热这里只有精品免费视频| 国产精品1024久久| 国产一区二区福利| 黑人精品欧美一区二区蜜桃 | 欧美卡1卡2卡| 欧美色倩网站大全免费| 亚洲精品免费一二三区| 综合色中文字幕| 国产精品福利一区| 日精品一区二区三区| 亚洲色图欧美激情| 国产精品久久久久影院老司| 国产精品卡一卡二| 亚洲色图视频免费播放| 亚洲精品免费在线观看| 亚洲自拍偷拍网站| 亚洲成av人**亚洲成av**| 亚洲动漫第一页| 日本vs亚洲vs韩国一区三区 | 99视频一区二区| 色www精品视频在线观看| 欧美性视频一区二区三区| 欧美日韩一级二级| 91精品国产综合久久香蕉麻豆| 欧美日韩专区在线| 欧美一级生活片| 精品99999| 亚洲天堂精品视频| 亚洲国产日日夜夜| 青青草国产精品97视觉盛宴| 蜜桃av噜噜一区二区三区小说| 久久99精品视频| 成人美女视频在线观看| 在线亚洲欧美专区二区| 欧美美女一区二区| 首页欧美精品中文字幕| 日本aⅴ精品一区二区三区| 麻豆成人在线观看| 在线观看成人小视频| 欧美日韩一区在线观看| 91精品国产91久久久久久一区二区| 日本高清不卡aⅴ免费网站| 91视频免费观看| 欧美日韩日日摸| 欧美成人伊人久久综合网| 久久麻豆一区二区| 中文字幕在线观看不卡视频| 亚洲精品视频一区二区| 免费观看成人鲁鲁鲁鲁鲁视频| 亚洲综合图片区| 精品一区二区影视| 91亚洲精品一区二区乱码| 欧美一区二区网站| 亚洲欧洲成人精品av97| 美女性感视频久久| 日本精品一级二级| 久久久久久久久久久久久久久99| 一区二区三区影院| 国产精品白丝jk白祙喷水网站| 91行情网站电视在线观看高清版| 精品人伦一区二区色婷婷| 一区二区三区在线视频观看| 国模冰冰炮一区二区| 欧美日韩国产高清一区| 国产精品久久久久久久久果冻传媒 | 欧美乱妇15p| 中文字幕在线不卡一区二区三区 | 欧美tickling挠脚心丨vk| 亚洲色图自拍偷拍美腿丝袜制服诱惑麻豆| 天天综合网 天天综合色| 91小视频免费观看| 久久中文娱乐网| 蜜桃av一区二区三区| 欧美性色aⅴ视频一区日韩精品| 国产精品美女久久久久久久久| 看电影不卡的网站| 欧美日韩国产片| 一个色综合av| 91麻豆文化传媒在线观看| 国产欧美综合在线观看第十页| 麻豆国产精品777777在线| 欧美一区二区三区系列电影| 亚洲自拍另类综合| 色94色欧美sute亚洲线路二| 国产精品免费视频网站| 国产一区二区三区四区在线观看| 制服丝袜在线91| 日韩成人午夜精品| 777亚洲妇女| 亚洲一区二区三区中文字幕 | 午夜精品久久一牛影视| 欧美在线看片a免费观看| 一区二区三区成人在线视频| 91网页版在线|