Class DefaultCurrencyUnitDataProvider
java.lang.Object
org.joda.money.CurrencyUnitDataProvider
org.joda.money.DefaultCurrencyUnitDataProvider
Provider for available currencies using a file.
This reads currencies from various files.
Firstly it reads the mandatory resource named /org/joda/money/CurencyData.csv.
Then it reads the mandatory resource named /org/joda/money/CountryData.csv.
These files are located in the joda-money jar file.
Then it reads optional resources named META-INF/org/joda/money/CurencyDataExtension.csv.
Then it reads optional resources named META-INF/org/joda/money/CountryDataExtension.csv.
These will be read using ClassLoader.getResources(String).
These files may augment or replace data from the first two files.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionloadFromFile(String fileName) loadFromFiles(String fileName) private voidparseCountries(List<String> content) private voidparseCurrencies(List<String> content) protected voidRegisters all the currencies known by this provider.Methods inherited from class CurrencyUnitDataProvider
registerCountry, registerCurrency
-
Field Details
-
CURRENCY_REGEX_LINE
Regex format for the money csv line. -
COUNTRY_REGEX_LINE
Regex format for the country csv line.
-
-
Constructor Details
-
DefaultCurrencyUnitDataProvider
DefaultCurrencyUnitDataProvider()
-
-
Method Details
-
registerCurrencies
Registers all the currencies known by this provider.- Specified by:
registerCurrenciesin classCurrencyUnitDataProvider- Throws:
Exception- if an error occurs
-
loadFromFile
-
loadFromFiles
-
parseCurrencies
-
parseCountries
-