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
QualityArguments. |
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
QualityArguments. |
void |
initializeNbTokens(int nbTokens)
Sets the size of the array for storing parsed
QualityArguments. |
void |
newToken(int index,
int start,
int stop)
|
endParse, parse, parseprotected QualityArgument[] encodings
QualityArguments.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 CharacterSeparatedListsb - the StringBufferRuntimeException to signal that the function is not implemented.public QualityArgument[] getEncodings()
Returns the previously parsed array of QualityArguments.
public void initializeNbTokens(int nbTokens)
Sets the size of the array for storing parsed QualityArguments.
initializeNbTokens in class CharacterSeparatedListnbTokens - the size of the array for storing the parsed QualityArguments.public void newToken(int index,
int start,
int stop)
Parses the indexth QualityArgument from the index start to the index
stop.
newToken in class CharacterSeparatedListindex - 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