HeaderParser.java
1.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
package com.squareup.okhttp.internal.http;
public final class HeaderParser
{
public static int parseSeconds(String paramString, int paramInt)
{
try
{
long l = Long.parseLong(paramString);
if (l > 2147483647L) {
return Integer.MAX_VALUE;
}
if (l < 0L) {
return 0;
}
return (int)l;
}
catch (NumberFormatException paramString) {}
return paramInt;
}
public static int skipUntil(String paramString1, int paramInt, String paramString2)
{
while ((paramInt < paramString1.length()) && (paramString2.indexOf(paramString1.charAt(paramInt)) == -1)) {
paramInt += 1;
}
return paramInt;
}
public static int skipWhitespace(String paramString, int paramInt)
{
while (paramInt < paramString.length())
{
int i = paramString.charAt(paramInt);
if ((i != 32) && (i != 9)) {
break;
}
paramInt += 1;
}
return paramInt;
}
}
/* Location: /home/merong/decompile/hackery-dex2jar.jar!/com/squareup/okhttp/internal/http/HeaderParser.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/