@Header(value="Content-Type") public class ContentType extends MediaType
The MIME type of this content.
Content-Type: text/html; charset=utf-8
Content-Type = "Content-Type" ":" media-type
Media types are defined in section 3.7. An example of the field is...
Content-Type: text/html; charset=ISO-8859-4
Modifier and Type | Method and Description |
---|---|
int |
findMatch(MediaType[] mediaTypes)
Given a list of media types, returns the best match for this
|
static ContentType |
forString(String value)
Returns a parsed
|
compareTo, equals, forStrings, getParameters, getSubType, getSubTypes, getType, hashCode, hasSubType, isMeta, match, toString
public static ContentType forString(String value)
value
- The public int findMatch(MediaType[] mediaTypes)
Note that fuzzy matching is allowed on the media types where the
For example, given a
The purpose for this is to allow parsers to match when artifacts such as
mediaTypes
- The media types to match against.Copyright © 2016–2019 The Apache Software Foundation. All rights reserved.