public final class AcceptEncoding extends ParametersHeader implements AcceptEncodingHeader
From HTTP RFC 2616 The Accept-Encoding request-header field is similar to Accept, but restricts the content-codings (section 3.5) that are acceptable in the response. Accept-Encoding = "Accept-Encoding" ":" 1#( codings [ ";" "q" "=" qvalue ] ) codings = ( content-coding | "*" ) Examples of its use are: Accept-Encoding: compress, gzip Accept-Encoding: Accept-Encoding: * Accept-Encoding: compress;q=0.5, gzip;q=1.0 Accept-Encoding: gzip;q=1.0, identity; q=0.5, *;q=0
Modifier and Type | Field and Description |
---|---|
protected String |
contentCoding
contentEncoding field
|
duplicates, parameters
headerName
AND, 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, stringRepresentation
NAME
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 and Description |
---|
AcceptEncoding()
default constructor
|
Modifier and Type | Method and Description |
---|---|
protected String |
encodeBody()
Encode the value of this header.
|
protected StringBuilder |
encodeBody(StringBuilder buffer)
Encode the body of this header (the stuff that follows headerName).
|
String |
getEncoding()
get ContentEncoding field
|
float |
getQValue()
get QValue field
|
void |
setEncoding(String encoding)
Sets the encoding of an EncodingHeader.
|
void |
setQValue(float q)
Set the qvalue member
|
clone, 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, setQuotedParameter
encode, encode, getHeaderName, getHeaderValue, getName, getValue, hashCode, isHeaderList, setHeaderName, toString
dbgPrint, debugDump, debugDump, equals, match
dbgPrint, getClassFromName, getIndentation, getMatcher, isMySubclass, makeClone, merge, setMatcher, sprint, sprint, sprint, sprint, sprint, sprint, sprint, sprint, sprint
finalize, getClass, notify, notifyAll, wait, wait, wait
getParameter, getParameterNames, removeParameter, setParameter
protected String contentCoding
protected String encodeBody()
protected StringBuilder encodeBody(StringBuilder buffer)
SIPHeader
encodeBody
in class ParametersHeader
public float getQValue()
getQValue
in interface AcceptEncodingHeader
public String getEncoding()
getEncoding
in interface Encoding
public void setQValue(float q) throws InvalidArgumentException
setQValue
in interface AcceptEncodingHeader
q
- double to setInvalidArgumentException
- if the q parameter value is not
-1
or between 0 and 1
.public void setEncoding(String encoding) throws ParseException
setEncoding
in interface Encoding
encoding
- -
the new string value defining the encoding.ParseException
- which signals that an error has been reached unexpectedly
while parsing the encoding value.Copyright © 2016. All Rights Reserved.