public class AcceptEncoding extends CharacterSeparatedList
Utility class for parsing Accept Encoding header in HTTP requests.
See: (RFC HTTP/1.1 RFC2616 14.3 Accept Encoding)
Modifier and Type | Field and Description |
---|---|
protected QualityArgument[] |
encodings
array of
QualityArgument s. |
CR, currentString, HT, LF, separator, SP
Constructor and Description |
---|
AcceptEncoding()
Creates a new instance of
AcceptEncoding with a default separator (comma character ","). |
Modifier and Type | Method and Description |
---|---|
java.lang.StringBuilder |
generate(java.lang.StringBuilder sb)
Not implemented.
|
QualityArgument[] |
getEncodings()
Returns the previously parsed array of
QualityArgument s. |
void |
initializeNbTokens(int nbTokens)
Sets the size of the array for storing parsed
QualityArgument s. |
void |
newToken(int index,
int start,
int stop)
|
endParse, parse, parse
protected QualityArgument[] encodings
QualityArgument
s.public AcceptEncoding()
Creates a new instance of AcceptEncoding
with a default separator (comma character ",").
public java.lang.StringBuilder generate(java.lang.StringBuilder sb)
Not implemented.
generate
in class CharacterSeparatedList
sb
- the StringBuffer
RuntimeException
to signal that the function is not implemented.public QualityArgument[] getEncodings()
Returns the previously parsed array of QualityArgument
s.
public void initializeNbTokens(int nbTokens)
Sets the size of the array for storing parsed QualityArgument
s.
initializeNbTokens
in class CharacterSeparatedList
nbTokens
- the size of the array for storing the parsed QualityArgument
s.public void newToken(int index, int start, int stop)
Parses the index
th QualityArgument
from the index start
to the index
stop
.
newToken
in class CharacterSeparatedList
index
- the index of the QualityArgument
to be parsedstart
- the start index in the current string to parse fromstop
- the end index in the current string to parse from