1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28 package org.apache.hc.core5.http.message;
29
30 import java.util.BitSet;
31
32 import org.apache.hc.core5.annotation.Contract;
33 import org.apache.hc.core5.annotation.ThreadingBehavior;
34 import org.apache.hc.core5.util.Tokenizer;
35
36
37
38
39
40
41
42
43
44
45
46 @Deprecated
47 @Contract(threading = ThreadingBehavior.IMMUTABLE)
48 public class TokenParser extends Tokenizer {
49
50 public static final TokenParserage/TokenParser.html#TokenParser">TokenParser INSTANCE = new TokenParser();
51
52
53 public static final char DQUOTE = '\"';
54
55
56 public static final char ESCAPE = '\\';
57
58 public String parseToken(final CharSequence buf, final ParserCursor cursor, final BitSet delimiters) {
59 return super.parseToken(buf, cursor, delimiters);
60 }
61
62 public String parseValue(final CharSequence buf, final ParserCursor cursor, final BitSet delimiters) {
63 return super.parseValue(buf, cursor, delimiters);
64 }
65
66 public void skipWhiteSpace(final CharSequence buf, final ParserCursor cursor) {
67 super.skipWhiteSpace(buf, cursor);
68 }
69
70 public void copyContent(final CharSequence buf, final ParserCursor cursor, final BitSet delimiters,
71 final StringBuilder dst) {
72 super.copyContent(buf, cursor, delimiters, dst);
73 }
74
75 @Override
76 public void copyContent(final CharSequence buf, final Tokenizer.Cursor cursor, final BitSet delimiters,
77 final StringBuilder dst) {
78 final ParserCursorarserCursor.html#ParserCursor">ParserCursor parserCursor = new ParserCursor(cursor.getLowerBound(), cursor.getUpperBound());
79 parserCursor.updatePos(cursor.getPos());
80 copyContent(buf, parserCursor, delimiters, dst);
81 cursor.updatePos(parserCursor.getPos());
82 }
83
84 public void copyUnquotedContent(final CharSequence buf, final ParserCursor cursor, final BitSet delimiters,
85 final StringBuilder dst) {
86 super.copyUnquotedContent(buf, cursor, delimiters, dst);
87 }
88
89 @Override
90 public void copyUnquotedContent(final CharSequence buf, final Tokenizer.Cursor cursor, final BitSet delimiters,
91 final StringBuilder dst) {
92 final ParserCursorarserCursor.html#ParserCursor">ParserCursor parserCursor = new ParserCursor(cursor.getLowerBound(), cursor.getUpperBound());
93 parserCursor.updatePos(cursor.getPos());
94 copyUnquotedContent(buf, parserCursor, delimiters, dst);
95 cursor.updatePos(parserCursor.getPos());
96 }
97
98 public void copyQuotedContent(final CharSequence buf, final ParserCursor cursor, final StringBuilder dst) {
99 super.copyQuotedContent(buf, cursor, dst);
100 }
101
102 @Override
103 public void copyQuotedContent(final CharSequence buf, final Tokenizer.Cursor cursor, final StringBuilder dst) {
104 final ParserCursorarserCursor.html#ParserCursor">ParserCursor parserCursor = new ParserCursor(cursor.getLowerBound(), cursor.getUpperBound());
105 parserCursor.updatePos(cursor.getPos());
106 copyQuotedContent(buf, parserCursor, dst);
107 cursor.updatePos(parserCursor.getPos());
108 }
109
110 }