Package com.neovisionaries.i18n

Examples of com.neovisionaries.i18n.CountryCode


*/
public class ISO3166Utils {
   
    public static String alpha3toAlpha2(String alpha3) throws UnknownCountryException {
        if(alpha3.length()==0) return " ";
        CountryCode countryCode = CountryCode.getByCode(alpha3);
        if(null==countryCode){
            throw new UnknownCountryException("Can't find country "+alpha3, alpha3);
        }
        return countryCode.getAlpha2();
    }
View Full Code Here

TOP

Related Classes of com.neovisionaries.i18n.CountryCode

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.