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

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

?? propertymanager.java

?? 一套完整的工商12315的源程序jsp部分在12315里,后臺JAVA部分在gs12315src里,沒有打包數據庫.
?? JAVA
字號:
package com.gs.db;

import java.util.*;
import java.io.*;

/**
 * Manage the property of the system. The propertie are stored in
 * the file '12315.properties'
 */
public class PropertyManager {
    private static final int MAJOR_VERSION = 1;

    private static final int MINOR_VERSION = 1;

    private static final int REVISION_VERSION = 0;

    private static PropertyManager manager = null;
    private static Object managerLock = new Object();
    private static String propsName = "/12315.properties";

    /**
     * Returns a  property.
     *
     * @param name the name of the property to return.
     * @return the property value specified by name.
     */
    public static String getProperty(String name) {
        if (manager == null) {
            synchronized(managerLock) {
                if (manager == null) {
                    manager = new PropertyManager(propsName);
                }
            }
        }
        return manager.getProp(name);
    }

    /**
     * Sets a  property. If the property doesn't already exists, a new
     * one will be created.
     *
     * @param name the name of the property being set.
     * @param value the value of the property being set.
     */
    public static void setProperty(String name, String value) {
        if (manager == null) {
            synchronized(managerLock) {
                if (manager == null) {
                    manager = new PropertyManager(propsName);
                }
            }
        }
        manager.setProp(name, value);
    }

    /**
     * Deletes a  property. If the property doesn't exist, the method
     * does nothing.
     *
     * @param name the name of the property to delete.
     */
    public static void deleteProperty(String name) {
        if (manager == null) {
            synchronized(managerLock) {
                if (manager == null) {
                    manager = new PropertyManager(propsName);
                }
            }
        }
        manager.deleteProp(name);
    }

    /**
     * Returns the names of the  properties.
     *
     * @return an Enumeration of the  property names.
     */
    public static Enumeration propertyNames() {
        if (manager == null) {
            synchronized(managerLock) {
                if (manager == null) {
                    manager = new PropertyManager(propsName);
                }
            }
        }
        return manager.propNames();
    }

    /**
     * Returns true if the properties are readable. This method is mainly
     * valuable at setup time to ensure that the properties file is setup
     * correctly.
     */
    public static boolean propertyFileIsReadable() {
        if (manager == null) {
            synchronized(managerLock) {
                if (manager == null) {
                    manager = new PropertyManager(propsName);
                }
            }
        }
        return manager.propFileIsReadable();
    }

    /**
     * Returns true if the properties are writable. This method is mainly
     * valuable at setup time to ensure that the properties file is setup
     * correctly.
     */
    public static boolean propertyFileIsWritable() {
        if (manager == null) {
            synchronized(managerLock) {
                if (manager == null) {
                    manager = new PropertyManager(propsName);
                }
            }
        }
        return manager.propFileIsWritable();
    }

    /**
     * Returns true if the .properties file exists where the path property
     * purports that it does.
     */
    public static boolean propertyFileExists() {
        if (manager == null) {
            synchronized(managerLock) {
                if (manager == null) {
                    manager = new PropertyManager(propsName);
                }
            }
        }
        return manager.propFileExists();
    }

    /**
     * Returns the version number of  as a String. i.e. -- major.minor.revision
     */
    public static String getVersion() {
        return MAJOR_VERSION + "." + MINOR_VERSION + "." + REVISION_VERSION;
    }

    /**
     * Returns the major version number of . i.e. -- 1.x.x
     */
    public static int getVersionMajor() {
        return MAJOR_VERSION;
    }

    /**
     * Returns the minor version number of . i.e. -- x.1.x
     */
    public static int getVersionMinor() {
        return MINOR_VERSION;
    }

    /**
     * Returns the revision version number of . i.e. -- x.x.1
     */
    public static int getVersionRevision() {
        return REVISION_VERSION;
    }

    private Properties properties = null;
    private Object propertiesLock = new Object();
    private String resourceURI;

    /**
     * Creates a new PropertyManager. Singleton access only.
     */
    private PropertyManager(String resourceURI) {
        this.resourceURI = resourceURI;
    }

    /**
     * Gets a  property.  properties are stored in .properties.
     * The properties file should be accesible from the classpath. Additionally,
     * it should have a path field that gives the full path to where the
     * file is located. Getting properties is a fast operation.
     *
     * @param name the name of the property to get.
     * @return the property specified by name.
     */
    protected String getProp(String name) {
        //If properties aren't loaded yet. We also need to make this thread
        //safe, so synchronize...
        if (properties == null) {
            synchronized(propertiesLock) {
                //Need an additional check
                if (properties == null) {
                    loadProps();
                }
            }
        }
        String property = properties.getProperty(name);
        if (property == null) {
            return null;
        }
        else {
            return property.trim();
        }
    }

