code: public static ULocale acceptLanguage(String acceptLanguageList, ULocale[] availableLocales,
              boolean[] fallback) {
          if (acceptLanguageList == null) {
              throw new NullPointerException();
          }
          ULocale acceptList[] = null;
          try {
              acceptList = parseAcceptLanguage(acceptLanguageList, true);
          } catch (ParseException pe) {
              acceptList = null;
          }
          if (acceptList == null) {
              return null;
          }
          return acceptLanguage(acceptList, availableLocales, fallback);
      }
docs: <strong>[icu]</strong> Based on a HTTP formatted list of acceptable locales, determine an available
  locale for the user.  NullPointerException is thrown if acceptLanguageList or
  availableLocales is null.  If fallback is non-null, it will contain true if a
  fallback locale (one not in the acceptLanguageList) was returned.  The value on
  entry is ignored.  ULocale will be one of the locales in availableLocales, or the
  ROOT ULocale if if a ROOT locale was used as a fallback (because nothing else in
  availableLocales matched).  No ULocale array element should be null; behavior is
  undefined if this is the case.
  @param acceptLanguageList list in HTTP "Accept-Language:" format of acceptable locales
  @param availableLocales list of available locales. One of these will be returned.
  @param fallback if non-null, a 1-element array containing a boolean to be set with
  the fallback status
  @return one of the locales from the availableLocales list, or null if none match