|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.restlet.engine.header.ContentType
public class ContentType
Association of a media type, a character set and modifiers.
Constructor Summary | |
---|---|
ContentType(MediaType mediaType,
CharacterSet characterSet)
Constructor. |
|
ContentType(Representation representation)
Constructor. |
|
ContentType(String headerValue)
Constructor. |
Method Summary | |
---|---|
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. |
String |
toString()
|
static String |
writeHeader(MediaType mediaType,
CharacterSet characterSet)
Writes the HTTP "Content-Type" header. |
static String |
writeHeader(Representation representation)
Writes the HTTP "Content-Type" header. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ContentType(MediaType mediaType, CharacterSet characterSet)
mediaType
- The media type.characterSet
- The character set.public ContentType(Representation representation)
representation
- The representation.public ContentType(String headerValue)
headerValue
- The "Content-type" header to parse.Method Detail |
---|
public static CharacterSet readCharacterSet(String contentType)
contentType
- The content type header to parse.
public static MediaType readMediaType(String contentType)
contentType
- The content type header to parse.
public static String writeHeader(MediaType mediaType, CharacterSet characterSet)
mediaType
- The representation media type.characterSet
- The representation character set.
public static String writeHeader(Representation representation)
representation
- The related representation.
public CharacterSet getCharacterSet()
public MediaType getMediaType()
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |