Java Doc for UResourceBundle.java in  » Internationalization-Localization » icu4j » com » ibm » icu » util » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Internationalization Localization » icu4j » com.ibm.icu.util 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   java.util.ResourceBundle
      com.ibm.icu.util.UResourceBundle

All known Subclasses:   com.ibm.icu.impl.ResourceBundleWrapper,  com.ibm.icu.impl.ICUResourceBundle,
UResourceBundle
abstract public class UResourceBundle extends ResourceBundle (Code)
A class representing a collection of resource information pertaining to a given locale. A resource bundle provides a way of accessing locale- specfic information in a data file. You create a resource bundle that manages the resources for a given locale and then ask it for individual resources.

In ResourceBundle class, an object is created and the sub items are fetched using getString, getObject methods. In UResourceBundle,each individual element of a resource is a resource by itself.

Resource bundles in ICU are currently defined using text files which conform to the following BNF definition. More on resource bundle concepts and syntax can be found in the Users Guide.

The packaging of ICU *.res files can be of two types ICU4C:

 root.res
 |
 --------
 |        |
 fr.res  en.res
 |
 --------
 |        |
 fr_CA.res fr_FR.res     
 
JAVA/JDK:
 LocaleElements.res
 |
 -------------------
 |                   |
 LocaleElements_fr.res  LocaleElements_en.res
 |
 ---------------------------
 |                            |
 LocaleElements_fr_CA.res   LocaleElements_fr_FR.res
 
Depending on the organization of your resources, the syntax to getBundleInstance will change. To open ICU style organization use:
 UResourceBundle bundle = UResourceBundle.getBundleInstance("com/ibm/icu/impl/data/icudt30b", "en_US");
 
To open Java/JDK style organization use:
 UResourceBundle bundle = UResourceBundle.getBundleInstance("com.ibm.icu.impl.data.LocaleElements", "en_US");
 

author:
   ram



Constructor Summary
public  UResourceBundle()
     Sole constructor.

Method Summary
protected static synchronized  voidaddToCache(ClassLoader cl, String fullName, ULocale defaultLocale, UResourceBundle b)
    
abstract protected  StringgetBaseName()
    
public static  UResourceBundlegetBundleInstance(String baseName, String localeName)
     Creates a resource bundle using the specified base name and locale.
public static  UResourceBundlegetBundleInstance(String baseName, String localeName, ClassLoader root)
     Creates a resource bundle using the specified base name, locale, and class root.
protected static  UResourceBundlegetBundleInstance(String baseName, String localeName, ClassLoader root, boolean disableFallback)
     Creates a resource bundle using the specified base name, locale, and class root.
Parameters:
  baseName - the base name of the resource bundle, a fully qualified class name
Parameters:
  localeName - the locale for which a resource bundle is desired
Parameters:
  root - the class object from which to load the resource bundle
Parameters:
  disableFallback - Option to disable locale inheritence.
public static  UResourceBundlegetBundleInstance(ULocale locale)
     Creates a UResourceBundle for the locale specified, from which users can extract resources by using their corresponding keys.
Parameters:
  locale - specifies the locale for which we want to open the resource.If null the bundle for default locale is opened.
public static  UResourceBundlegetBundleInstance(String baseName)
     Creates a UResourceBundle for the default locale and specified base name, from which users can extract resources by using their corresponding keys.
Parameters:
  baseName - specifies the locale for which we want to open the resource.If null the bundle for default locale is opened.
public static  UResourceBundlegetBundleInstance(String baseName, Locale locale)
     Creates a UResourceBundle for the specified locale and specified base name, from which users can extract resources by using their corresponding keys.
Parameters:
  baseName - specifies the locale for which we want to open the resource.If null the bundle for default locale is opened.
public static  UResourceBundlegetBundleInstance(String baseName, ULocale locale)
     Creates a UResourceBundle, from which users can extract resources by using their corresponding keys.
Parameters:
  baseName - string containing the name of the data package.If null the default ICU package name is used.
Parameters:
  locale - specifies the locale for which we want to open the resource.If null the bundle for default locale is opened.
public static  UResourceBundlegetBundleInstance(String baseName, Locale locale, ClassLoader loader)
     Creates a UResourceBundle for the specified locale and specified base name, from which users can extract resources by using their corresponding keys.
