info.informatica.util.locale
Class ResourceFactory
java.lang.Object
info.informatica.util.locale.ResourceFactory
- Direct Known Subclasses:
- FileResourceFactory, LoaderResourceFactory
public abstract class ResourceFactory
- extends Object
Factory of localized objects.
Loads objects according to basename, extension and locale name.
- Version:
- 1.00
- Author:
- amengual at informatica dot info
ResourceFactory
public ResourceFactory()
ResourceFactory
public ResourceFactory(Associator assoc)
loadLocalObject
public Object loadLocalObject(String baseFileName,
String ext,
String localeName,
Locale locale)
throws IOException
- Parameters:
baseFileName - the basename of the pathext - the extension.localeName - the name of the locale, including the initial '.', eg. ".es_ES".locale - the Locale.
Both the locale and the locale name are supplied, to avoid the overhead of
building the locale name several times.
- Returns:
- the newly instantiated object, or the inputstream if could not
instantiate the object, or null if no inputstream could be opened
- Throws:
IOException
loadLocalFile
public abstract InputStream loadLocalFile(String baseFileName,
String ext,
String localeName)
throws IOException
- Parameters:
baseFileName - the basename of the pathext - the extension.localeName - the name of the locale, eg. es_ES.
- Throws:
IOException