public static Map<String, String> loadResourceBundle(String bundleName, Encoding encoding, String newline, Locale locale)
			throws IOException, SyntaxErrorException, MissingResourceException
	{
		String _baseName = bundleName.replace(".", "/");
		List<URL> _bundle = new ArrayList<URL>(3);
		URL _resource = FileTools.class.getClassLoader().getResource(_baseName + FILE_EXTENSION__PROPERTIES);
		if (null != _resource)
		{
			_bundle.add(_resource);
		}
		if (null != locale && IS_NOT_EMPTY.test(locale.getLanguage()))
		{
			_resource = FileTools.class.getClassLoader()
					.getResource(_baseName + "_" + locale.getLanguage() + FILE_EXTENSION__PROPERTIES);
			if (null != _resource)
			{
				_bundle.add(_resource);
			}
			if (IS_NOT_EMPTY.test(locale.getCountry()))
			{
				_resource = FileTools.class.getClassLoader().getResource(
						_baseName + "_" + locale.getLanguage() + "_" + locale.getCountry() + FILE_EXTENSION__PROPERTIES);
				if (null != _resource)
				{
					_bundle.add(_resource);
				}
			}
		}
		if (_bundle.isEmpty())
		{
			throw new MissingResourceException(bundleName, null, null);
		}
		return loadBundle(_bundle, encoding, newline);
	}
public static Map < String , String > loadResourceBundle ( String bundleName , Encoding encoding , String newline , Locale locale ) throws IOException , SyntaxErrorException , MissingResourceException { String _baseName = bundleName . replace ( "." , "/" ) ; List < URL > _bundle = new ArrayList < URL > ( 3 ) ; URL _resource = FileTools . class . getClassLoader ( ) . getResource ( _baseName + FILE_EXTENSION__PROPERTIES ) ; if ( null != _resource ) { _bundle . add ( _resource ) ; } if ( null != locale && IS_NOT_EMPTY . test ( locale . getLanguage ( ) ) ) { _resource = FileTools . class . getClassLoader ( ) . getResource ( _baseName + "_" + locale . getLanguage ( ) + FILE_EXTENSION__PROPERTIES ) ; if ( null != _resource ) { _bundle . add ( _resource ) ; } if ( IS_NOT_EMPTY . test ( locale . getCountry ( ) ) ) { _resource = FileTools . class . getClassLoader ( ) . getResource ( _baseName + "_" + locale . getLanguage ( ) + "_" + locale . getCountry ( ) + FILE_EXTENSION__PROPERTIES ) ; if ( null != _resource ) { _bundle . add ( _resource ) ; } } } if ( _bundle . isEmpty ( ) ) { throw new MissingResourceException ( bundleName , null , null ) ; } return loadBundle ( _bundle , encoding , newline ) ; }
Load a properties file looking for localized versions like ResourceBundle, supporting multiple line values.

@param bundleName
the bundle name, like <code>com.foo.MyBundle</code>.
@param encoding
the encoding of the bundle files.
@param newline
the sequence to use as a line separator for multiple line values.
@param locale
the locale to use to compute the name of the localized resources.
@return the properties, merged like a Java ResourceBundle.
@throws IOException
if there is a problem to deal with.
@throws SyntaxErrorException
if there is a problem to deal with.
@throws MissingResourceException
if no file at all is found.
@see LineByLinePropertyParser
@since 16.08.02