public final class IbanUtil extends Object
| Modifier and Type | Method and Description |
|---|---|
static String |
calculateCheckDigit(String iban)
Calculates Iban
Check Digit.
|
static String |
getAccountNumber(String iban)
Returns iban's account number.
|
static String |
getBankCode(String iban)
Returns iban's bank code.
|
static String |
getBban(String iban)
Returns iban's bban (Basic Bank Account Number).
|
static String |
getCheckDigit(String iban)
Returns iban's check digit.
|
static String |
getCountryCode(String iban)
Returns iban's country code.
|
static String |
getCountryCodeAndCheckDigit(String iban)
Returns iban's country code and check digit.
|
static int |
getIbanLength(CountryCode countryCode)
Returns iban length for the specified country.
|
static boolean |
isSupportedCountry(CountryCode countryCode)
Checks whether country is supporting iban.
|
static void |
validate(String iban)
Validates iban.
|
static void |
validate(String iban,
IbanFormat format)
Validates iban.
|
public static String calculateCheckDigit(String iban) throws IbanFormatException
iban - string valueIbanFormatException - if iban contains invalid character.public static void validate(String iban) throws IbanFormatException, InvalidCheckDigitException, UnsupportedCountryException
iban - to be validated.IbanFormatException - if iban is invalid.
UnsupportedCountryException if iban's country is not supported.
InvalidCheckDigitException if iban has invalid check digit.InvalidCheckDigitExceptionUnsupportedCountryExceptionpublic static void validate(String iban, IbanFormat format) throws IbanFormatException, InvalidCheckDigitException, UnsupportedCountryException
iban - to be validated.format - to be used in validation.IbanFormatException - if iban is invalid.
UnsupportedCountryException if iban's country is not supported.
InvalidCheckDigitException if iban has invalid check digit.InvalidCheckDigitExceptionUnsupportedCountryExceptionpublic static boolean isSupportedCountry(CountryCode countryCode)
countryCode - CountryCodepublic static int getIbanLength(CountryCode countryCode)
countryCode - CountryCodepublic static String getCheckDigit(String iban)
iban - Stringpublic static String getCountryCode(String iban)
iban - Stringpublic static String getCountryCodeAndCheckDigit(String iban)
iban - Stringpublic static String getBban(String iban)
iban - Stringpublic static String getAccountNumber(String iban)
iban - StringCopyright © 2020. All rights reserved.