Package ej.hoka.http.support
Class AcceptEncoding
- java.lang.Object
-
- ej.hoka.http.support.CharacterSeparatedList
-
- ej.hoka.http.support.AcceptEncoding
-
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)
-
-
Field Summary
Fields Modifier and Type Field Description protected QualityArgument[]encodingsArray ofQualityArguments.-
Fields inherited from class ej.hoka.http.support.CharacterSeparatedList
CR, currentString, HT, LF, separator, SP
-
-
Constructor Summary
Constructors Constructor Description AcceptEncoding()Creates a new instance ofAcceptEncodingwith a default separator (comma character ",").
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringBuildergenerate(java.lang.StringBuilder sb)Not implemented.QualityArgument[]getEncodings()Returns the previously parsed array ofQualityArguments.voidinitializeNbTokens(int nbTokens)Sets the size of the array for storing parsedQualityArguments.voidnewToken(int index, int start, int stop)-
Methods inherited from class ej.hoka.http.support.CharacterSeparatedList
endParse, parse, parse
-
-
-
-
Field Detail
-
encodings
@Nullable protected QualityArgument[] encodings
Array ofQualityArguments.
-
-
Constructor Detail
-
AcceptEncoding
public AcceptEncoding()
Creates a new instance ofAcceptEncodingwith a default separator (comma character ",").
-
-
Method Detail
-
generate
public java.lang.StringBuilder generate(java.lang.StringBuilder sb)
Not implemented.- Specified by:
generatein classCharacterSeparatedList- Parameters:
sb- theStringBuffer- Returns:
- throws a
RuntimeExceptionto signal that the function is not implemented.
-
getEncodings
@Nullable public QualityArgument[] getEncodings()
Returns the previously parsed array ofQualityArguments.- Returns:
- the encodings previously parsed.
-
initializeNbTokens
public void initializeNbTokens(int nbTokens)
Sets the size of the array for storing parsedQualityArguments.- Specified by:
initializeNbTokensin classCharacterSeparatedList- Parameters:
nbTokens- the size of the array for storing the parsedQualityArguments.
-
newToken
public void newToken(int index, int start, int stop)- Specified by:
newTokenin classCharacterSeparatedList- Parameters:
index- the index of theQualityArgumentto be parsedstart- the start index in the current string to parse fromstop- the end index in the current string to parse from
-
-