    /**
     * Sets a  property. Because the properties must be saved to disk
     * every time a property is set, property setting is relatively slow.
     */
    protected void setProp(String name, String value) {
        //Only one thread should be writing to the file system at once.
        synchronized (propertiesLock) {
            //Create the properties object if necessary.
            if (properties == null) {
                loadProps();
            }
            properties.setProperty(name, value);
            saveProps();
        }
    }

    protected void deleteProp(String name) {
        //Only one thread should be writing to the file system at once.
        synchronized (propertiesLock) {
            //Create the properties object if necessary.
            if (properties == null) {
                loadProps();
            }
            properties.remove(name);
            saveProps();
        }
    }

    protected Enumeration propNames() {
        //If properties aren't loaded yet. We also need to make this thread
        //safe, so synchronize...
        if (properties == null) {
            synchronized(propertiesLock) {
                //Need an additional check
                if (properties == null) {
                    loadProps();
                }
            }
        }
        return properties.propertyNames();
    }

    /**
     * Loads  properties from the disk.
     */
    private void loadProps() {
        properties = new Properties();
        InputStream in = null;
        try {
            in = getClass().getResourceAsStream(resourceURI);
            properties.load(in);
        }
        catch (Exception e) {
            System.err.println("Error reading  properties in PropertyManager.loadProps() " + e);
            e.printStackTrace();
        }
        finally {
            try {
                in.close();
            } catch (Exception e) { }
        }
    }

    /**
     * Saves  properties to disk.
     */
    private void saveProps() {
        //Now, save the properties to disk. In order for this to work, the user
        //needs to have set the path field in the properties file. Trim
        //the String to make sure there are no extra spaces.
        String path = properties.getProperty("path").trim();
        OutputStream out = null;
        try {
            out = new FileOutputStream(path);
            properties.store(out, ".properties -- " + (new java.util.Date()));
        }
        catch (Exception ioe) {
            System.err.println("There was an error writing .properties to " + path + ". " +
                "Ensure that the path exists and that the  process has permission " +
                "to write to it -- " + ioe);
            ioe.printStackTrace();
        }
        finally {
            try {
               out.close();
            } catch (Exception e) { }
        }
    }

    /**
     * Returns true if the properties are readable. This method is mainly
     * valuable at setup time to ensure that the properties file is setup
     * correctly.
     */
    public boolean propFileIsReadable() {
        try {
            InputStream in = getClass().getResourceAsStream(resourceURI);
            return true;
        }
        catch (Exception e) {
            return false;
        }
    }

    /**
     * Returns true if the .properties file exists where the path property
     * purports that it does.
     */
    public boolean propFileExists() {
        String path = getProp("path");
        if( path == null ) {
            return false;
        }
        File file = new File(path);
        if (file.isFile()) {
            return true;
        }
        else {
            return false;
        }
    }

