Class ContentTypeUtils


  • public final class ContentTypeUtils
    extends Object

    Utility class containing methods for computing content type-related data.

    This class is internal and should not be used from users code.

    Since:
    3.0.6
    Author:
    Daniel Fernández
    • Method Detail

      • isContentTypeHTML

        public static boolean isContentTypeHTML(String contentType)
      • isContentTypeXML

        public static boolean isContentTypeXML(String contentType)
      • isContentTypeRSS

        public static boolean isContentTypeRSS(String contentType)
      • isContentTypeAtom

        public static boolean isContentTypeAtom(String contentType)
      • isContentTypeJavaScript

        public static boolean isContentTypeJavaScript(String contentType)
      • isContentTypeJSON

        public static boolean isContentTypeJSON(String contentType)
      • isContentTypeCSS

        public static boolean isContentTypeCSS(String contentType)
      • isContentTypeText

        public static boolean isContentTypeText(String contentType)
      • isContentTypeSSE

        public static boolean isContentTypeSSE(String contentType)
      • computeTemplateModeForContentType

        public static TemplateMode computeTemplateModeForContentType(String contentType)
      • computeTemplateModeForTemplateName

        public static TemplateMode computeTemplateModeForTemplateName(String templateName)
      • computeTemplateModeForRequestPath

        public static TemplateMode computeTemplateModeForRequestPath(String requestPath)
      • hasRecognizedFileExtension

        public static boolean hasRecognizedFileExtension(String templateName)
      • computeContentTypeForTemplateName

        public static String computeContentTypeForTemplateName(String templateName,
                                                               Charset charset)
      • computeContentTypeForRequestPath

        public static String computeContentTypeForRequestPath(String requestPath,
                                                              Charset charset)
      • computeCharsetFromContentType

        public static Charset computeCharsetFromContentType(String contentType)
      • combineContentTypeAndCharset

        public static String combineContentTypeAndCharset(String contentType,
                                                          Charset charset)