code: public static Set<MediaType> set(MediaType... types) {
          Set<MediaType> set = new HashSet<MediaType>();
          for (MediaType type : types) {
              if (type != null) {
                  set.add(type);
              }
          }
          return Collections.unmodifiableSet(set);
      }
docs: Convenience method that returns an unmodifiable set that contains
  all the given media types.
  
  @since Apache Tika 1.2
  @param types media types
  @return unmodifiable set of the given types