Class ExtendedAccessLogValve.PatternTokenizer

java.lang.Object
org.apache.catalina.valves.ExtendedAccessLogValve.PatternTokenizer
Enclosing class:
ExtendedAccessLogValve

protected static class ExtendedAccessLogValve.PatternTokenizer extends Object
Tokenizer for parsing the log pattern string.
  • Constructor Details

    • PatternTokenizer

      public PatternTokenizer(String str)
      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:
      true if the last token had a sub-token
    • hasParameter

      public boolean hasParameter()
      Returns whether the last token was followed by a parameter indicator.
      Returns:
      true if the last token had a parameter
    • getToken

      public String getToken() throws IOException
      Returns the next token from the pattern string.
      Returns:
      the next token, or null if no more tokens are available
      Throws:
      IOException - if an I/O error occurs
    • getParameter

      public String getParameter() throws IOException
      Returns the parameter value from the most recent parameter token.
      Returns:
      the parameter value, or null if no parameter is available
      Throws:
      IOException - if an I/O error occurs
    • getWhiteSpaces

      public String getWhiteSpaces() throws IOException
      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:
      true if the end has been reached
    • getRemains

      public String getRemains() throws IOException
      Returns the remaining unparsed portion of the pattern string.
      Returns:
      the remaining characters in the pattern
      Throws:
      IOException - if an I/O error occurs