Class HeaderParser
- java.lang.Object
-
- com.squareup.okhttp.internal.http.HeaderParser
-
public final class HeaderParser extends Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static intparseSeconds(String value, int defaultValue)Returnsvalueas a positive integer, or 0 if it is negative, ordefaultValueif it cannot be parsed.static intskipUntil(String input, int pos, String characters)Returns the next index ininputat or afterposthat contains a character fromcharacters.static intskipWhitespace(String input, int pos)Returns the next non-whitespace character ininputthat is white space.
-
-
-
Method Detail
-
skipUntil
public static int skipUntil(String input, int pos, String characters)
Returns the next index ininputat or afterposthat contains a character fromcharacters. 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 ininputthat is white space. Result is undefined if input contains newline characters.
-
parseSeconds
public static int parseSeconds(String value, int defaultValue)
Returnsvalueas a positive integer, or 0 if it is negative, ordefaultValueif it cannot be parsed.
-
-