package kr.co.hmlee.common.filter.custom;
import java.util.Enumeration;
import java.util.Hashtable;
import java.util.ResourceBundle;
/**
* Created by IntelliJ IDEA.
* User: hmlee
* Date: 2008. 9. 29
* Time: 오전 11:17:02
* To change this template use File | Settings | File Templates. */
public class Properties {
public static String CONF_PATH="propertiesfile";
public static Properties instance = null;
private static Hashtable<String,String> h = null;
private Properties(){
h = new Hashtable<String,String>();
init();
}
private static synchronized Properties getInstance(){
if (instance == null) {
instance = new Properties();
}
return instance;
}
public static String getProperties(String strKey){
Properties proper = Properties.getInstance();
return proper.getValue(strKey);
}
private void init() {
ResourceBundle rb = ResourceBundle.getBundle(CONF_PATH);
Enumeration keys = rb.getKeys();
while (keys.hasMoreElements()){
String key = (String)keys.nextElement();
String value = rb.getString(key);
h.put(key,value);
}
}
private String getValue(String key){
return h.get(key);
}
}
Base64 Encode & Decode By Javascript [펌] (0) | 2008.11.28 |
---|---|
Javascript 한글포한 문자열자르기 .. cutString (0) | 2008.10.06 |
JSP페이지에 파라미터 한글깨짐 현상 처리 (0) | 2008.09.18 |
jad(decompiler) i n eclipse (0) | 2008.05.13 |
자바 정규식 (0) | 2008.03.10 |