Class QuotedStringTokenizer
- java.lang.Object
-
- org.apache.catalina.valves.rewrite.QuotedStringTokenizer
-
public class QuotedStringTokenizer extends java.lang.ObjectTokenizer that splits input text into tokens, respecting quoted strings (enclosed in double quotes), escape sequences, and comment lines (starting with#).
-
-
Field Summary
Fields Modifier and Type Field Description protected static StringManagersmStringManager for internationalized messages.
-
Constructor Summary
Constructors Constructor Description QuotedStringTokenizer(java.lang.String text)Creates a new tokenizer for the given text.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcountTokens()Returns the number of remaining tokens.booleanhasMoreTokens()Returns whether there are more tokens available.java.lang.StringnextToken()Returns the next token from the input text.
-
-
-
Field Detail
-
sm
protected static final StringManager sm
StringManager for internationalized messages.
-
-
Method Detail
-
hasMoreTokens
public boolean hasMoreTokens()
Returns whether there are more tokens available.- Returns:
trueif there are more tokens,falseotherwise
-
nextToken
public java.lang.String nextToken()
Returns the next token from the input text.- Returns:
- the next token
-
countTokens
public int countTokens()
Returns the number of remaining tokens.- Returns:
- the number of tokens that have not yet been returned by
nextToken()
-
-