Class HeaderParser


  • public final class HeaderParser
    extends Object
    • Method Detail

      • skipUntil

        public static int skipUntil​(String input,
                                    int pos,
                                    String characters)
        Returns the next index in input at or after pos that contains a character from characters. Returns the input length if none of the requested characters can be found.
      • skipWhitespace

        public static int skipWhitespace​(String input,
                                         int pos)
        Returns the next non-whitespace character in input that is white space. Result is undefined if input contains newline characters.
      • parseSeconds

        public static int parseSeconds​(String value,
                                       int defaultValue)
        Returns value as a positive integer, or 0 if it is negative, or defaultValue if it cannot be parsed.