Package org.mockserver.mappers
Class ContentTypeMapper
- java.lang.Object
-
- org.mockserver.mappers.ContentTypeMapper
-
public class ContentTypeMapper extends Object
- Author:
- jamesdbloom
-
-
Field Summary
Fields Modifier and Type Field Description static Charset
DEFAULT_HTTP_CHARACTER_SET
The default character set for an HTTP message, if none is specified in the Content-Type header.
-
Constructor Summary
Constructors Constructor Description ContentTypeMapper(MockServerLogger mockServerLogger)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Charset
getCharsetFromContentTypeHeader(String contentType)
static boolean
isBinary(String contentTypeHeader)
-
-
-
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(MockServerLogger mockServerLogger)
-
-