TokenList (Apache Tomcat 8.5.56 API Documentation)

org.apache.tomcat.util.http.parser

## Class TokenList

- java.lang.Object
- - org.apache.tomcat.util.http.parser.TokenList

-     public class TokenList
      extends Object

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static boolean` | `parseTokenList(Enumeration<String> inputs, Collection<String> collection)` Parses an enumeration of header values of the form 1#token, forcing all parsed values to lower case.
    `static boolean` | `parseTokenList(Reader input, Collection<String> collection)` Parses a header of the form 1#token, forcing all parsed values to lower case.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### parseTokenList

          public static boolean parseTokenList(Enumeration<String> inputs,
                               Collection<String> collection)
                                        throws IOException

      Parses an enumeration of header values of the form 1#token, forcing all parsed values to lower case.
      Parameters:
        `inputs` - The headers to parse
        `collection` - The Collection (usually a list of a set) to which the parsed tokens should be added
      Returns:
        `` true if the header values were parsed cleanly, otherwise `false` (e.g. if a non-token value was encountered)
      Throws:
        `IOException` - If an I/O error occurs reading the header

    - #### parseTokenList

          public static boolean parseTokenList(Reader input,
                               Collection<String> collection)
                                        throws IOException

      Parses a header of the form 1#token, forcing all parsed values to lower case. This is typically used when header values are case-insensitive.
      Parameters:
        `input` - The header to parse
        `collection` - The Collection (usually a list of a set) to which the parsed tokens should be added
      Returns:
        `` true if the header was parsed cleanly, otherwise `false` (e.g. if a non-token value was encountered)
      Throws:
        `IOException` - If an I/O error occurs reading the header

Copyright © 2000-2020 Apache Software Foundation. All Rights Reserved.