    /**
     * Returns true if the properties are writable. This method is mainly
     * valuable at setup time to ensure that the properties file is setup
     * correctly.
     */
    public boolean propFileIsWritable() {
        String path = getProp("path");
        File file = new File(path);
        if (file.isFile()) {
            //See if we can write to the file
            if (file.canWrite()) {
                return true;
            }
            else {
                return false;
            }
        }
        else {
            return false;
        }
    }

}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美做爰猛烈大尺度电影无法无天| 国产精品私人影院| 国产亚洲女人久久久久毛片| 伊人夜夜躁av伊人久久| 久久成人18免费观看| 91啪亚洲精品| 国产精品欧美久久久久一区二区 | 亚洲天堂免费看| 久久99精品国产麻豆婷婷| 91久久久免费一区二区| 国产精品女上位| 国产一区二区免费在线| 欧美白人最猛性xxxxx69交| 亚洲在线视频网站| 播五月开心婷婷综合| 国产三级欧美三级日产三级99| 奇米精品一区二区三区四区| 欧美亚州韩日在线看免费版国语版| 欧美激情一区二区| 福利一区福利二区| 欧美国产欧美综合| 粉嫩蜜臀av国产精品网站| 久久久久久影视| 激情成人午夜视频| 久久亚洲私人国产精品va媚药| 美女在线观看视频一区二区| 欧美一级在线观看| 日产精品久久久久久久性色 | 99久久精品国产毛片| 中文在线免费一区三区高中清不卡| 激情图区综合网| 精品乱人伦小说| 国内久久婷婷综合| 欧美激情中文不卡| 成人免费av在线| 18涩涩午夜精品.www| jlzzjlzz欧美大全| 亚洲男人的天堂在线观看| 在线精品视频小说1| 日韩中文字幕区一区有砖一区| 欧美三级在线视频| 免费欧美在线视频| 欧美国产97人人爽人人喊| www.欧美日韩| 亚洲国产精品久久人人爱| 51精品国自产在线| 国产精品资源在线看| 国产精品女主播在线观看| 色噜噜夜夜夜综合网| 三级亚洲高清视频| 国产欧美日韩视频一区二区| 成人黄色软件下载| 亚洲高清免费视频| 久久新电视剧免费观看| 成人黄色小视频在线观看| 亚洲成av人综合在线观看| 欧美成人r级一区二区三区| 国产91精品在线观看| 一区二区三区产品免费精品久久75| 欧美乱妇一区二区三区不卡视频| 久久成人免费网| 亚洲精品国产a久久久久久| 日韩欧美一级特黄在线播放| 成人在线视频一区二区| 亚洲超碰97人人做人人爱| 久久久久久久综合狠狠综合| 91网站黄www| 精彩视频一区二区| 亚洲伦理在线精品| 精品女同一区二区| 欧美在线免费视屏| 国产精品一区二区免费不卡 | 国产精品久久久爽爽爽麻豆色哟哟 | 亚洲免费观看视频| 亚洲精品一区二区在线观看| 色94色欧美sute亚洲线路二| 韩国理伦片一区二区三区在线播放| 国产精品久久久久三级| 欧美xfplay| 欧美日韩视频一区二区| 丰满少妇久久久久久久| 青青草精品视频| 一区二区三区四区五区视频在线观看| 日韩一区和二区| 欧美日韩黄色一区二区| 成人美女视频在线看| 美女脱光内衣内裤视频久久影院| 亚洲视频每日更新| 久久久高清一区二区三区| 欧美精选在线播放| 在线观看一区二区视频| www.欧美精品一二区| 国产成人一区在线| 国产一区美女在线| 免费观看在线综合色| 亚洲动漫第一页| 亚洲精品日日夜夜| 亚洲欧洲精品一区二区三区 | 天堂蜜桃91精品| 亚洲精品日产精品乱码不卡| 欧美激情中文字幕| 国产日韩欧美不卡| 久久日韩精品一区二区五区| 日韩一区国产二区欧美三区| 欧美日韩免费高清一区色橹橹 | 99精品欧美一区| 成人黄动漫网站免费app| 国产美女在线精品| 国产一区免费电影| 国产麻豆91精品| 国产激情视频一区二区三区欧美| 精品一区二区在线看| 蜜臀av一区二区在线免费观看| 午夜欧美电影在线观看| 五月天丁香久久| 日韩精品1区2区3区| 蜜臀久久99精品久久久久宅男| 亚洲成人三级小说| 日本午夜精品一区二区三区电影 | 亚洲午夜免费福利视频| 香港成人在线视频| 麻豆国产精品视频| 国产成人综合网站| 91在线看国产| 欧美性受极品xxxx喷水| 欧美一区二区三区四区五区| 日韩欧美你懂的| 久久久国产精品不卡| 中文字幕一区二区三区精华液 | 欧美一区二区性放荡片| 欧美成人女星排名| 国产午夜精品美女毛片视频| 国产精品国模大尺度视频| 一区二区三区免费在线观看| 亚洲一二三四久久| 青青草97国产精品免费观看 | 麻豆91精品91久久久的内涵| 国产综合成人久久大片91| 国产91综合一区在线观看| 欧美在线啊v一区| 日韩免费视频一区| 综合电影一区二区三区 | 精品999在线播放| 日韩一区中文字幕| 日韩精品午夜视频| 不卡免费追剧大全电视剧网站| 欧美伊人精品成人久久综合97| 精品国产免费人成在线观看| 国产精品久久久久四虎| 日韩影院在线观看| 波多野结衣欧美| 日韩欧美一区电影| 亚洲综合在线电影| 国产一区二区三区黄视频| 欧美主播一区二区三区| 国产性做久久久久久| 午夜精品成人在线视频| 国产suv精品一区二区三区| 制服丝袜国产精品| 自拍偷拍国产亚洲| 国产一区二区三区精品欧美日韩一区二区三区 | 欧美影视一区在线| 久久精品欧美日韩| 日韩精品三区四区| 日本乱码高清不卡字幕| 久久久久久一二三区| 日韩精品视频网| 色94色欧美sute亚洲线路二| 国产网站一区二区| 久久精品国产色蜜蜜麻豆| 欧美伊人久久大香线蕉综合69 | 国产蜜臀97一区二区三区| 日韩精品电影一区亚洲| 在线看国产一区| 亚洲欧美影音先锋| 懂色av中文一区二区三区| xf在线a精品一区二区视频网站| 婷婷久久综合九色综合绿巨人| 97久久精品人人做人人爽| 国产日韩欧美精品电影三级在线 | 91玉足脚交白嫩脚丫在线播放| 2021国产精品久久精品| 毛片不卡一区二区| 日韩欧美色综合网站| 日本一区中文字幕 | 国产精品美女视频| 成人午夜碰碰视频| 国产日产欧美一区二区三区| 久久99久久久欧美国产| 日韩女优毛片在线| 久久99久久精品欧美| 欧美大胆人体bbbb| 蜜臀久久久久久久| 精品欧美久久久| 国产精品原创巨作av| 久久久精品国产免费观看同学| 国产一区福利在线| 国产精品欧美综合在线| 成人毛片在线观看| 亚洲精品国产无套在线观|