Class ExtendedAccessLogValve.PatternTokenizer
java.lang.Object
org.apache.catalina.valves.ExtendedAccessLogValve.PatternTokenizer
- Enclosing class:
ExtendedAccessLogValve
Tokenizer for parsing the log pattern string.
-
Constructor Summary
ConstructorsConstructorDescriptionPatternTokenizer(String str) Creates a new tokenizer for the given pattern string. -
Method Summary
Modifier and TypeMethodDescriptionReturns the parameter value from the most recent parameter token.Returns the remaining unparsed portion of the pattern string.getToken()Returns the next token from the pattern string.Returns any whitespace following the current position.booleanReturns whether the last token was followed by a parameter indicator.booleanReturns whether the last token was followed by a sub-token indicator.booleanisEnded()Returns whether the tokenizer has reached the end of the pattern string.
-
Constructor Details
-
PatternTokenizer
Creates a new tokenizer for the given pattern string.- Parameters:
str- the pattern string to tokenize
-
-
Method Details
-
hasSubToken
public boolean hasSubToken()Returns whether the last token was followed by a sub-token indicator.- Returns:
trueif the last token had a sub-token
-
hasParameter
public boolean hasParameter()Returns whether the last token was followed by a parameter indicator.- Returns:
trueif the last token had a parameter
-
getToken
Returns the next token from the pattern string.- Returns:
- the next token, or
nullif no more tokens are available - Throws:
IOException- if an I/O error occurs
-
getParameter
Returns the parameter value from the most recent parameter token.- Returns:
- the parameter value, or
nullif no parameter is available - Throws:
IOException- if an I/O error occurs
-
getWhiteSpaces
Returns any whitespace following the current position.- Returns:
- the whitespace characters, or an empty string if none
- Throws:
IOException- if an I/O error occurs
-
isEnded
public boolean isEnded()Returns whether the tokenizer has reached the end of the pattern string.- Returns:
trueif the end has been reached
-
getRemains
Returns the remaining unparsed portion of the pattern string.- Returns:
- the remaining characters in the pattern
- Throws:
IOException- if an I/O error occurs
-