Code example for PropertyResourceBundle

0
	 */ 
	protected ResourceBundle getFileSystemResource(String path, String basename, Locale locale) {
		File resourceFile = new File(path);
		try { 
			FileInputStream fileInputStream = new FileInputStream(resourceFile);
			return new PropertyResourceBundle(new InputStreamReader(fileInputStream, "UTF-8"));
		} 
		catch (Exception e) {
			log.warn("Unable to load bundle by path " + path + ", because of ", e);
		} 
		return null; 
	} 
	 
	/** 
	 * Searches under the base directory on the file system for possible message properties files 
	 * and loads them. <br /> 
	 * <br /> 
	 * It iterates over each file, nested to the base directory, and decides if this file is a 
	 * messages properties. Then, if file is suitable, it parses the locale from its name. And 
	 * finally, it loads resource bundle for that file and associates it with locale, derived from