code: public static boolean canAccept(String headerValue, boolean strict, String type) {
      if(headerValue != null && type != null)  {
        String availableTypes[] = headerValue.split(",");
        for(String availableType : availableTypes) {
          String typeParams[] = availableType.split(";");
          double qValue = 1.0d;
          if(typeParams.length > 0) {
            for(int i=1; i<typeParams.length; i++) {
              if(typeParams[i].trim().startsWith("q=")) {
                String qString = typeParams[i].substring(2).trim();
                if(qString.matches("\\A\\d+(\\.\\d*){0,1}\\Z")){
                  qValue = Double.parseDouble(qString);
                  break;
                } 
              }
            }
          }
          boolean matches = false;
          if(typeParams[0].equals("*") || typeParams[0].equals("*/*")) {
            matches = true;
          } else {
            matches = hasMatch(typeParams, type);
          }
          if(qValue == 0 && matches) {
            return false;
          } else if(matches){
            return true;
          }
        }
      }
      return !strict;
    }
docs: Parses an Accept header value and checks to see if the type is acceptable.
  @param headerValue The value of the header.
  @param strict Forces the type to be in the header.
  @param type The token that we need in order to be acceptable.
  @return