Class ContentTypeMapper


  • public class ContentTypeMapper
    extends Object
    Author:
    jamesdbloom
    • Field Detail

      • DEFAULT_HTTP_CHARACTER_SET

        public static final Charset DEFAULT_HTTP_CHARACTER_SET
        The default character set for an HTTP message, if none is specified in the Content-Type header. From the HTTP 1.1 specification section 3.7.1 (http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.7.1):
             The "charset" parameter is used with some media types to define the character set (section 3.4) of the data.
             When no explicit charset parameter is provided by the sender, media subtypes of the "text" type are defined to
             have a default charset value of "ISO-8859-1" when received via HTTP. Data in character sets other than
             "ISO-8859-1" or its subsets MUST be labeled with an appropriate charset value.
         
    • Constructor Detail

      • ContentTypeMapper

        public ContentTypeMapper()
    • Method Detail

      • isBinary

        public static boolean isBinary​(String contentTypeHeader)
      • getCharsetFromContentTypeHeader

        public static Charset getCharsetFromContentTypeHeader​(String contentType)