|
NIST-SIP: The Reference Implementation for JAIN-SIP 1.2 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectgov.nist.core.GenericObject
gov.nist.javax.sip.header.SIPObject
gov.nist.javax.sip.header.SIPHeader
gov.nist.javax.sip.header.ParametersHeader
gov.nist.javax.sip.header.ContentType
public class ContentType
ContentType SIP Header
14.17 Content-Type
The Content-Type entity-header field indicates the media type of the
entity-body sent to the recipient or, in the case of the HEAD method,
the media type that would have been sent had the request been a GET.
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
Further discussion of methods for identifying the media type of an
entity is provided in section 7.2.1.
From HTTP RFC 2616
| Field Summary |
|---|
| Fields inherited from interface javax.sip.header.ContentTypeHeader |
|---|
NAME |
| Fields inherited from interface gov.nist.javax.sip.header.SIPHeaderNames |
|---|
ACCEPT, ACCEPT_ENCODING, ACCEPT_LANGUAGE, ALERT_INFO, ALLOW, ALLOW_EVENTS, AUTHENTICATION_INFO, AUTHORIZATION, CALL_ID, CALL_INFO, CONTACT, CONTENT_DISPOSITION, CONTENT_ENCODING, CONTENT_LANGUAGE, CONTENT_LENGTH, CONTENT_TYPE, CSEQ, DATE, ERROR_INFO, EVENT, EXPIRES, FROM, IN_REPLY_TO, JOIN, MAX_FORWARDS, MIME_VERSION, MIN_EXPIRES, MIN_SE, ORGANIZATION, PRIORITY, PROXY_AUTHENTICATE, PROXY_AUTHORIZATION, PROXY_REQUIRE, RACK, REASON, RECORD_ROUTE, REFERRED_BY, REPLACES, REPLY_TO, REQUIRE, RETRY_AFTER, ROUTE, RSEQ, SERVER, SESSION_EXPIRES, SIP_ETAG, SIP_IF_MATCH, SUBJECT, SUBSCRIPTION_STATE, SUPPORTED, TIMESTAMP, TO, UNSUPPORTED, USER_AGENT, VIA, WARNING, WWW_AUTHENTICATE |
| Constructor Summary | |
|---|---|
ContentType()
Default constructor. |
|
ContentType(String contentType,
String contentSubtype)
Constructor given a content type and subtype. |
|
| Method Summary | |
|---|---|
Object |
clone()
Clones this object. |
int |
compareMediaRange(String media)
compare two MediaRange headers. |
String |
encodeBody()
Encode into a canonical string. |
boolean |
equals(Object other)
An introspection based equality predicate for SIPObjects. |
String |
getCharset()
Get the charset parameter. |
String |
getContentSubType()
Get the content subtype. |
String |
getContentType()
Get the content subtype. |
MediaRange |
getMediaRange()
get the mediaRange field. |
String |
getMediaSubType()
get the MediaSubType field. |
String |
getMediaType()
get the Media Type. |
void |
setContentSubType(String contentType)
Set the content subtype. |
void |
setContentType(String contentType)
set the content type. |
void |
setContentType(String contentType,
String contentSubType)
set the content type and subtype. |
void |
setMediaRange(MediaRange m)
Set the mediaRange member |
| Methods inherited from class gov.nist.javax.sip.header.ParametersHeader |
|---|
getMultiParameter, getMultiParameterNames, getMultiParameters, getMultiParameterValue, getNameValue, getParameter, getParameter, getParameterNames, getParameters, getParameterValue, hasMultiParameter, hasMultiParameters, hasParameter, hasParameters, removeMultiParameter, removeMultiParameters, removeParameter, removeParameters, setMultiParameter, setMultiParameter, setParameter, setParameter, setParameters, setQuotedParameter |
| Methods inherited from class gov.nist.javax.sip.header.SIPHeader |
|---|
encode, encode, getHeaderName, getHeaderValue, getName, getValue, hashCode, isHeaderList, setHeaderName, toString |
| Methods inherited from class gov.nist.javax.sip.header.SIPObject |
|---|
dbgPrint, debugDump, debugDump, match |
| Methods inherited from class gov.nist.core.GenericObject |
|---|
getClassFromName, getMatcher, isMySubclass, makeClone, merge, setMatcher |
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface javax.sip.header.Parameters |
|---|
getParameter, getParameterNames, removeParameter, setParameter |
| Methods inherited from interface javax.sip.header.Header |
|---|
getName, hashCode, toString |
| Constructor Detail |
|---|
public ContentType()
public ContentType(String contentType,
String contentSubtype)
contentType - is the content type.contentSubtype - is the content subtype| Method Detail |
|---|
public int compareMediaRange(String media)
media - String to set
public String encodeBody()
public MediaRange getMediaRange()
public String getMediaType()
public String getMediaSubType()
public String getContentSubType()
getContentSubType in interface MediaTypepublic String getContentType()
getContentType in interface MediaTypepublic String getCharset()
public void setMediaRange(MediaRange m)
m - mediaRange field.
public void setContentType(String contentType,
String contentSubType)
contentType - Content type string.contentSubType - content subtype string
public void setContentType(String contentType)
throws ParseException
setContentType in interface MediaTypecontentType - Content type string.
ParseException - which signals that an error has been reached
unexpectedly while parsing the contentType value.
public void setContentSubType(String contentType)
throws ParseException
setContentSubType in interface MediaTypecontentType - String to set
ParseException - which signals that an error has been reached
unexpectedly while parsing the contentSubType value.public Object clone()
gov.nist.core.GenericObject
clone in interface Headerclone in class ParametersHeaderpublic boolean equals(Object other)
SIPObject
equals in interface Headerequals in class SIPObjectother - the other object to test against.
|
NIST-SIP: The Reference Implementation for JAIN-SIP 1.2 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||