# Class QuotedStringTokenizer

java.lang.Object
org.apache.catalina.valves.rewrite.QuotedStringTokenizer

public class QuotedStringTokenizer extends Object
Tokenizer 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 final StringManager`
`sm`
StringManager for internationalized messages.

## Constructor Summary

Constructors
Constructor
Description
`QuotedStringTokenizer(String text)`
Creates a new tokenizer for the given text.

## Method Summary

Modifier and Type
Method
Description
`int`
`countTokens()`
Returns the number of remaining tokens.
`boolean`
`hasMoreTokens()`
Returns whether there are more tokens available.
`String`
`nextToken()`
Returns the next token from the input text.

### Methods inherited from class Object

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

## Field Details

### sm

protected static final StringManager sm
StringManager for internationalized messages.

## Constructor Details

### QuotedStringTokenizer

public QuotedStringTokenizer(String text)
Creates a new tokenizer for the given text.

Parameters:
  `text` - the text to tokenize, or `null` for an empty token list

## Method Details

### hasMoreTokens

public boolean hasMoreTokens()
Returns whether there are more tokens available.

Returns:
  `true` if there are more tokens, `false` otherwise

### nextToken

public 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()`