code: public static boolean containsContentType(String contentType, String[] allowedContentTypes)
      {
          if (allowedContentTypes == null)
          {
              return false;
          }
          for (int i = 0; i < allowedContentTypes.length; i++)
          {
              if (allowedContentTypes[i].indexOf(contentType) != -1)
              {
                  return true;
              }
          }
          return false;
      }
docs: Indicate if the passes content type match one of the options passed.