code: public String contentMimeType() {
          String ct = contentType();
          if (ct != null) {
              int index = ct.indexOf(";");
              if (index != -1) {
                  return ct.substring(0, index);
              } else {
                  return ct;
              }
          } else {
              return null;
          }
      }
docs: Retrieves the mime-type part of the content-type header. For instance on {@code Content-Type: text/html;
  charset=ISO-8859-4}, it retrieves {@code text/html}.
  
  @return the mime type of the content-type header