Parameters:
  baseName - specifies the locale for which we want to open the resource.If null the bundle for default locale is opened.
public static  UResourceBundlegetBundleInstance(String baseName, ULocale locale, ClassLoader loader)
     Creates a UResourceBundle, from which users can extract resources by using their corresponding keys.
public  LocalegetLocale()
    
abstract protected  StringgetLocaleID()
    
abstract protected  UResourceBundlegetParent()
    
abstract public  ULocalegetULocale()
     Returns the RFC 3066 conformant locale id of this resource bundle.
protected static synchronized  UResourceBundleinstantiateBundle(String baseName, String localeName, ClassLoader root, boolean disableFallback)
     Loads a new resource bundle for the give base name, locale and class loader.
protected static synchronized  UResourceBundleloadFromCache(ClassLoader cl, String fullName, ULocale defaultLocale)
    
abstract protected  voidsetLoadingStatus(int newStatus)
    


Constructor Detail
UResourceBundle
public UResourceBundle()(Code)
Sole constructor. (For invocation by subclass constructors, typically implicit.) This is public for compatibility with Java, whose compiler will generate public default constructors for an abstract class.




Method Detail
addToCache
protected static synchronized void addToCache(ClassLoader cl, String fullName, ULocale defaultLocale, UResourceBundle b)(Code)



getBaseName
abstract protected String getBaseName()(Code)
Gets the base name of the resource bundle The string representation of the base name



getBundleInstance
public static UResourceBundle getBundleInstance(String baseName, String localeName)(Code)
Creates a resource bundle using the specified base name and locale. ICU_DATA_CLASS is used as the default root.
Parameters:
  baseName - the base name of the resource bundle, a fully qualified class name
Parameters:
  localeName - the locale for which a resource bundle is desired
exception:
  MissingResourceException - if no resource bundle for the specified base name can be found a resource bundle for the given base name and locale



getBundleInstance
public static UResourceBundle getBundleInstance(String baseName, String localeName, ClassLoader root)(Code)
Creates a resource bundle using the specified base name, locale, and class root.
Parameters:
  baseName - the base name of the resource bundle, a fully qualified class name
Parameters:
  localeName - the locale for which a resource bundle is desired
Parameters:
  root - the class object from which to load the resource bundle
exception:
  MissingResourceException - if no resource bundle for the specified base name can be found a resource bundle for the given base name and locale



getBundleInstance
protected static UResourceBundle getBundleInstance(String baseName, String localeName, ClassLoader root, boolean disableFallback)(Code)
Creates a resource bundle using the specified base name, locale, and class root.
Parameters:
  baseName - the base name of the resource bundle, a fully qualified class name
Parameters:
  localeName - the locale for which a resource bundle is desired
Parameters:
  root - the class object from which to load the resource bundle
Parameters:
  disableFallback - Option to disable locale inheritence. If true the fallback chain will not be built.
exception:
  MissingResourceException - if no resource bundle for the specified base name can be found a resource bundle for the given base name and locale



getBundleInstance
public static UResourceBundle getBundleInstance(ULocale locale)(Code)
Creates a UResourceBundle for the locale specified, from which users can extract resources by using their corresponding keys.
Parameters:
  locale - specifies the locale for which we want to open the resource.If null the bundle for default locale is opened. a resource bundle for the given locale



getBundleInstance
public static UResourceBundle getBundleInstance(String baseName)(Code)
Creates a UResourceBundle for the default locale and specified base name, from which users can extract resources by using their corresponding keys.
Parameters:
  baseName - specifies the locale for which we want to open the resource.If null the bundle for default locale is opened. a resource bundle for the given base name and default locale



getBundleInstance
public static UResourceBundle getBundleInstance(String baseName, Locale locale)(Code)
Creates a UResourceBundle for the specified locale and specified base name, from which users can extract resources by using their corresponding keys.
Parameters:
  baseName - specifies the locale for which we want to open the resource.If null the bundle for default locale is opened.
Parameters:
  locale - specifies the locale for which we want to open the resource.If null the bundle for default locale is opened. a resource bundle for the given base name and locale



getBundleInstance
public static UResourceBundle getBundleInstance(String baseName, ULocale locale)(Code)
Creates a UResourceBundle, from which users can extract resources by using their corresponding keys.
Parameters:
  baseName - string containing the name of the data package.If null the default ICU package name is used.
