/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
* (C) Copyright Taligent, Inc. 1996, 1997 - All Rights Reserved
* (C) Copyright IBM Corp. 1996 - 1998 - All Rights Reserved
*
* The original version of this source code and documentation
* is copyrighted and owned by Taligent, Inc., a wholly-owned
* subsidiary of IBM. These materials are provided under terms
* of a License Agreement between Taligent and Sun. This technology
* is protected by multiple US and International patents.
*
* This notice and attribution to Taligent may not be removed.
* Taligent is a registered trademark of Taligent, Inc.
*
*/
/**
* Provides information about and access to resource bundles in the
* sun.text.resources and sun.util.resources package.
*
* @author Asmus Freytag
* @author Mark Davis
*/
public class LocaleData {
/**
* Lazy load available locales.
*/
private static class AvailableLocales {
}
/**
* Returns a list of the installed locales. Currently, this simply returns
* the list of locales for which a sun.text.resources.FormatData bundle
* exists. This bundle family happens to be the one with the broadest
* locale coverage in the JRE.
*/
}
/**
* Gets a calendar data resource bundle, using privileges
* to allow accessing a sun.* package.
*/
}
/**
* Gets a currency names resource bundle, using privileges
* to allow accessing a sun.* package.
*/
}
/**
* Gets a locale names resource bundle, using privileges
* to allow accessing a sun.* package.
*/
}
/**
* Gets a time zone names resource bundle, using privileges
* to allow accessing a sun.* package.
*/
}
/**
* Gets a collation data resource bundle, using privileges
* to allow accessing a sun.* package.
*/
}
/**
* Gets a date format data resource bundle, using privileges
* to allow accessing a sun.* package.
*/
}
/**
* Gets a number format data resource bundle, using privileges
* to allow accessing a sun.* package.
*/
}
public ResourceBundle run() {
return ResourceBundle.
}
});
}
/* Singlton instance of ResourceBundle.Control. */
return rbControlInstance;
}
/*
* This method overrides the default implementation to search
* from a prebaked locale string list to determin the candidate
* locale list.
*
* @param baseName the resource bundle base name.
* locale the requested locale for the resource bundle.
* @returns a list of candidate locales to search from.
* @exception NullPointerException if baseName or locale is null.
*/
/* Get the locale string list from LocaleDataMetaInfo class. */
return candidates;
}
} else {
if (idx >= 0) {
}
}
/* Every locale string in the locale string list returned from
the above getSupportedLocaleString is enclosed
within two white spaces so that we could check some locale
such as "en".
*/
l.remove();
}
}
return candidates;
}
/*
* Overrides "getFallbackLocale" to return null so
* that the fallback locale will be null.
* @param baseName the resource bundle base name.
* locale the requested locale for the resource bundle.
* @return null for the fallback locale.
* @exception NullPointerException if baseName or locale is null.
*/
throw new NullPointerException();
}
return null;
}
}
/*
* Returns true if the non European resources jar file exists in jre
* extension directory.
* @returns true if the jar file is there. Otherwise, returns false.
*/
private static boolean isNonEuroLangSupported() {
/* Peek at the installed extension directory to see if
localedata.jar is installed or not.
*/
boolean isNonEuroResJarExist =
}
}).booleanValue();
return isNonEuroResJarExist;
}
/*
* This method gets the locale string list from LocaleDataMetaInfo class and
* then contructs the Locale array based on the locale string returned above.
* @returns the Locale array for the supported locale of JRE.
*
*/
getSupportedLocaleString("sun.text.resources.FormatData");
return null;
}
/* Look for "|" and construct a new locale string list. */
if (isNonEuroLangSupported()) {
localeStringTokenizer = new
} else {
localeStringTokenizer = new
}
currentToken = "ja-JP-u-ca-japanese-x-lvariant-JP";
currentToken = "th-TH-u-nu-thai-x-lvariant-TH";
currentToken = "no-NO-x-lvariant-NY";
}
}
return locales;
}
}