1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
package com.vci.web.properties;
 
import java.io.IOException;
import java.io.InputStream;
import java.util.PropertyResourceBundle;
 
import com.vci.client.common.ClientLog4j;
 
public class UsedNames {
    private static PropertyResourceBundle resourceBundle = null;
 
    static{
        try{
            if(resourceBundle == null){
                InputStream ins = UsedNames.class.getClassLoader().getResourceAsStream("properties/usedNames.properties");
                if(ins != null){
                    resourceBundle = new PropertyResourceBundle(ins);
                }
            }
        }catch(IOException e){
            //e.printStackTrace();
            ClientLog4j.logger.error(e);
        }catch(Exception e){
            //e.printStackTrace();
            ClientLog4j.logger.error(e);
        }
    }
    
    public static String getProperty(String strKey){
        try{
            return resourceBundle.getString(strKey);
        }catch(Exception e){
            //e.printStackTrace();
            ClientLog4j.logger.error(e);
            return "";
        }
    }
}