Package org.joda.money
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 void
parseCountries
(List<String> content) private void
parseCurrencies
(List<String> content) protected void
Registers all the currencies known by this provider.Methods inherited from class org.joda.money.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:
registerCurrencies
in classCurrencyUnitDataProvider
- Throws:
Exception
- if an error occurs
-
loadFromFile
- Throws:
Exception
-
loadFromFiles
- Throws:
Exception
-
parseCurrencies
- Throws:
Exception
-
parseCountries
- Throws:
Exception
-