验证输入的country是否正确:
for (Locale locale : Locale.getAvailableLocales())
{
boolean value = (country.equalsIgnoreCase(locale.getCountry()) || country.equalsIgnoreCase(locale.getDisplayCountry())
|| country.equalsIgnoreCase(locale.getDisplayCountry(Locale.SIMPLIFIED_CHINESE)) || country.equalsIgnoreCase(locale.getDisplayCountry(Locale.TRADITIONAL_CHINESE))
|| country.equalsIgnoreCase(locale.getDisplayCountry(Locale.ENGLISH)));
if (value)
{
countryExistsFlag = true;
break;
}
}