Class QuotedStringTokenizer
java.lang.Object
org.apache.catalina.valves.rewrite.QuotedStringTokenizer
Tokenizer that splits input text into tokens, respecting quoted strings
(enclosed in double quotes), escape sequences, and comment lines
(starting with
#).-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final StringManagerStringManager for internationalized messages. -
Constructor Summary
ConstructorsConstructorDescriptionQuotedStringTokenizer(String text) Creates a new tokenizer for the given text. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the number of remaining tokens.booleanReturns whether there are more tokens available.Returns the next token from the input text.
-
Field Details
-
sm
StringManager for internationalized messages.
-
-
Constructor Details
-
QuotedStringTokenizer
Creates a new tokenizer for the given text.- Parameters:
text- the text to tokenize, ornullfor an empty token list
-
-
Method Details
-
hasMoreTokens
public boolean hasMoreTokens()Returns whether there are more tokens available.- Returns:
trueif there are more tokens,falseotherwise
-
nextToken
-
countTokens
public int countTokens()Returns the number of remaining tokens.- Returns:
- the number of tokens that have not yet been returned by
nextToken()
-