public class ContentType extends Object
Constructor and Description |
---|
ContentType(MediaType mediaType,
CharacterSet characterSet)
Constructor.
|
ContentType(String headerValue)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
CharacterSet |
getCharacterSet()
Returns the character set.
|
MediaType |
getMediaType()
Returns the media type.
|
static CharacterSet |
readCharacterSet(String contentType)
Parses the given content type header and returns the character set.
|
static MediaType |
readMediaType(String contentType)
Parses the given content type header and returns the media type.
|
public ContentType(MediaType mediaType, CharacterSet characterSet)
mediaType
- The media type.characterSet
- The character set.public ContentType(String headerValue)
headerValue
- The "Content-type" header to parse.public static MediaType readMediaType(String contentType)
contentType
- The content type header to parse.public static CharacterSet readCharacterSet(String contentType)
contentType
- The content type header to parse.public CharacterSet getCharacterSet()
public MediaType getMediaType()
Copyright © 2005–2016. All rights reserved.