code: static boolean isText(String contentType) {
          return contentType.contains("text") || contentType.contains("json")
                  || contentType.contains("xml") || contentType.contains("html");
      }
docs: If content type looks like a text content.