Android Open Source - bankomatinfos Iso3166 Country Codes






From Project

Back to project page bankomatinfos.

License

The source code is released under:

GNU General Public License

If you think the Android project bankomatinfos listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package at.zweng.bankomatinfos.iso7816emv;
//from   ww w .j ava 2s. co  m
import static at.zweng.bankomatinfos.util.Utils.bytesToHex;

public class Iso3166CountryCodes {

  /**
   * Returns ISO3166 country codes as string (not all countries listed here)
   * TODO: add more country codes
   * 
   * @param countryCode
   * @return
   */
  public static String getCountryAsString(byte[] countryCode) {
    String byteString = bytesToHex(countryCode);
    if ("0040".equals(byteString)) {
      return "Austria";
    }
    if ("0070".equals(byteString)) {
      return "Bosnia and Herzegovina";
    }
    if ("0124".equals(byteString)) {
      return "Canada";
    }
    if ("0191".equals(byteString)) {
      return "Hrvatska (Croatia)";
    }
    if ("0196".equals(byteString)) {
      return "Cyprus, Republic of";
    }
    if ("0203".equals(byteString)) {
      return "Czech Republic";
    }
    if ("0208".equals(byteString)) {
      return "Denmark";
    }
    if ("0233".equals(byteString)) {
      return "Estonia";
    }
    if ("0246".equals(byteString)) {
      return "Finland";
    }
    if ("0250".equals(byteString)) {
      return "France";
    }
    if ("0276".equals(byteString)) {
      return "Germany";
    }
    if ("0300".equals(byteString)) {
      return "Greece";
    }
    if ("0348".equals(byteString)) {
      return "Hungary";
    }
    if ("0380".equals(byteString)) {
      return "Italy";
    }
    if ("0528".equals(byteString)) {
      return "Netherlands";
    }
    if ("0578".equals(byteString)) {
      return "Norway";
    }
    if ("0642".equals(byteString)) {
      return "Romania";
    }
    if ("0703".equals(byteString)) {
      return "Slovakia";
    }
    if ("0705".equals(byteString)) {
      return "Slovenia";
    }
    if ("0724".equals(byteString)) {
      return "Spain";
    }
    if ("0752".equals(byteString)) {
      return "Sweden";
    }
    if ("0756".equals(byteString)) {
      return "Switzerland";
    }
    if ("0840".equals(byteString)) {
      return "USA";
    }
    if ("0891".equals(byteString)) {
      return "Serbia and Montenegro";
    }
    return "Country Code: " + byteString + " (ISO 3166)";
  }

}




Java Source Code List

at.zweng.bankomatinfos.AppController.java
at.zweng.bankomatinfos.exceptions.NoSmartCardException.java
at.zweng.bankomatinfos.exceptions.TlvParsingException.java
at.zweng.bankomatinfos.iso7816emv.BERTLV.java
at.zweng.bankomatinfos.iso7816emv.ByteArrayWrapper.java
at.zweng.bankomatinfos.iso7816emv.CPLC.java
at.zweng.bankomatinfos.iso7816emv.EMVTags.java
at.zweng.bankomatinfos.iso7816emv.EmvTag.java
at.zweng.bankomatinfos.iso7816emv.EmvUtils.java
at.zweng.bankomatinfos.iso7816emv.GPTags.java
at.zweng.bankomatinfos.iso7816emv.Iso3166CountryCodes.java
at.zweng.bankomatinfos.iso7816emv.Iso4217CurrencyCodes.java
at.zweng.bankomatinfos.iso7816emv.NfcBankomatCardReader.java
at.zweng.bankomatinfos.iso7816emv.TagAndValue.java
at.zweng.bankomatinfos.iso7816emv.TagImpl.java
at.zweng.bankomatinfos.iso7816emv.TagType.java
at.zweng.bankomatinfos.iso7816emv.TagValueType.java
at.zweng.bankomatinfos.model.AbstractTransactionLogEntry.java
at.zweng.bankomatinfos.model.CardInfo.java
at.zweng.bankomatinfos.model.EmvTransactionLogEntry.java
at.zweng.bankomatinfos.model.InfoKeyValuePair.java
at.zweng.bankomatinfos.model.QuickTransactionLogEntry.java
at.zweng.bankomatinfos.ui.AboutDialogFragment.java
at.zweng.bankomatinfos.ui.ChangelogDialogFragment.java
at.zweng.bankomatinfos.ui.ListAdapterEmvTransactions.java
at.zweng.bankomatinfos.ui.ListAdapterInfos.java
at.zweng.bankomatinfos.ui.ListAdapterQuickTransactions.java
at.zweng.bankomatinfos.ui.MainActivity.java
at.zweng.bankomatinfos.ui.NfcDisabledActivity.java
at.zweng.bankomatinfos.ui.ResultActivity.java
at.zweng.bankomatinfos.ui.ResultEmvTxListFragment.java
at.zweng.bankomatinfos.ui.ResultInfosListFragment.java
at.zweng.bankomatinfos.ui.ResultLogFragment.java
at.zweng.bankomatinfos.ui.ResultQuickTxListFragment.java
at.zweng.bankomatinfos.ui.SettingsActivity.java
at.zweng.bankomatinfos.util.ChangeLog.java
at.zweng.bankomatinfos.util.CustomAlertDialog.java
at.zweng.bankomatinfos.util.Utils.java