Class PropertyFileUtils


  • @Typed
    public abstract class PropertyFileUtils
    extends Object
    Copy from deltaspike project
    • 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 name
        locale - locale
        Returns:
        the ResourceBundle for the current Locale