private static < T > InputStream getPropertiesFile ( Class < T > clazz , ULocale locale ) { String localeStr = "" ; if ( locale != null ) { localeStr = ' ' + locale . getName ( ) ; } String filePath = clazz . getName ( ) . replace ( DOT , SLASH ) + localeStr + PROPERTIES_EXT ; return clazz . getClassLoader ( ) . getResourceAsStream ( filePath ) ; }
Get the properties file associated with the given interface and locale as an InputStream . Use the return value in an InputStream reader to load the properties file data into a Properties object .