Package com.infofuse.util;
Import java.util.MissingResourceException;
Import Java.util.ResourceBundle;
public class Propertiesutils {private static final String propertiesfile = "parameter";
Default binding resource private static resourcebundle resources = NULL; /** * Gets the specified property value * @param property name * @return/public static string Getpropertiesvalue (String PR
Operty) {String val = "";
try {if (resources = null) {initresources ();
} val = Resources.getstring (property);
catch (Exception e) {//Ignore} return Val; /** * To obtain the specified key value according to the profile * @param propertiesfile Property File * @param property name * @return/P Ublic static string Getpropertiesvalue (String Propertiesfile, string property)
{String val = "";
ResourceBundle resources1 = null;
try { Resources1 = Resourcebundle.getbundle (propertiesfile);
val = resources1.getstring (property);
catch (MissingResourceException e) {//Ignore} return Val; /** * Initialization profile/private static void Initresources () {try {resources = Resource
Bundle.getbundle (Propertiesfile);
catch (MissingResourceException e) {throw new RuntimeException (e);
}
}
}