code: public static String[] getAvailableCurrencyCodes(ULocale loc, Date d) {
          String region = ULocale.getRegionForSupplementalData(loc, false);
          CurrencyFilter filter = CurrencyFilter.onDate(d).withRegion(region);
          List<String> list = getTenderCurrencies(filter);
          // Note: Prior to 4.4 the spec didn't say that we return null if there are no results, but
          // the test assumed it did.  Kept the behavior and amended the spec.
          if (list.isEmpty()) {
              return null;
          }
          return list.toArray(new String[list.size()]);
      }
docs: Returns an array of Strings which contain the currency
  identifiers that are valid for the given locale on the
  given date.  If there are no such identifiers, returns null.
  Returned identifiers are in preference order.
  @param loc the locale for which to retrieve currency codes.
  @param d the date for which to retrieve currency codes for the given locale.
  @return The array of ISO currency codes.