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

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

?? jndiconfiguration.java

?? java servlet著名論壇源代碼
?? JAVA
?? 第 1 頁 / 共 2 頁
字號:
     */
    public Boolean getBoolean(String key, Boolean defaultValue)
    {
        Object value = getValueFromJNDI(key);
        if (value instanceof Boolean)
        {
            return (Boolean) value;
        }
        else if (value instanceof String)
        {
            return testBoolean((String) value);
        }
        else if (value == null)
        {
            if (defaults != null)
            {
                return defaults.getBoolean(key, defaultValue);
            }
            else
            {
                return defaultValue;
            }
        }
        else
        {
            throw new ClassCastException(
                '\'' + key + "' doesn't map to a Boolean object");
        }
    }

    /**
     * Get a byte associated with the given configuration key.
     *
     * @param key The configuration key.
     * @param defaultValue The default value.
     * @return The associated byte if key is found and has valid format, default
     *         value otherwise.
     * @throws ClassCastException is thrown if the key maps to an object that
     *            is not a Byte.
     * @throws NumberFormatException is thrown if the value mapped by the key
     *            has not a valid number format.
     */
    public Byte getByte(String key, Byte defaultValue)
    {
        Object value = getValueFromJNDI(key);
        if (value instanceof Byte)
        {
            return (Byte) value;
        }
        else if (value instanceof String)
        {
            Byte b = new Byte((String) value);
            return b;
        }
        else if (value == null)
        {
            return defaultValue;
        }
        else
        {
            throw new ClassCastException(
                '\'' + key + "' doesn't map to a Byte object");
        }
    }

    /**
     * Get a double associated with the given configuration key.
     *
     * @param key The configuration key.
     * @param defaultValue The default value.
     * @return The associated double if key is found and has valid
     * format, default value otherwise.
     * @throws ClassCastException is thrown if the key maps to an
     * object that is not a Double.
     * @throws NumberFormatException is thrown if the value mapped
     * by the key has not a valid number format.
     */
    public Double getDouble(String key, Double defaultValue)
    {
        Object value = this.getValueFromJNDI(key);
        if (value instanceof Double)
        {
            return (Double) value;
        }
        else if (value instanceof String)
        {
            Double d = new Double((String) value);
            return d;
        }
        else if (value == null)
        {
            return defaultValue;
        }
        else
        {
            throw new ClassCastException(
                '\'' + key + "' doesn't map to a Double object");
        }
    }

    /**
     * Get a float associated with the given configuration key.
     *
     * @param key The configuration key.
     * @param defaultValue The default value.
     * @return The associated float if key is found and has valid
     * format, default value otherwise.
     * @throws ClassCastException is thrown if the key maps to an
     * object that is not a Float.
     * @throws NumberFormatException is thrown if the value mapped
     * by the key has not a valid number format.
     */
    public Float getFloat(String key, Float defaultValue)
    {
        Object value = getValueFromJNDI(key);
        if (value instanceof Float)
        {
            return (Float) value;
        }
        else if (value instanceof String)
        {
            Float f = new Float((String) value);
            return f;
        }
        else if (value == null)
        {
            return defaultValue;
        }
        else
        {
            throw new ClassCastException(
                '\'' + key + "' doesn't map to a Float object");
        }
    }

    /**
     * Get a int associated with the given configuration key.
     *
     * @param key The configuration key.
     * @param defaultValue The default value.
     * @return The associated int if key is found and has valid format, default
     *         value otherwise.
     * @throws ClassCastException is thrown if the key maps to an object that
     *         is not a Integer.
     * @throws NumberFormatException is thrown if the value mapped by the key
     *         has not a valid number format.
     */
    public Integer getInteger(String key, Integer defaultValue)
    {
        Object value = getValueFromJNDI(key);
        if (value instanceof Integer)
        {
            return (Integer) value;
        }
        else if (value instanceof String)
        {
            Integer i = new Integer((String) value);
            return i;
        }
        else if (value == null)
        {
            return defaultValue;
        }
        else
        {
            throw new ClassCastException(
                '\'' + key + "' doesn't map to a Integer object");
        }
    }

    /**
     * Get a long associated with the given configuration key.
     *
     * @param key The configuration key.
     * @param defaultValue The default value.
     * @return The associated long if key is found and has valid
     * format, default value otherwise.
     * @throws ClassCastException is thrown if the key maps to an
     * object that is not a Long.
     * @throws NumberFormatException is thrown if the value mapped
     * by the key has not a valid number format.
     */
    public Long getLong(String key, Long defaultValue)
    {
        Object value = getValueFromJNDI(key);
        if (value instanceof Long)
        {
            return (Long) value;
        }
        else if (value instanceof String)
        {
            Long l = new Long((String) value);
            return l;
        }
        else if (value == null)
        {
            return defaultValue;
        }
        else
        {
            throw new ClassCastException(
                '\'' + key + "' doesn't map to a Long object");
        }
    }

    /**
     * Get a short associated with the given configuration key.
     *
     * @param key The configuration key.
     * @param defaultValue The default value.
     * @return The associated short if key is found and has valid
     * format, default value otherwise.
     * @throws ClassCastException is thrown if the key maps to an
     * object that is not a Short.
     * @throws NumberFormatException is thrown if the value mapped
     * by the key has not a valid number format.
     */
    public Short getShort(String key, Short defaultValue)
    {
        Object value = getValueFromJNDI(key);
        if (value instanceof Short)
        {
            return (Short) value;
        }
        else if (value instanceof String)
        {
            Short s = new Short((String) value);
            return s;
        }
        else if (value == null)
        {
            return defaultValue;
        }
        else
        {
            throw new ClassCastException(
                '\'' + key + "' doesn't map to a Short object");
        }
    }

    /**
     * Get a string associated with the given configuration key.
     *
     * @param key The configuration key.
     * @param defaultValue The default value.
     * @return The associated string if key is found, default value otherwise.
     * @throws ClassCastException is thrown if the key maps to an object that
     *            is not a String.
     */
    public String getString(String key, String defaultValue)
    {
        try
        {
            Object o = getValueFromJNDI(key);
            if (o == null)
            {
                return defaultValue;
            }
            else
            {
                return (String) o;
            }
        }
        catch (NoSuchElementException nsee)
        {
            return defaultValue;
        }
    }
    /**
     * Get an array of strings associated with the given configuration
     * key.
     *
     * @param key The configuration key.
     * @return The associated string array if key is found.
     * @throws ClassCastException is thrown if the key maps to an
     * object that is not a String/Vector of Strings.
     */
    public String[] getStringArray(String key)
    {
        Object value = getValueFromJNDI(key);
        String[] tokens;
        if (value instanceof String)
        {
            tokens = new String[1];
            tokens[0] = interpolate((String) value);
        }
        else if (value instanceof Container)
        {
            tokens = new String[((Container) value).size()];
            for (int i = 0; i < tokens.length; i++)
            {
                tokens[i] = interpolate((String) ((Container) value).get(i));
            }
        }
        else if (value == null)
        {
            tokens = new String[0];
        }
        else
        {
            throw new ClassCastException(
                '\'' + key + "' doesn't map to a String/Vector object");
        }
        return tokens;
    }

    /**
     * Get a Vector of strings associated with the given configuration key.
     * Typically this will be just a single item, as you can't have multiple
     * properties with the same name.
     *
     * @param key The configuration key.
     * @param defaultValue The default value.
     * @return The associated Vector.
     */
    public Vector getVector(String key, Vector defaultValue)
    {
        try
        {
            Object value = this.getValueFromJNDI(key);
            if (value != null)
            {
                Vector v = new Vector(1);
                v.add(value.toString());
                return v;
            }
            else
            {
                if (defaultValue == null)
                {
                    defaultValue = new Vector();
                }
                return defaultValue;
            }
        }
        catch (NoSuchElementException nsse)
        {
            return defaultValue;
        }
    }
    /**
     * @return String
     */
    public String getPrefix()
    {
        return prefix;
    }
    /**
     * Sets the prefix.
     * @param prefix The prefix to set
     */
    public void setPrefix(String prefix)
    {
        this.prefix = prefix;
    }
    private Object getValueFromJNDI(String key)
    {
        if (clearedProperties.contains(key))
        {
            return null;
        }
        try
        {
            key = StringUtils.replace(key, ".", "/");
            return getContext().lookup(key);
        }
        catch (java.util.NoSuchElementException nsse)
        {
            return null;
        }
        catch (NamingException ne)
        {
            return null;
        }
    }
    private Context getContext() throws NamingException
    {
        if (envCtx == null)
        {
            Context initCtx = new InitialContext();
            envCtx = (Context) initCtx.lookup(getPrefix());
        }
        return envCtx;
    }
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91视频观看视频| 国产成人精品免费视频网站| 宅男在线国产精品| 日韩成人一级片| 日韩一区二区三区免费观看| 久久se精品一区精品二区| 久久奇米777| 北条麻妃一区二区三区| 一区二区三区精品在线观看| 欧美精选一区二区| 国产原创一区二区三区| 国产精品视频一二| 欧美视频一区二区在线观看| 蜜桃在线一区二区三区| 久久精品在这里| 色屁屁一区二区| 蜜臀va亚洲va欧美va天堂 | 91麻豆精品秘密| 亚洲国产成人av| 久久综合一区二区| 色噜噜狠狠成人中文综合| 婷婷亚洲久悠悠色悠在线播放| 日韩西西人体444www| 成人免费高清视频在线观看| 亚洲线精品一区二区三区| 欧美精品一区二区三区四区 | 理论片日本一区| 国产精品视频一区二区三区不卡| 欧美日韩国产综合一区二区三区 | 高清国产午夜精品久久久久久| 亚洲天堂网中文字| 日韩欧美资源站| 在线亚洲精品福利网址导航| 国产在线一区观看| 午夜激情综合网| 国产精品三级电影| 精品黑人一区二区三区久久| 欧美在线free| 波多野结衣在线aⅴ中文字幕不卡| 日韩中文字幕91| 亚洲色图丝袜美腿| 2020国产精品| 日韩一区二区三区四区五区六区| 色综合久久综合网欧美综合网| 蜜桃一区二区三区在线观看| 亚洲一区二区三区国产| 一区精品在线播放| 久久久无码精品亚洲日韩按摩| 欧美日韩精品欧美日韩精品| 成人天堂资源www在线| 精一区二区三区| 午夜久久电影网| 亚洲欧美视频一区| 国产精品女同一区二区三区| 日韩精品一区二区三区视频| 7777精品伊人久久久大香线蕉| 色综合天天做天天爱| 成人黄色777网| 成人综合激情网| 国产suv精品一区二区6| 国产精品自在在线| 韩国成人精品a∨在线观看| 日韩精品福利网| 亚洲高清一区二区三区| 一个色综合网站| 亚洲精品第1页| 亚洲天堂精品在线观看| 亚洲图片你懂的| 亚洲免费观看高清完整| 亚洲日本欧美天堂| 亚洲欧美日韩一区二区| 国产精品久久久一本精品| 国产无人区一区二区三区| 久久久久成人黄色影片| 丝袜美腿亚洲综合| 一区二区三区在线视频观看| 国产精品女人毛片| 国产精品久久99| 国产精品美女久久久久久久网站| 欧美激情一区二区三区四区| 国产性做久久久久久| 久久精品亚洲国产奇米99| 久久精品人人做人人爽人人| 久久久蜜桃精品| 国产精品欧美久久久久一区二区| 国产精品三级在线观看| 亚洲人成亚洲人成在线观看图片| 亚洲日本中文字幕区| 亚洲午夜久久久| 秋霞电影网一区二区| 精品一区二区免费视频| 国产成人av一区二区三区在线 | 欧美中文字幕一区| 欧美人牲a欧美精品| 欧美成人一区二区三区在线观看| 欧美日韩一区二区欧美激情| 欧美日韩mp4| 精品捆绑美女sm三区| 国产欧美精品一区二区色综合朱莉| 欧美激情在线看| 国产老妇另类xxxxx| 国产综合色精品一区二区三区| 国产成人亚洲综合a∨婷婷图片 | 久久国产精品72免费观看| 国产美女精品人人做人人爽| 色综合天天综合网国产成人综合天| 欧美日韩在线三区| 精品国产精品网麻豆系列| 成人欧美一区二区三区小说| 午夜影院在线观看欧美| 国产精品羞羞答答xxdd| 欧美色图激情小说| 久久久蜜臀国产一区二区| 夜夜操天天操亚洲| 国内成+人亚洲+欧美+综合在线| 9i在线看片成人免费| 91麻豆精品91久久久久久清纯| 久久久久国色av免费看影院| 亚洲激情图片一区| 国产一区二区三区在线观看精品| 91色九色蝌蚪| 久久精品免视看| 婷婷久久综合九色国产成人| 国产成人精品1024| 91精品蜜臀在线一区尤物| 国产精品久久久久一区二区三区共| 亚洲国产成人tv| 99视频精品全部免费在线| 日韩一级高清毛片| 一区二区三区国产| 粉嫩一区二区三区性色av| 日韩一区二区三区免费看| 亚洲精品国产视频| 成a人片亚洲日本久久| 日韩免费看网站| 亚洲成av人片在线观看无码| 成人黄色电影在线| 久久久91精品国产一区二区精品| 日韩专区欧美专区| 欧美日韩性生活| 亚洲欧美视频在线观看视频| 粉嫩在线一区二区三区视频| 欧美sm美女调教| 麻豆久久久久久久| 欧美日韩成人综合在线一区二区| 亚洲女同女同女同女同女同69| 国产精品系列在线播放| 日韩免费高清av| 日本中文在线一区| 精品视频1区2区| 亚洲精品亚洲人成人网在线播放| 成人美女视频在线观看| 久久久三级国产网站| 精品一区二区在线观看| 日韩视频在线一区二区| 日本aⅴ亚洲精品中文乱码| 欧美日本在线看| 亚洲va国产天堂va久久en| 欧美日韩成人在线一区| 日日夜夜精品视频天天综合网| 91国偷自产一区二区开放时间 | 国产成人午夜精品5599| 欧美成人精品1314www| 久久电影网电视剧免费观看| 欧美一级生活片| 蜜桃在线一区二区三区| 日韩久久久精品| 国产在线不卡一卡二卡三卡四卡| 精品国偷自产国产一区| 国产精品自拍在线| 中文无字幕一区二区三区| 成人涩涩免费视频| 亚洲欧美日韩久久精品| 色婷婷精品久久二区二区蜜臂av| 亚洲欧美综合色| 在线观看日韩一区| 天堂一区二区在线免费观看| 欧美一级久久久久久久大片| 韩国三级中文字幕hd久久精品| 精品福利一区二区三区免费视频| 国产在线看一区| 国产欧美日韩另类视频免费观看| 成人在线视频一区二区| 亚洲欧美中日韩| 欧美色区777第一页| 青青草国产成人av片免费| 久久综合九色综合欧美就去吻| 国产精品一卡二卡在线观看| 亚洲欧洲另类国产综合| 欧美在线免费视屏| 蜜乳av一区二区| 欧美国产综合一区二区| 日本道精品一区二区三区| 日本亚洲一区二区| 国产午夜精品一区二区三区四区| 91麻豆免费观看| 久久精品国产免费看久久精品| 国产日韩欧美一区二区三区综合| 91啪亚洲精品| 久久99国产精品尤物|