Parameters:
  locale - specifies the locale for which we want to open the resource.If null the bundle for default locale is opened. a resource bundle for the given base name and locale



getBundleInstance
public static UResourceBundle getBundleInstance(String baseName, Locale locale, ClassLoader loader)(Code)
Creates a UResourceBundle for the specified locale and specified base name, from which users can extract resources by using their corresponding keys.
Parameters:
  baseName - specifies the locale for which we want to open the resource.If null the bundle for default locale is opened.
Parameters:
  locale - specifies the locale for which we want to open the resource.If null the bundle for default locale is opened.
Parameters:
  loader - the loader to use a resource bundle for the given base name and locale



getBundleInstance
public static UResourceBundle getBundleInstance(String baseName, ULocale locale, ClassLoader loader)(Code)
Creates a UResourceBundle, from which users can extract resources by using their corresponding keys.
Parameters:
  baseName - string containing the name of the data package.If null the default ICU package name is used.
Parameters:
  locale - specifies the locale for which we want to open the resource.If null the bundle for default locale is opened.
Parameters:
  loader - the loader to use a resource bundle for the given base name and locale



getLocale
public Locale getLocale()(Code)
Get the locale of this bundle the locale of this resource bundle



getLocaleID
abstract protected String getLocaleID()(Code)
Gets the localeID The string representation of the localeID



getParent
abstract protected UResourceBundle getParent()(Code)
Gets the parent bundle The parent bundle



getULocale
abstract public ULocale getULocale()(Code)
Returns the RFC 3066 conformant locale id of this resource bundle. This method can be used after a call to getBundleInstance() to determine whether the resource bundle returned really corresponds to the requested locale or is a fallback. the locale of this resource bundle



instantiateBundle
protected static synchronized UResourceBundle instantiateBundle(String baseName, String localeName, ClassLoader root, boolean disableFallback)(Code)
Loads a new resource bundle for the give base name, locale and class loader. Optionally will disable loading of fallback bundles.
Parameters:
  baseName - the base name of the resource bundle, a fully qualified class name
Parameters:
  localeName - the locale for which a resource bundle is desired
Parameters:
  root - the class object from which to load the resource bundle
Parameters:
  disableFallback - disables loading of fallback lookup chain
exception:
  MissingResourceException - if no resource bundle for the specified base name can be found a resource bundle for the given base name and locale



loadFromCache
protected static synchronized UResourceBundle loadFromCache(ClassLoader cl, String fullName, ULocale defaultLocale)(Code)



setLoadingStatus
abstract protected void setLoadingStatus(int newStatus)(Code)



Fields inherited from java.util.ResourceBundle
protected ResourceBundle parent(Code)(Java Doc)

Methods inherited from java.util.ResourceBundle
final public static void clearCache()(Code)(Java Doc)
final public static void clearCache(ClassLoader loader)(Code)(Java Doc)
public boolean containsKey(String key)(Code)(Java Doc)
final public static ResourceBundle getBundle(String baseName)(Code)(Java Doc)
final public static ResourceBundle getBundle(String baseName, Control control)(Code)(Java Doc)
final public static ResourceBundle getBundle(String baseName, Locale locale)(Code)(Java Doc)
final public static ResourceBundle getBundle(String baseName, Locale targetLocale, Control control)(Code)(Java Doc)
public static ResourceBundle getBundle(String baseName, Locale locale, ClassLoader loader)(Code)(Java Doc)
public static ResourceBundle getBundle(String baseName, Locale targetLocale, ClassLoader loader, Control control)(Code)(Java Doc)
abstract public Enumeration<String> getKeys()(Code)(Java Doc)
public Locale getLocale()(Code)(Java Doc)
final public Object getObject(String key)(Code)(Java Doc)
final public String getString(String key)(Code)(Java Doc)
final public String[] getStringArray(String key)(Code)(Java Doc)
abstract protected Object handleGetObject(String key)(Code)(Java Doc)
protected Set<String> handleKeySet()(Code)(Java Doc)
public Set<String> keySet()(Code)(Java Doc)
protected void setParent(ResourceBundle parent)(Code)(Java Doc)

Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.