org.apache.hc.core5.http.message

## Class TokenParser

- java.lang.Object
- - org.apache.hc.core5.util.Tokenizer
  - - org.apache.hc.core5.http.message.TokenParser

- Deprecated.
  Use `Tokenizer`

      @Deprecated
       @Contract(threading=IMMUTABLE)
      public class TokenParser
      extends Tokenizer

  Low level parser for header field elements. The parsing routines of this class are designed to produce near zero intermediate garbage and make no intermediate copies of input data.

  This class is immutable and thread safe.

  Since:
    4.4

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class org.apache.hc.core5.util.Tokenizer

      `Tokenizer.Cursor, Tokenizer.Delimiter`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static char` | `DQUOTE` Deprecated. Double quote
    `static char` | `ESCAPE` Deprecated. Backward slash / escape character
    `static TokenParser` | `INSTANCE` Deprecated.

    - ### Fields inherited from class org.apache.hc.core5.util.Tokenizer

      `CR, HT, LF, SP`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `TokenParser()` Deprecated.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `copyContent(CharSequence buf, ParserCursor cursor, BitSet delimiters, StringBuilder dst)` Deprecated.
    `void` | `copyContent(CharSequence buf, Tokenizer.Cursor cursor, BitSet delimiters, StringBuilder dst)` Deprecated.
    `void` | `copyQuotedContent(CharSequence buf, ParserCursor cursor, StringBuilder dst)` Deprecated.
    `void` | `copyQuotedContent(CharSequence buf, Tokenizer.Cursor cursor, StringBuilder dst)` Deprecated. Transfers content enclosed with quote marks into the destination buffer.
    `void` | `copyUnquotedContent(CharSequence buf, ParserCursor cursor, BitSet delimiters, StringBuilder dst)` Deprecated.
    `void` | `copyUnquotedContent(CharSequence buf, Tokenizer.Cursor cursor, BitSet delimiters, StringBuilder dst)` Deprecated.
    `String` | `parseToken(CharSequence buf, ParserCursor cursor, BitSet delimiters)` Deprecated.
    `String` | `parseValue(CharSequence buf, ParserCursor cursor, BitSet delimiters)` Deprecated.
    `void` | `skipWhiteSpace(CharSequence buf, ParserCursor cursor)` Deprecated.

    - ### Methods inherited from class org.apache.hc.core5.util.Tokenizer

      `copyContent, copyUnquotedContent, delimiters, delimiters, delimiters, delimiters, delimiters, INIT_BITSET, isWhitespace, parseContent, parseContent, parseToken, parseToken, parseValue, parseValue, skipWhiteSpace`

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

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

- - ### Field Detail

    - #### INSTANCE

          public static final TokenParser INSTANCE

      Deprecated.

    - #### DQUOTE

          public static final char DQUOTE

      Deprecated.
      Double quote
      See Also:
        Constant Field Values

    - #### ESCAPE

          public static final char ESCAPE

      Deprecated.
      Backward slash / escape character
      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### TokenParser

          public TokenParser()

      Deprecated.

  - ### Method Detail

    - #### parseToken

          public String parseToken(CharSequence buf,
                                   ParserCursor cursor,
                                   BitSet delimiters)

      Deprecated.

    - #### parseValue

          public String parseValue(CharSequence buf,
                                   ParserCursor cursor,
                                   BitSet delimiters)

      Deprecated.

    - #### skipWhiteSpace

          public void skipWhiteSpace(CharSequence buf,
                                     ParserCursor cursor)

      Deprecated.

    - #### copyContent

          public void copyContent(CharSequence buf,
                                  ParserCursor cursor,
                                  BitSet delimiters,
                                  StringBuilder dst)

      Deprecated.

    - #### copyContent

          public void copyContent(CharSequence buf,
                                  Tokenizer.Cursor cursor,
                                  BitSet delimiters,
                                  StringBuilder dst)

      Deprecated.
      Overrides:
        `copyContent` in class `Tokenizer`

    - #### copyUnquotedContent

          public void copyUnquotedContent(CharSequence buf,
                                          ParserCursor cursor,
                                          BitSet delimiters,
                                          StringBuilder dst)

      Deprecated.

    - #### copyUnquotedContent

          public void copyUnquotedContent(CharSequence buf,
                                          Tokenizer.Cursor cursor,
                                          BitSet delimiters,
                                          StringBuilder dst)

      Deprecated.
      Overrides:
        `copyUnquotedContent` in class `Tokenizer`

    - #### copyQuotedContent

          public void copyQuotedContent(CharSequence buf,
                                        ParserCursor cursor,
                                        StringBuilder dst)

      Deprecated.

    - #### copyQuotedContent

          public void copyQuotedContent(CharSequence buf,
                                        Tokenizer.Cursor cursor,
                                        StringBuilder dst)

      Deprecated.
      Description copied from class: `Tokenizer`
      Transfers content enclosed with quote marks into the destination buffer.
      Overrides:
        `copyQuotedContent` in class `Tokenizer`
      Parameters:
        `buf` - buffer with the sequence of chars to be parsed
        `cursor` - defines the bounds and current position of the buffer
        `dst` - destination buffer

Copyright © 2005–2021 The Apache Software Foundation. All rights reserved.