KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > pt > waveweb > core > PropertiesManager


1 package pt.waveweb.core;
2
3 import java.util.MissingResourceException JavaDoc;
4 import java.util.ResourceBundle JavaDoc;
5
6 public class PropertiesManager {
7
8     private static final String JavaDoc CONFIG = "config";
9
10     private static final ResourceBundle JavaDoc RESOURCE_BUNDLE = ResourceBundle
11             .getBundle(CONFIG);
12
13     public static String JavaDoc getString(String JavaDoc key) {
14         try {
15             return RESOURCE_BUNDLE.getString(key);
16         } catch (MissingResourceException JavaDoc e) {
17             return '!' + key + '!';
18         }
19     }
20 }
Popular Tags