Package org.apache.deltaspike.core.util
Class PropertyFileUtils
- java.lang.Object
-
- org.apache.deltaspike.core.util.PropertyFileUtils
-
@Typed public abstract class PropertyFileUtils extends Object
Copy from deltaspike project
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ResourceBundlegetResourceBundle(String bundleName)static ResourceBundlegetResourceBundle(String bundleName, Locale locale)This uses the correct ThreadContextClassLoader if deployed in an Container.static PropertiesloadProperties(URL url)Load properties by URLstatic Enumeration<URL>resolvePropertyFiles(String propertyFileName)Resolve property files
-
-
-
Method Detail
-
resolvePropertyFiles
public static Enumeration<URL> resolvePropertyFiles(String propertyFileName) throws IOException
Resolve property files- Parameters:
propertyFileName- property file name- Returns:
- files URL
- Throws:
IOException- if error
-
loadProperties
public static Properties loadProperties(URL url)
Load properties by URL- Parameters:
url- url- Returns:
- properties
-
getResourceBundle
public static ResourceBundle getResourceBundle(String bundleName)
- Parameters:
bundleName- bundle name- Returns:
- the ResourceBundle for the current default Locale
-
getResourceBundle
public static ResourceBundle getResourceBundle(String bundleName, Locale locale)
This uses the correct ThreadContextClassLoader if deployed in an Container.- Parameters:
bundleName- bundle namelocale- locale- Returns:
- the ResourceBundle for the current Locale
-
-