info.informatica.util.locale
Class LoaderResourceFactory

java.lang.Object
  extended by info.informatica.util.locale.ResourceFactory
      extended by info.informatica.util.locale.LoaderResourceFactory

public class LoaderResourceFactory
extends ResourceFactory

Factory of localized objects through class loader.

Loads objects according to basename, extension and locale name.

For convenience, it adds a public method to load ResourceBundle objects.

Author:
amengual at informatica dot info

Constructor Summary
LoaderResourceFactory()
           
LoaderResourceFactory(ClassLoader loader)
           
 
Method Summary
 ResourceBundle loadBundle(String baseclass, String localeName)
           
 InputStream loadLocalFile(String baseName, String ext, String localeName)
           
 
Methods inherited from class info.informatica.util.locale.ResourceFactory
getLastModified, loadLocalObject
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LoaderResourceFactory

public LoaderResourceFactory(ClassLoader loader)

LoaderResourceFactory

public LoaderResourceFactory()
Method Detail

loadBundle

public ResourceBundle loadBundle(String baseclass,
                                 String localeName)

loadLocalFile

public InputStream loadLocalFile(String baseName,
                                 String ext,
                                 String localeName)
                          throws IOException
Specified by:
loadLocalFile in class ResourceFactory
Parameters:
baseName - the basename of the path
ext - the extension.
localeName - the name of the locale, eg. es_ES.
Throws:
IOException