Class ISOCurrency
java.lang.Object
org.jpos.iso.ISOCurrency
ISO Currency Conversion package
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidstatic doubleconvertFromIsoMsg(String isoamount, String currency) Deprecated.You should never use doublesstatic StringconvertToIsoMsg(double amount, String currency) Converts an amount to an ISO Amount taking in consideration the number of decimal digits according to currencystatic Object[]decomposeComposedCurrency(String incurr) static CurrencygetCurrency(int code) static CurrencygetCurrency(String code) static StringgetIsoCodeFromAlphaCode(String alphacode) static voidstatic BigDecimalparseFromISO87String(String isoamount, String currency) static StringtoISO87String(BigDecimal amount, String currency)
-
Method Details
-
loadPropertiesFromClasspath
-
convertFromIsoMsg
@Deprecated public static double convertFromIsoMsg(String isoamount, String currency) throws IllegalArgumentException Deprecated.You should never use doublesConverts from an ISO Amount (12 digit string) to a double taking in consideration the number of decimal digits according to currency- Parameters:
isoamount- - The ISO amount to be converted (eg. ISOField 4)currency- - The ISO currency to be converted (eg. ISOField 49)- Returns:
- result - A double representing the converted field
- Throws:
IllegalArgumentException- if we fail to convert the amount
-
toISO87String
-
parseFromISO87String
-
addBundle
-
convertToIsoMsg
public static String convertToIsoMsg(double amount, String currency) throws IllegalArgumentException Converts an amount to an ISO Amount taking in consideration the number of decimal digits according to currency- Parameters:
amount- - The amount to be convertedcurrency- - The ISO currency to be converted (eg. ISOField 49)- Returns:
- result - An iso amount representing the converted field
- Throws:
IllegalArgumentException- if we fail to convert the amount
-
decomposeComposedCurrency
- Throws:
IllegalArgumentException
-
getIsoCodeFromAlphaCode
- Throws:
IllegalArgumentException
-
getCurrency
- Throws:
ISOException
-
getCurrency
- Throws:
ISOException
-