public final class HeaderParser extends Object
Modifier and Type | Method and Description |
---|---|
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. |
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 . |
static int |
skipWhitespace(String input,
int pos)
Returns the next non-whitespace character in
input that is white
space. |
public static int skipUntil(String input, 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(String input, int pos)
input
that is white
space. Result is undefined if input contains newline characters.public static int parseSeconds(String value, int defaultValue)
value
as a positive integer, or 0 if it is negative, or
defaultValue
if it cannot be parsed.Copyright © 2015. All rights reserved.