Class 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)
    • Constructor Detail

      • AcceptEncoding

        public AcceptEncoding()
        Creates a new instance of AcceptEncoding with a default separator (comma character ",").
    • Method Detail

      • generate

        public java.lang.StringBuilder generate​(java.lang.StringBuilder sb)
        Not implemented.
        Specified by:
        generate in class CharacterSeparatedList
        Parameters:
        sb - the StringBuffer
        Returns:
        throws a RuntimeException to signal that the function is not implemented.
      • getEncodings

        @Nullable
        public QualityArgument[] getEncodings()
        Returns the previously parsed array of QualityArguments.
        Returns:
        the encodings previously parsed.
      • newToken

        public void newToken​(int index,
                             int start,
                             int stop)
        Parses the indexth QualityArgument from the index start to the index stop.
        Specified by:
        newToken in class CharacterSeparatedList
        Parameters:
        index - the index of the QualityArgument to be parsed
        start - the start index in the current string to parse from
        stop - the end index in the current string to parse from