Package org.apache.catalina.valves
Class ExtendedAccessLogValve.PatternTokenizer
- java.lang.Object
-
- org.apache.catalina.valves.ExtendedAccessLogValve.PatternTokenizer
-
- Enclosing class:
- ExtendedAccessLogValve
protected static class ExtendedAccessLogValve.PatternTokenizer extends java.lang.ObjectTokenizer for parsing the log pattern string.
-
-
Constructor Summary
Constructors Constructor Description PatternTokenizer(java.lang.String str)Creates a new tokenizer for the given pattern string.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetParameter()Returns the parameter value from the most recent parameter token.java.lang.StringgetRemains()Returns the remaining unparsed portion of the pattern string.java.lang.StringgetToken()Returns the next token from the pattern string.java.lang.StringgetWhiteSpaces()Returns any whitespace following the current position.booleanhasParameter()Returns whether the last token was followed by a parameter indicator.booleanhasSubToken()Returns whether the last token was followed by a sub-token indicator.booleanisEnded()Returns whether the tokenizer has reached the end of the pattern string.
-
-
-
Method Detail
-
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
public java.lang.String getToken() throws java.io.IOExceptionReturns the next token from the pattern string.- Returns:
- the next token, or
nullif no more tokens are available - Throws:
java.io.IOException- if an I/O error occurs
-
getParameter
public java.lang.String getParameter() throws java.io.IOExceptionReturns the parameter value from the most recent parameter token.- Returns:
- the parameter value, or
nullif no parameter is available - Throws:
java.io.IOException- if an I/O error occurs
-
getWhiteSpaces
public java.lang.String getWhiteSpaces() throws java.io.IOExceptionReturns any whitespace following the current position.- Returns:
- the whitespace characters, or an empty string if none
- Throws:
java.io.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
public java.lang.String getRemains() throws java.io.IOExceptionReturns the remaining unparsed portion of the pattern string.- Returns:
- the remaining characters in the pattern
- Throws:
java.io.IOException- if an I/O error occurs
-
-