public final class Accept extends ParametersHeader implements AcceptHeader
| Modifier and Type | Field and Description |
|---|---|
protected MediaRange |
mediaRange
mediaRange field
|
duplicates, parametersheaderNameAND, AT, COLON, COMMA, DOT, DOUBLE_QUOTE, EQUALS, GREATER_THAN, HT, immutableClasses, indentation, LESS_THAN, LPAREN, matchExpression, NEWLINE, PERCENT, POUND, QUESTION, QUOTE, RETURN, RPAREN, SEMICOLON, SLASH, SP, STAR, stringRepresentationNAMEACCEPT, 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 and Description |
|---|
Accept()
default constructor
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
allowsAllContentSubTypes()
returns true if this header allows all ContentSubTypes,
false otherwise.
|
boolean |
allowsAllContentTypes()
returns true if this header allows all ContentTypes,
false otherwise.
|
Object |
clone()
Clones this object.
|
protected String |
encodeBody()
Encode the value of this header into cannonical form.
|
protected StringBuilder |
encodeBody(StringBuilder buffer)
Encode the body of this header (the stuff that follows headerName).
|
String |
getContentSubType()
get the ContentSubType fiels
|
String |
getContentType()
get the contentType field
|
MediaRange |
getMediaRange()
get the MediaRange field
|
float |
getQValue()
Get the q value.
|
boolean |
hasQValue()
Return true if the q value has been set.
|
void |
removeQValue()
Remove the q value.
|
void |
setContentSubType(String subtype)
set the ContentSubType field
|
void |
setContentType(String type)
set the ContentType field
|
void |
setMediaRange(MediaRange m)
Set the mediaRange member
|
void |
setQValue(float qValue)
Set the q value
|
equalParameters, getMultiParameter, getMultiParameterNames, getMultiParameters, getMultiParameterValue, getNameValue, getParameter, getParameter, getParameterAsBoolean, getParameterAsFloat, getParameterAsHexInt, getParameterAsInt, getParameterAsLong, getParameterAsURI, getParameterNames, getParameters, getParameterValue, hasMultiParameter, hasMultiParameters, hasParameter, hasParameters, removeMultiParameter, removeMultiParameters, removeParameter, removeParameters, setMultiParameter, setMultiParameter, setParameter, setParameter, setParameter, setParameter, setParameter, setParameter, setParameters, setQuotedParameterencode, encode, getHeaderName, getHeaderValue, getName, getValue, hashCode, isHeaderList, setHeaderName, toStringdbgPrint, debugDump, debugDump, equals, matchdbgPrint, getClassFromName, getIndentation, getMatcher, isMySubclass, makeClone, merge, setMatcher, sprint, sprint, sprint, sprint, sprint, sprint, sprint, sprint, sprintfinalize, getClass, notify, notifyAll, wait, wait, waitgetParameter, getParameterNames, removeParameter, setParameterprotected MediaRange mediaRange
public boolean allowsAllContentTypes()
allowsAllContentTypes in interface AcceptHeaderpublic boolean allowsAllContentSubTypes()
allowsAllContentSubTypes in interface AcceptHeaderprotected String encodeBody()
protected StringBuilder encodeBody(StringBuilder buffer)
SIPHeaderencodeBody in class ParametersHeaderpublic MediaRange getMediaRange()
public String getContentType()
getContentType in interface MediaTypepublic String getContentSubType()
getContentSubType in interface MediaTypepublic float getQValue()
getQValue in interface AcceptHeaderpublic boolean hasQValue()
public void removeQValue()
public void setContentSubType(String subtype)
setContentSubType in interface MediaTypesubtype - String to setpublic void setContentType(String type)
setContentType in interface MediaTypetype - String to setpublic void setQValue(float qValue)
throws InvalidArgumentException
setQValue in interface AcceptHeaderqValue - float to setIllegalArgumentException - if qValue is <0.0 or >1.0InvalidArgumentException - if the q parameter value is not
-1 or between 0 and 1.public void setMediaRange(MediaRange m)
m - MediaRange fieldpublic Object clone()
GenericObjectclone in interface Headerclone in class ParametersHeaderCopyright © 2018. All Rights Reserved.