|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectwt.util.LocalizedResource
public class LocalizedResource
LocalizedResource contains the utility methods for finding and opening the resource that
best matches the given Locale.
Supported API: true
Extendable: false
| Constructor Summary | |
|---|---|
LocalizedResource(String resourceName)
Supported API: true |
|
LocalizedResource(String resourceName,
String alternateExtension)
Supported API: true |
|
| Method Summary | |
|---|---|
protected void |
closeInputStream()
Close input stream of this instance. |
protected InputStream |
getInputStream()
Return input stream of best matching resource. |
Locale |
getLocale()
Get the Locale object for this instance. |
static String |
getLocalizedResourceName(Locale aLocale,
String aFilename)
Returns the Localized name of a Resource, with a specified Locale and a filename. |
static String |
getLocalizedResourceName(WTContext aContext,
String aFilename)
Returns the Localized name of a Resource, with a specified Locale and a filename. |
String |
getResourceName()
Get the resource name that best matched. |
protected void |
init()
Look for the given resource for the server's locale. |
protected void |
init(Locale locale)
Look for the given resource for the given locale. |
void |
init(Vector preferences)
Look for the given resource for the given locales. |
InputStream |
openResource()
Look for the given resource for the server's locale. |
InputStream |
openResource(Locale locale)
Look for the given resource for the given locale. |
InputStream |
openResource(Vector preferences)
Look for the given resource for the given locales. |
static void |
setDebug(boolean value)
Sets the debug value which controls logging from this class. |
void |
setLocale(Locale locale)
Set the Locale object for this instance. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public LocalizedResource(String resourceName)
public LocalizedResource(String resourceName,
String alternateExtension)
| Method Detail |
|---|
public Locale getLocale()
public String getResourceName()
public void setLocale(Locale locale)
public static String getLocalizedResourceName(WTContext aContext,
String aFilename)
Replaces LocaleHelper.translateURLString( )
aLocale - The locale to generate the file with.aFilename - The filename to generate the file around.
public static String getLocalizedResourceName(Locale aLocale,
String aFilename)
Replaces LocaleHelper.translateURLString( )
aLocale - The locale to generate the file with.aFilename - The filename to generate the file around.
public static void setDebug(boolean value)
protected void init(Locale locale)
throws WTException
locale - The locale to search on.
WTException - Thrown if an IO exception occurs.
protected void init()
throws WTException
WTException - Thrown if an IO exception occurs.
public void init(Vector preferences)
throws WTException
preferences - Vector containing the locales to search on.
WTException - Thrown if an IO exception occurs.
protected InputStream getInputStream()
throws WTException
WTException - Thrown if an IO exception occurs.protected void closeInputStream()
public InputStream openResource(Locale locale)
throws WTException
locale - The locale to search on.
WTException - Thrown if an IO exception occurs.
public InputStream openResource()
throws WTException
WTException - Thrown if an IO exception occurs.
public InputStream openResource(Vector preferences)
throws WTException
preferences - Vector containing the locales to search on.
WTException - Thrown if an IO exception occurs.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||