public final class HeaderParser extends Object
| Modifier and Type | Method and Description |
|---|---|
static int |
parseSeconds(String
Returns
value as a positive integer, or 0 if it is negative, or
defaultValue if it cannot be parsed.
|
static int |
skipUntil(String
Returns the next index in
input at or after
pos that contains a character from
characters.
|
static int |
skipWhitespace(String
Returns the next non-whitespace character in
input that is white space.
|
public static int skipUntil(Stringinput, int pos, String characters)
input at or after
pos that contains a character from
characters. Returns the input length if none of the requested characters can be found.
public static int skipWhitespace(Stringinput, int pos)
input that is white space. Result is undefined if input contains newline characters.
public static int parseSeconds(Stringvalue, int defaultValue)
value as a positive integer, or 0 if it is negative, or
defaultValue if it cannot be parsed.