org.iban4j.IbanUtil Java Examples
The following examples show how to use
org.iban4j.IbanUtil.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: BankDetailsServiceImpl.java From axelor-open-suite with GNU Affero General Public License v3.0 | 5 votes |
public void validateIban(String iban) throws IbanFormatException, InvalidCheckDigitException, UnsupportedCountryException { CountryCode countryCode = CountryCode.getByCode(IbanUtil.getCountryCode(iban)); if (countryCode == null) { throw new UnsupportedCountryException("Country code is not supported."); } if (IbanUtil.isSupportedCountry(countryCode)) { IbanUtil.validate(iban); } }
Example #2
Source File: IbanBenchmark.java From iban4j with Apache License 2.0 | 5 votes |
@BenchmarkOptions(benchmarkRounds = 3, warmupRounds = 1) @Test @Ignore public void ibanValidation() { for(int i = 0; i < LOOPS_COUNT; i++) { IbanUtil.validate("DE89370400440532013000"); } }
Example #3
Source File: IBANValidator.java From estatio with Apache License 2.0 | 5 votes |
public static boolean valid(final String iban) { try { IbanUtil.validate(iban); } catch (Exception e){ return false; } return true; }