Package sun.util.resources

Examples of sun.util.resources.OpenListResourceBundle


        return zones;
    }

    private static final String[][] loadZoneStrings(Locale locale) {
        List<String[]> zones = new LinkedList<String[]>();
        OpenListResourceBundle rb = getBundle(locale);
        Enumeration<String> keys = rb.getKeys();
        String[] names = null;

        while(keys.hasMoreElements()) {
            String key = keys.nextElement();
View Full Code Here


    /**
     * Retrieve display names for a time zone ID.
     */
    public static final String[] retrieveDisplayNames(String id, Locale locale) {
        OpenListResourceBundle rb = getBundle(locale);
        return retrieveDisplayNames(rb, id, locale);
    }
View Full Code Here

        return names;
    }

    private static final OpenListResourceBundle getBundle(Locale locale) {
        OpenListResourceBundle rb;
        SoftReference<OpenListResourceBundle> data = cachedBundles.get(locale);

        if (data == null || ((rb = data.get()) == null)) {
            rb = LocaleData.getTimeZoneNames(locale);
            data = new SoftReference<OpenListResourceBundle>(rb);
View Full Code Here

     * @exception NullPointerException if <code>locale</code> is null
     * @since 1.7
     */
    public String getDisplayName(Locale locale) {
        try {
            OpenListResourceBundle bundle = LocaleData.getCurrencyNames(locale);
            String result = null;
            String bundleKey = currencyCode.toLowerCase(Locale.ROOT);

            // Check whether a provider can provide an implementation that's closer
            // to the requested locale than what the Java runtime itself can provide.
            LocaleServiceProviderPool pool =
                LocaleServiceProviderPool.getPool(CurrencyNameProvider.class);
            if (pool.hasProviders()) {
                result = pool.getLocalizedObject(
                                    CurrencyNameGetter.INSTANCE,
                                    locale, bundleKey, bundle, currencyCode, DISPLAYNAME);
            }

            if (result == null) {
                result = bundle.getString(bundleKey);
            }

            if (result != null) {
                return result;
            }
View Full Code Here

TOP

Related Classes of sun.util.resources.OpenListResourceBundle

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.