Class TokenParser

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

@Deprecated @Contract(threading=IMMUTABLE) public class TokenParser extends Tokenizer
Deprecated.
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
  • Field Details

    • INSTANCE

      public static final TokenParser INSTANCE
      Deprecated.
    • DQUOTE

      public static final char DQUOTE
      Deprecated.
      Double quote
      See Also:
    • ESCAPE

      public static final char ESCAPE
      Deprecated.
      Backward slash / escape character
      See Also:
  • Constructor Details

    • TokenParser

      public TokenParser()
      Deprecated.
  • Method Details

    • 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.
      Description copied from class: Tokenizer
      Transfers content into the destination buffer until a whitespace character or any of the given delimiters is encountered.
      Overrides:
      copyContent in class Tokenizer
      Parameters:
      buf - buffer with the sequence of chars to be parsed
      cursor - defines the bounds and current position of the buffer
      delimiters - set of delimiting characters. Can be null if the value is delimited by a whitespace only.
      dst - destination buffer
    • 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.
      Description copied from class: Tokenizer
      Transfers content into the destination buffer until a whitespace character, a quote, or any of the given delimiters is encountered.
      Overrides:
      copyUnquotedContent in class Tokenizer
      Parameters:
      buf - buffer with the sequence of chars to be parsed
      cursor - defines the bounds and current position of the buffer
      delimiters - set of delimiting characters. Can be null if the value is delimited by a whitespace or a quote only.
      dst - destination buffer
    • 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