1561 lines
31 KiB
Smali
1561 lines
31 KiB
Smali
.class public final Lokhttp3/internal/Util;
|
|
.super Ljava/lang/Object;
|
|
.source "Util.java"
|
|
|
|
|
|
# static fields
|
|
.field public static final EMPTY_BYTE_ARRAY:[B
|
|
|
|
.field public static final EMPTY_REQUEST:Lokhttp3/RequestBody;
|
|
|
|
.field public static final EMPTY_RESPONSE:Lokhttp3/ResponseBody;
|
|
|
|
.field public static final EMPTY_STRING_ARRAY:[Ljava/lang/String;
|
|
|
|
.field public static final NATURAL_ORDER:Ljava/util/Comparator;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Ljava/util/Comparator<",
|
|
"Ljava/lang/String;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field public static final UTC:Ljava/util/TimeZone;
|
|
|
|
.field private static final UTF_16_BE:Ljava/nio/charset/Charset;
|
|
|
|
.field private static final UTF_16_BE_BOM:Lokio/ByteString;
|
|
|
|
.field private static final UTF_16_LE:Ljava/nio/charset/Charset;
|
|
|
|
.field private static final UTF_16_LE_BOM:Lokio/ByteString;
|
|
|
|
.field private static final UTF_32_BE:Ljava/nio/charset/Charset;
|
|
|
|
.field private static final UTF_32_BE_BOM:Lokio/ByteString;
|
|
|
|
.field private static final UTF_32_LE:Ljava/nio/charset/Charset;
|
|
|
|
.field private static final UTF_32_LE_BOM:Lokio/ByteString;
|
|
|
|
.field public static final UTF_8:Ljava/nio/charset/Charset;
|
|
|
|
.field private static final UTF_8_BOM:Lokio/ByteString;
|
|
|
|
.field private static final VERIFY_AS_IP_ADDRESS:Ljava/util/regex/Pattern;
|
|
|
|
|
|
# direct methods
|
|
.method static constructor <clinit>()V
|
|
.locals 3
|
|
|
|
const/4 v0, 0x0
|
|
|
|
new-array v1, v0, [B
|
|
|
|
.line 45
|
|
sput-object v1, Lokhttp3/internal/Util;->EMPTY_BYTE_ARRAY:[B
|
|
|
|
new-array v0, v0, [Ljava/lang/String;
|
|
|
|
.line 46
|
|
sput-object v0, Lokhttp3/internal/Util;->EMPTY_STRING_ARRAY:[Ljava/lang/String;
|
|
|
|
const/4 v0, 0x0
|
|
|
|
.line 48
|
|
invoke-static {v0, v1}, Lokhttp3/ResponseBody;->create(Lokhttp3/MediaType;[B)Lokhttp3/ResponseBody;
|
|
|
|
move-result-object v2
|
|
|
|
sput-object v2, Lokhttp3/internal/Util;->EMPTY_RESPONSE:Lokhttp3/ResponseBody;
|
|
|
|
.line 49
|
|
invoke-static {v0, v1}, Lokhttp3/RequestBody;->create(Lokhttp3/MediaType;[B)Lokhttp3/RequestBody;
|
|
|
|
move-result-object v0
|
|
|
|
sput-object v0, Lokhttp3/internal/Util;->EMPTY_REQUEST:Lokhttp3/RequestBody;
|
|
|
|
const-string v0, "efbbbf"
|
|
|
|
.line 51
|
|
invoke-static {v0}, Lokio/ByteString;->decodeHex(Ljava/lang/String;)Lokio/ByteString;
|
|
|
|
move-result-object v0
|
|
|
|
sput-object v0, Lokhttp3/internal/Util;->UTF_8_BOM:Lokio/ByteString;
|
|
|
|
const-string v0, "feff"
|
|
|
|
.line 52
|
|
invoke-static {v0}, Lokio/ByteString;->decodeHex(Ljava/lang/String;)Lokio/ByteString;
|
|
|
|
move-result-object v0
|
|
|
|
sput-object v0, Lokhttp3/internal/Util;->UTF_16_BE_BOM:Lokio/ByteString;
|
|
|
|
const-string v0, "fffe"
|
|
|
|
.line 53
|
|
invoke-static {v0}, Lokio/ByteString;->decodeHex(Ljava/lang/String;)Lokio/ByteString;
|
|
|
|
move-result-object v0
|
|
|
|
sput-object v0, Lokhttp3/internal/Util;->UTF_16_LE_BOM:Lokio/ByteString;
|
|
|
|
const-string v0, "0000ffff"
|
|
|
|
.line 54
|
|
invoke-static {v0}, Lokio/ByteString;->decodeHex(Ljava/lang/String;)Lokio/ByteString;
|
|
|
|
move-result-object v0
|
|
|
|
sput-object v0, Lokhttp3/internal/Util;->UTF_32_BE_BOM:Lokio/ByteString;
|
|
|
|
const-string v0, "ffff0000"
|
|
|
|
.line 55
|
|
invoke-static {v0}, Lokio/ByteString;->decodeHex(Ljava/lang/String;)Lokio/ByteString;
|
|
|
|
move-result-object v0
|
|
|
|
sput-object v0, Lokhttp3/internal/Util;->UTF_32_LE_BOM:Lokio/ByteString;
|
|
|
|
const-string v0, "UTF-8"
|
|
|
|
.line 57
|
|
invoke-static {v0}, Ljava/nio/charset/Charset;->forName(Ljava/lang/String;)Ljava/nio/charset/Charset;
|
|
|
|
move-result-object v0
|
|
|
|
sput-object v0, Lokhttp3/internal/Util;->UTF_8:Ljava/nio/charset/Charset;
|
|
|
|
const-string v0, "UTF-16BE"
|
|
|
|
.line 58
|
|
invoke-static {v0}, Ljava/nio/charset/Charset;->forName(Ljava/lang/String;)Ljava/nio/charset/Charset;
|
|
|
|
move-result-object v0
|
|
|
|
sput-object v0, Lokhttp3/internal/Util;->UTF_16_BE:Ljava/nio/charset/Charset;
|
|
|
|
const-string v0, "UTF-16LE"
|
|
|
|
.line 59
|
|
invoke-static {v0}, Ljava/nio/charset/Charset;->forName(Ljava/lang/String;)Ljava/nio/charset/Charset;
|
|
|
|
move-result-object v0
|
|
|
|
sput-object v0, Lokhttp3/internal/Util;->UTF_16_LE:Ljava/nio/charset/Charset;
|
|
|
|
const-string v0, "UTF-32BE"
|
|
|
|
.line 60
|
|
invoke-static {v0}, Ljava/nio/charset/Charset;->forName(Ljava/lang/String;)Ljava/nio/charset/Charset;
|
|
|
|
move-result-object v0
|
|
|
|
sput-object v0, Lokhttp3/internal/Util;->UTF_32_BE:Ljava/nio/charset/Charset;
|
|
|
|
const-string v0, "UTF-32LE"
|
|
|
|
.line 61
|
|
invoke-static {v0}, Ljava/nio/charset/Charset;->forName(Ljava/lang/String;)Ljava/nio/charset/Charset;
|
|
|
|
move-result-object v0
|
|
|
|
sput-object v0, Lokhttp3/internal/Util;->UTF_32_LE:Ljava/nio/charset/Charset;
|
|
|
|
const-string v0, "GMT"
|
|
|
|
.line 64
|
|
invoke-static {v0}, Ljava/util/TimeZone;->getTimeZone(Ljava/lang/String;)Ljava/util/TimeZone;
|
|
|
|
move-result-object v0
|
|
|
|
sput-object v0, Lokhttp3/internal/Util;->UTC:Ljava/util/TimeZone;
|
|
|
|
.line 66
|
|
new-instance v0, Lokhttp3/internal/Util$1;
|
|
|
|
invoke-direct {v0}, Lokhttp3/internal/Util$1;-><init>()V
|
|
|
|
sput-object v0, Lokhttp3/internal/Util;->NATURAL_ORDER:Ljava/util/Comparator;
|
|
|
|
const-string v0, "([0-9a-fA-F]*:[0-9a-fA-F:.]*)|([\\d.]+)"
|
|
|
|
.line 82
|
|
invoke-static {v0}, Ljava/util/regex/Pattern;->compile(Ljava/lang/String;)Ljava/util/regex/Pattern;
|
|
|
|
move-result-object v0
|
|
|
|
sput-object v0, Lokhttp3/internal/Util;->VERIFY_AS_IP_ADDRESS:Ljava/util/regex/Pattern;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private constructor <init>()V
|
|
.locals 0
|
|
|
|
.line 85
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static bomAwareCharset(Lokio/BufferedSource;Ljava/nio/charset/Charset;)Ljava/nio/charset/Charset;
|
|
.locals 4
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
.line 431
|
|
sget-object v0, Lokhttp3/internal/Util;->UTF_8_BOM:Lokio/ByteString;
|
|
|
|
const-wide/16 v1, 0x0
|
|
|
|
invoke-interface {p0, v1, v2, v0}, Lokio/BufferedSource;->rangeEquals(JLokio/ByteString;)Z
|
|
|
|
move-result v3
|
|
|
|
if-eqz v3, :cond_0
|
|
|
|
.line 432
|
|
invoke-virtual {v0}, Lokio/ByteString;->size()I
|
|
|
|
move-result p1
|
|
|
|
int-to-long v0, p1
|
|
|
|
invoke-interface {p0, v0, v1}, Lokio/BufferedSource;->skip(J)V
|
|
|
|
.line 433
|
|
sget-object p0, Lokhttp3/internal/Util;->UTF_8:Ljava/nio/charset/Charset;
|
|
|
|
return-object p0
|
|
|
|
.line 435
|
|
:cond_0
|
|
sget-object v0, Lokhttp3/internal/Util;->UTF_16_BE_BOM:Lokio/ByteString;
|
|
|
|
invoke-interface {p0, v1, v2, v0}, Lokio/BufferedSource;->rangeEquals(JLokio/ByteString;)Z
|
|
|
|
move-result v3
|
|
|
|
if-eqz v3, :cond_1
|
|
|
|
.line 436
|
|
invoke-virtual {v0}, Lokio/ByteString;->size()I
|
|
|
|
move-result p1
|
|
|
|
int-to-long v0, p1
|
|
|
|
invoke-interface {p0, v0, v1}, Lokio/BufferedSource;->skip(J)V
|
|
|
|
.line 437
|
|
sget-object p0, Lokhttp3/internal/Util;->UTF_16_BE:Ljava/nio/charset/Charset;
|
|
|
|
return-object p0
|
|
|
|
.line 439
|
|
:cond_1
|
|
sget-object v0, Lokhttp3/internal/Util;->UTF_16_LE_BOM:Lokio/ByteString;
|
|
|
|
invoke-interface {p0, v1, v2, v0}, Lokio/BufferedSource;->rangeEquals(JLokio/ByteString;)Z
|
|
|
|
move-result v3
|
|
|
|
if-eqz v3, :cond_2
|
|
|
|
.line 440
|
|
invoke-virtual {v0}, Lokio/ByteString;->size()I
|
|
|
|
move-result p1
|
|
|
|
int-to-long v0, p1
|
|
|
|
invoke-interface {p0, v0, v1}, Lokio/BufferedSource;->skip(J)V
|
|
|
|
.line 441
|
|
sget-object p0, Lokhttp3/internal/Util;->UTF_16_LE:Ljava/nio/charset/Charset;
|
|
|
|
return-object p0
|
|
|
|
.line 443
|
|
:cond_2
|
|
sget-object v0, Lokhttp3/internal/Util;->UTF_32_BE_BOM:Lokio/ByteString;
|
|
|
|
invoke-interface {p0, v1, v2, v0}, Lokio/BufferedSource;->rangeEquals(JLokio/ByteString;)Z
|
|
|
|
move-result v3
|
|
|
|
if-eqz v3, :cond_3
|
|
|
|
.line 444
|
|
invoke-virtual {v0}, Lokio/ByteString;->size()I
|
|
|
|
move-result p1
|
|
|
|
int-to-long v0, p1
|
|
|
|
invoke-interface {p0, v0, v1}, Lokio/BufferedSource;->skip(J)V
|
|
|
|
.line 445
|
|
sget-object p0, Lokhttp3/internal/Util;->UTF_32_BE:Ljava/nio/charset/Charset;
|
|
|
|
return-object p0
|
|
|
|
.line 447
|
|
:cond_3
|
|
sget-object v0, Lokhttp3/internal/Util;->UTF_32_LE_BOM:Lokio/ByteString;
|
|
|
|
invoke-interface {p0, v1, v2, v0}, Lokio/BufferedSource;->rangeEquals(JLokio/ByteString;)Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_4
|
|
|
|
.line 448
|
|
invoke-virtual {v0}, Lokio/ByteString;->size()I
|
|
|
|
move-result p1
|
|
|
|
int-to-long v0, p1
|
|
|
|
invoke-interface {p0, v0, v1}, Lokio/BufferedSource;->skip(J)V
|
|
|
|
.line 449
|
|
sget-object p0, Lokhttp3/internal/Util;->UTF_32_LE:Ljava/nio/charset/Charset;
|
|
|
|
return-object p0
|
|
|
|
:cond_4
|
|
return-object p1
|
|
.end method
|
|
|
|
.method public static checkOffsetAndCount(JJJ)V
|
|
.locals 4
|
|
|
|
or-long v0, p2, p4
|
|
|
|
const-wide/16 v2, 0x0
|
|
|
|
cmp-long v0, v0, v2
|
|
|
|
if-ltz v0, :cond_0
|
|
|
|
cmp-long v0, p2, p0
|
|
|
|
if-gtz v0, :cond_0
|
|
|
|
sub-long/2addr p0, p2
|
|
|
|
cmp-long p0, p0, p4
|
|
|
|
if-ltz p0, :cond_0
|
|
|
|
return-void
|
|
|
|
.line 90
|
|
:cond_0
|
|
new-instance p0, Ljava/lang/ArrayIndexOutOfBoundsException;
|
|
|
|
invoke-direct {p0}, Ljava/lang/ArrayIndexOutOfBoundsException;-><init>()V
|
|
|
|
throw p0
|
|
.end method
|
|
|
|
.method public static closeQuietly(Ljava/io/Closeable;)V
|
|
.locals 0
|
|
|
|
if-eqz p0, :cond_0
|
|
|
|
.line 106
|
|
:try_start_0
|
|
invoke-interface {p0}, Ljava/io/Closeable;->close()V
|
|
:try_end_0
|
|
.catch Ljava/lang/RuntimeException; {:try_start_0 .. :try_end_0} :catch_0
|
|
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_1
|
|
|
|
goto :goto_0
|
|
|
|
:catch_0
|
|
move-exception p0
|
|
|
|
.line 108
|
|
throw p0
|
|
|
|
:catch_1
|
|
:cond_0
|
|
:goto_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public static closeQuietly(Ljava/net/ServerSocket;)V
|
|
.locals 0
|
|
|
|
if-eqz p0, :cond_0
|
|
|
|
.line 138
|
|
:try_start_0
|
|
invoke-virtual {p0}, Ljava/net/ServerSocket;->close()V
|
|
:try_end_0
|
|
.catch Ljava/lang/RuntimeException; {:try_start_0 .. :try_end_0} :catch_0
|
|
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_1
|
|
|
|
goto :goto_0
|
|
|
|
:catch_0
|
|
move-exception p0
|
|
|
|
.line 140
|
|
throw p0
|
|
|
|
:catch_1
|
|
:cond_0
|
|
:goto_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public static closeQuietly(Ljava/net/Socket;)V
|
|
.locals 1
|
|
|
|
if-eqz p0, :cond_1
|
|
|
|
.line 121
|
|
:try_start_0
|
|
invoke-virtual {p0}, Ljava/net/Socket;->close()V
|
|
:try_end_0
|
|
.catch Ljava/lang/AssertionError; {:try_start_0 .. :try_end_0} :catch_1
|
|
.catch Ljava/lang/RuntimeException; {:try_start_0 .. :try_end_0} :catch_0
|
|
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_2
|
|
|
|
goto :goto_0
|
|
|
|
:catch_0
|
|
move-exception p0
|
|
|
|
.line 125
|
|
throw p0
|
|
|
|
:catch_1
|
|
move-exception p0
|
|
|
|
.line 123
|
|
invoke-static {p0}, Lokhttp3/internal/Util;->isAndroidGetsocknameError(Ljava/lang/AssertionError;)Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
throw p0
|
|
|
|
:catch_2
|
|
:cond_1
|
|
:goto_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public static concat([Ljava/lang/String;Ljava/lang/String;)[Ljava/lang/String;
|
|
.locals 4
|
|
|
|
.line 289
|
|
array-length v0, p0
|
|
|
|
add-int/lit8 v0, v0, 0x1
|
|
|
|
new-array v1, v0, [Ljava/lang/String;
|
|
|
|
.line 290
|
|
array-length v2, p0
|
|
|
|
const/4 v3, 0x0
|
|
|
|
invoke-static {p0, v3, v1, v3, v2}, Ljava/lang/System;->arraycopy(Ljava/lang/Object;ILjava/lang/Object;II)V
|
|
|
|
add-int/lit8 v0, v0, -0x1
|
|
|
|
.line 291
|
|
aput-object p1, v1, v0
|
|
|
|
return-object v1
|
|
.end method
|
|
|
|
.method private static containsInvalidHostnameAsciiCodes(Ljava/lang/String;)Z
|
|
.locals 5
|
|
|
|
const/4 v0, 0x0
|
|
|
|
move v1, v0
|
|
|
|
.line 387
|
|
:goto_0
|
|
invoke-virtual {p0}, Ljava/lang/String;->length()I
|
|
|
|
move-result v2
|
|
|
|
if-ge v1, v2, :cond_3
|
|
|
|
.line 388
|
|
invoke-virtual {p0, v1}, Ljava/lang/String;->charAt(I)C
|
|
|
|
move-result v2
|
|
|
|
const/16 v3, 0x1f
|
|
|
|
const/4 v4, 0x1
|
|
|
|
if-le v2, v3, :cond_2
|
|
|
|
const/16 v3, 0x7f
|
|
|
|
if-lt v2, v3, :cond_0
|
|
|
|
goto :goto_1
|
|
|
|
:cond_0
|
|
const-string v3, " #%/:?@[\\]"
|
|
|
|
.line 398
|
|
invoke-virtual {v3, v2}, Ljava/lang/String;->indexOf(I)I
|
|
|
|
move-result v2
|
|
|
|
const/4 v3, -0x1
|
|
|
|
if-eq v2, v3, :cond_1
|
|
|
|
return v4
|
|
|
|
:cond_1
|
|
add-int/lit8 v1, v1, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_2
|
|
:goto_1
|
|
return v4
|
|
|
|
:cond_3
|
|
return v0
|
|
.end method
|
|
|
|
.method public static delimiterOffset(Ljava/lang/String;IIC)I
|
|
.locals 1
|
|
|
|
:goto_0
|
|
if-ge p1, p2, :cond_1
|
|
|
|
.line 359
|
|
invoke-virtual {p0, p1}, Ljava/lang/String;->charAt(I)C
|
|
|
|
move-result v0
|
|
|
|
if-ne v0, p3, :cond_0
|
|
|
|
return p1
|
|
|
|
:cond_0
|
|
add-int/lit8 p1, p1, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
return p2
|
|
.end method
|
|
|
|
.method public static delimiterOffset(Ljava/lang/String;IILjava/lang/String;)I
|
|
.locals 2
|
|
|
|
:goto_0
|
|
if-ge p1, p2, :cond_1
|
|
|
|
.line 348
|
|
invoke-virtual {p0, p1}, Ljava/lang/String;->charAt(I)C
|
|
|
|
move-result v0
|
|
|
|
invoke-virtual {p3, v0}, Ljava/lang/String;->indexOf(I)I
|
|
|
|
move-result v0
|
|
|
|
const/4 v1, -0x1
|
|
|
|
if-eq v0, v1, :cond_0
|
|
|
|
return p1
|
|
|
|
:cond_0
|
|
add-int/lit8 p1, p1, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
return p2
|
|
.end method
|
|
|
|
.method public static discard(Lokio/Source;ILjava/util/concurrent/TimeUnit;)Z
|
|
.locals 0
|
|
|
|
.line 153
|
|
:try_start_0
|
|
invoke-static {p0, p1, p2}, Lokhttp3/internal/Util;->skipAll(Lokio/Source;ILjava/util/concurrent/TimeUnit;)Z
|
|
|
|
move-result p0
|
|
:try_end_0
|
|
.catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
return p0
|
|
|
|
:catch_0
|
|
const/4 p0, 0x0
|
|
|
|
return p0
|
|
.end method
|
|
|
|
.method public static domainToAscii(Ljava/lang/String;)Ljava/lang/String;
|
|
.locals 2
|
|
|
|
const/4 v0, 0x0
|
|
|
|
.line 372
|
|
:try_start_0
|
|
invoke-static {p0}, Ljava/net/IDN;->toASCII(Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
sget-object v1, Ljava/util/Locale;->US:Ljava/util/Locale;
|
|
|
|
invoke-virtual {p0, v1}, Ljava/lang/String;->toLowerCase(Ljava/util/Locale;)Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
.line 373
|
|
invoke-virtual {p0}, Ljava/lang/String;->isEmpty()Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
return-object v0
|
|
|
|
.line 376
|
|
:cond_0
|
|
invoke-static {p0}, Lokhttp3/internal/Util;->containsInvalidHostnameAsciiCodes(Ljava/lang/String;)Z
|
|
|
|
move-result v1
|
|
:try_end_0
|
|
.catch Ljava/lang/IllegalArgumentException; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
if-eqz v1, :cond_1
|
|
|
|
return-object v0
|
|
|
|
:cond_1
|
|
return-object p0
|
|
|
|
:catch_0
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public static equal(Ljava/lang/Object;Ljava/lang/Object;)Z
|
|
.locals 0
|
|
|
|
if-eq p0, p1, :cond_1
|
|
|
|
if-eqz p0, :cond_0
|
|
|
|
.line 96
|
|
invoke-virtual {p0, p1}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result p0
|
|
|
|
if-eqz p0, :cond_0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 p0, 0x0
|
|
|
|
goto :goto_1
|
|
|
|
:cond_1
|
|
:goto_0
|
|
const/4 p0, 0x1
|
|
|
|
:goto_1
|
|
return p0
|
|
.end method
|
|
|
|
.method public static varargs format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
|
|
.locals 1
|
|
|
|
.line 427
|
|
sget-object v0, Ljava/util/Locale;->US:Ljava/util/Locale;
|
|
|
|
invoke-static {v0, p0, p1}, Ljava/lang/String;->format(Ljava/util/Locale;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static hostHeader(Lokhttp3/HttpUrl;Z)Ljava/lang/String;
|
|
.locals 3
|
|
|
|
.line 247
|
|
invoke-virtual {p0}, Lokhttp3/HttpUrl;->host()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
const-string v1, ":"
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
.line 248
|
|
new-instance v0, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v2, "["
|
|
|
|
invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {p0}, Lokhttp3/HttpUrl;->host()Ljava/lang/String;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
move-result-object v0
|
|
|
|
const-string v2, "]"
|
|
|
|
invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
goto :goto_0
|
|
|
|
.line 249
|
|
:cond_0
|
|
invoke-virtual {p0}, Lokhttp3/HttpUrl;->host()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
:goto_0
|
|
if-nez p1, :cond_1
|
|
|
|
.line 250
|
|
invoke-virtual {p0}, Lokhttp3/HttpUrl;->port()I
|
|
|
|
move-result p1
|
|
|
|
invoke-virtual {p0}, Lokhttp3/HttpUrl;->scheme()Ljava/lang/String;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-static {v2}, Lokhttp3/HttpUrl;->defaultPort(Ljava/lang/String;)I
|
|
|
|
move-result v2
|
|
|
|
if-eq p1, v2, :cond_2
|
|
|
|
.line 251
|
|
:cond_1
|
|
new-instance p1, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {p1}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
invoke-virtual {p1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p1, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p0}, Lokhttp3/HttpUrl;->port()I
|
|
|
|
move-result p0
|
|
|
|
invoke-virtual {p1, p0}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-virtual {p0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
:cond_2
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public static immutableList(Ljava/util/List;)Ljava/util/List;
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"<T:",
|
|
"Ljava/lang/Object;",
|
|
">(",
|
|
"Ljava/util/List<",
|
|
"TT;>;)",
|
|
"Ljava/util/List<",
|
|
"TT;>;"
|
|
}
|
|
.end annotation
|
|
|
|
.line 188
|
|
new-instance v0, Ljava/util/ArrayList;
|
|
|
|
invoke-direct {v0, p0}, Ljava/util/ArrayList;-><init>(Ljava/util/Collection;)V
|
|
|
|
invoke-static {v0}, Ljava/util/Collections;->unmodifiableList(Ljava/util/List;)Ljava/util/List;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static varargs immutableList([Ljava/lang/Object;)Ljava/util/List;
|
|
.locals 0
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"<T:",
|
|
"Ljava/lang/Object;",
|
|
">([TT;)",
|
|
"Ljava/util/List<",
|
|
"TT;>;"
|
|
}
|
|
.end annotation
|
|
|
|
.line 193
|
|
invoke-virtual {p0}, [Ljava/lang/Object;->clone()Ljava/lang/Object;
|
|
|
|
move-result-object p0
|
|
|
|
check-cast p0, [Ljava/lang/Object;
|
|
|
|
invoke-static {p0}, Ljava/util/Arrays;->asList([Ljava/lang/Object;)Ljava/util/List;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-static {p0}, Ljava/util/Collections;->unmodifiableList(Ljava/util/List;)Ljava/util/List;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static indexOf(Ljava/util/Comparator;[Ljava/lang/String;Ljava/lang/String;)I
|
|
.locals 3
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Ljava/util/Comparator<",
|
|
"Ljava/lang/String;",
|
|
">;[",
|
|
"Ljava/lang/String;",
|
|
"Ljava/lang/String;",
|
|
")I"
|
|
}
|
|
.end annotation
|
|
|
|
.line 282
|
|
array-length v0, p1
|
|
|
|
const/4 v1, 0x0
|
|
|
|
:goto_0
|
|
if-ge v1, v0, :cond_1
|
|
|
|
.line 283
|
|
aget-object v2, p1, v1
|
|
|
|
invoke-interface {p0, v2, p2}, Ljava/util/Comparator;->compare(Ljava/lang/Object;Ljava/lang/Object;)I
|
|
|
|
move-result v2
|
|
|
|
if-nez v2, :cond_0
|
|
|
|
return v1
|
|
|
|
:cond_0
|
|
add-int/lit8 v1, v1, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
const/4 p0, -0x1
|
|
|
|
return p0
|
|
.end method
|
|
|
|
.method public static indexOfControlOrNonAscii(Ljava/lang/String;)I
|
|
.locals 4
|
|
|
|
.line 411
|
|
invoke-virtual {p0}, Ljava/lang/String;->length()I
|
|
|
|
move-result v0
|
|
|
|
const/4 v1, 0x0
|
|
|
|
:goto_0
|
|
if-ge v1, v0, :cond_2
|
|
|
|
.line 412
|
|
invoke-virtual {p0, v1}, Ljava/lang/String;->charAt(I)C
|
|
|
|
move-result v2
|
|
|
|
const/16 v3, 0x1f
|
|
|
|
if-le v2, v3, :cond_1
|
|
|
|
const/16 v3, 0x7f
|
|
|
|
if-lt v2, v3, :cond_0
|
|
|
|
goto :goto_1
|
|
|
|
:cond_0
|
|
add-int/lit8 v1, v1, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
:goto_1
|
|
return v1
|
|
|
|
:cond_2
|
|
const/4 p0, -0x1
|
|
|
|
return p0
|
|
.end method
|
|
|
|
.method public static intersect(Ljava/util/Comparator;[Ljava/lang/String;[Ljava/lang/String;)[Ljava/lang/String;
|
|
.locals 8
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Ljava/util/Comparator<",
|
|
"-",
|
|
"Ljava/lang/String;",
|
|
">;[",
|
|
"Ljava/lang/String;",
|
|
"[",
|
|
"Ljava/lang/String;",
|
|
")[",
|
|
"Ljava/lang/String;"
|
|
}
|
|
.end annotation
|
|
|
|
.line 213
|
|
new-instance v0, Ljava/util/ArrayList;
|
|
|
|
invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V
|
|
|
|
.line 214
|
|
array-length v1, p1
|
|
|
|
const/4 v2, 0x0
|
|
|
|
move v3, v2
|
|
|
|
:goto_0
|
|
if-ge v3, v1, :cond_2
|
|
|
|
aget-object v4, p1, v3
|
|
|
|
.line 215
|
|
array-length v5, p2
|
|
|
|
move v6, v2
|
|
|
|
:goto_1
|
|
if-ge v6, v5, :cond_1
|
|
|
|
aget-object v7, p2, v6
|
|
|
|
.line 216
|
|
invoke-interface {p0, v4, v7}, Ljava/util/Comparator;->compare(Ljava/lang/Object;Ljava/lang/Object;)I
|
|
|
|
move-result v7
|
|
|
|
if-nez v7, :cond_0
|
|
|
|
.line 217
|
|
invoke-interface {v0, v4}, Ljava/util/List;->add(Ljava/lang/Object;)Z
|
|
|
|
goto :goto_2
|
|
|
|
:cond_0
|
|
add-int/lit8 v6, v6, 0x1
|
|
|
|
goto :goto_1
|
|
|
|
:cond_1
|
|
:goto_2
|
|
add-int/lit8 v3, v3, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
.line 222
|
|
:cond_2
|
|
invoke-interface {v0}, Ljava/util/List;->size()I
|
|
|
|
move-result p0
|
|
|
|
new-array p0, p0, [Ljava/lang/String;
|
|
|
|
invoke-interface {v0, p0}, Ljava/util/List;->toArray([Ljava/lang/Object;)[Ljava/lang/Object;
|
|
|
|
move-result-object p0
|
|
|
|
check-cast p0, [Ljava/lang/String;
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static isAndroidGetsocknameError(Ljava/lang/AssertionError;)Z
|
|
.locals 1
|
|
|
|
.line 277
|
|
invoke-virtual {p0}, Ljava/lang/AssertionError;->getCause()Ljava/lang/Throwable;
|
|
|
|
move-result-object v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
invoke-virtual {p0}, Ljava/lang/AssertionError;->getMessage()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
.line 278
|
|
invoke-virtual {p0}, Ljava/lang/AssertionError;->getMessage()Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
const-string v0, "getsockname failed"
|
|
|
|
invoke-virtual {p0, v0}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
|
|
|
|
move-result p0
|
|
|
|
if-eqz p0, :cond_0
|
|
|
|
const/4 p0, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 p0, 0x0
|
|
|
|
:goto_0
|
|
return p0
|
|
.end method
|
|
|
|
.method public static nonEmptyIntersection(Ljava/util/Comparator;[Ljava/lang/String;[Ljava/lang/String;)Z
|
|
.locals 7
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Ljava/util/Comparator<",
|
|
"Ljava/lang/String;",
|
|
">;[",
|
|
"Ljava/lang/String;",
|
|
"[",
|
|
"Ljava/lang/String;",
|
|
")Z"
|
|
}
|
|
.end annotation
|
|
|
|
const/4 v0, 0x0
|
|
|
|
if-eqz p1, :cond_3
|
|
|
|
if-eqz p2, :cond_3
|
|
|
|
.line 233
|
|
array-length v1, p1
|
|
|
|
if-eqz v1, :cond_3
|
|
|
|
array-length v1, p2
|
|
|
|
if-nez v1, :cond_0
|
|
|
|
goto :goto_2
|
|
|
|
.line 236
|
|
:cond_0
|
|
array-length v1, p1
|
|
|
|
move v2, v0
|
|
|
|
:goto_0
|
|
if-ge v2, v1, :cond_3
|
|
|
|
aget-object v3, p1, v2
|
|
|
|
.line 237
|
|
array-length v4, p2
|
|
|
|
move v5, v0
|
|
|
|
:goto_1
|
|
if-ge v5, v4, :cond_2
|
|
|
|
aget-object v6, p2, v5
|
|
|
|
.line 238
|
|
invoke-interface {p0, v3, v6}, Ljava/util/Comparator;->compare(Ljava/lang/Object;Ljava/lang/Object;)I
|
|
|
|
move-result v6
|
|
|
|
if-nez v6, :cond_1
|
|
|
|
const/4 p0, 0x1
|
|
|
|
return p0
|
|
|
|
:cond_1
|
|
add-int/lit8 v5, v5, 0x1
|
|
|
|
goto :goto_1
|
|
|
|
:cond_2
|
|
add-int/lit8 v2, v2, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_3
|
|
:goto_2
|
|
return v0
|
|
.end method
|
|
|
|
.method public static skipAll(Lokio/Source;ILjava/util/concurrent/TimeUnit;)Z
|
|
.locals 11
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
.line 164
|
|
invoke-static {}, Ljava/lang/System;->nanoTime()J
|
|
|
|
move-result-wide v0
|
|
|
|
.line 165
|
|
invoke-interface {p0}, Lokio/Source;->timeout()Lokio/Timeout;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v2}, Lokio/Timeout;->hasDeadline()Z
|
|
|
|
move-result v2
|
|
|
|
const-wide v3, 0x7fffffffffffffffL
|
|
|
|
if-eqz v2, :cond_0
|
|
|
|
.line 166
|
|
invoke-interface {p0}, Lokio/Source;->timeout()Lokio/Timeout;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v2}, Lokio/Timeout;->deadlineNanoTime()J
|
|
|
|
move-result-wide v5
|
|
|
|
sub-long/2addr v5, v0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
move-wide v5, v3
|
|
|
|
.line 168
|
|
:goto_0
|
|
invoke-interface {p0}, Lokio/Source;->timeout()Lokio/Timeout;
|
|
|
|
move-result-object v2
|
|
|
|
int-to-long v7, p1
|
|
|
|
invoke-virtual {p2, v7, v8}, Ljava/util/concurrent/TimeUnit;->toNanos(J)J
|
|
|
|
move-result-wide p1
|
|
|
|
invoke-static {v5, v6, p1, p2}, Ljava/lang/Math;->min(JJ)J
|
|
|
|
move-result-wide p1
|
|
|
|
add-long/2addr p1, v0
|
|
|
|
invoke-virtual {v2, p1, p2}, Lokio/Timeout;->deadlineNanoTime(J)Lokio/Timeout;
|
|
|
|
.line 170
|
|
:try_start_0
|
|
new-instance p1, Lokio/Buffer;
|
|
|
|
invoke-direct {p1}, Lokio/Buffer;-><init>()V
|
|
|
|
:goto_1
|
|
const-wide/16 v7, 0x2000
|
|
|
|
.line 171
|
|
invoke-interface {p0, p1, v7, v8}, Lokio/Source;->read(Lokio/Buffer;J)J
|
|
|
|
move-result-wide v7
|
|
|
|
const-wide/16 v9, -0x1
|
|
|
|
cmp-long p2, v7, v9
|
|
|
|
if-eqz p2, :cond_1
|
|
|
|
.line 172
|
|
invoke-virtual {p1}, Lokio/Buffer;->clear()V
|
|
:try_end_0
|
|
.catch Ljava/io/InterruptedIOException; {:try_start_0 .. :try_end_0} :catch_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
goto :goto_1
|
|
|
|
:cond_1
|
|
const/4 p1, 0x1
|
|
|
|
cmp-long p2, v5, v3
|
|
|
|
if-nez p2, :cond_2
|
|
|
|
.line 179
|
|
invoke-interface {p0}, Lokio/Source;->timeout()Lokio/Timeout;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-virtual {p0}, Lokio/Timeout;->clearDeadline()Lokio/Timeout;
|
|
|
|
goto :goto_2
|
|
|
|
.line 181
|
|
:cond_2
|
|
invoke-interface {p0}, Lokio/Source;->timeout()Lokio/Timeout;
|
|
|
|
move-result-object p0
|
|
|
|
add-long/2addr v0, v5
|
|
|
|
invoke-virtual {p0, v0, v1}, Lokio/Timeout;->deadlineNanoTime(J)Lokio/Timeout;
|
|
|
|
:goto_2
|
|
return p1
|
|
|
|
:catchall_0
|
|
move-exception p1
|
|
|
|
cmp-long p2, v5, v3
|
|
|
|
if-nez p2, :cond_3
|
|
|
|
.line 179
|
|
invoke-interface {p0}, Lokio/Source;->timeout()Lokio/Timeout;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-virtual {p0}, Lokio/Timeout;->clearDeadline()Lokio/Timeout;
|
|
|
|
goto :goto_3
|
|
|
|
.line 181
|
|
:cond_3
|
|
invoke-interface {p0}, Lokio/Source;->timeout()Lokio/Timeout;
|
|
|
|
move-result-object p0
|
|
|
|
add-long/2addr v0, v5
|
|
|
|
invoke-virtual {p0, v0, v1}, Lokio/Timeout;->deadlineNanoTime(J)Lokio/Timeout;
|
|
|
|
:goto_3
|
|
throw p1
|
|
|
|
:catch_0
|
|
const/4 p1, 0x0
|
|
|
|
cmp-long p2, v5, v3
|
|
|
|
if-nez p2, :cond_4
|
|
|
|
.line 179
|
|
invoke-interface {p0}, Lokio/Source;->timeout()Lokio/Timeout;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-virtual {p0}, Lokio/Timeout;->clearDeadline()Lokio/Timeout;
|
|
|
|
goto :goto_4
|
|
|
|
.line 181
|
|
:cond_4
|
|
invoke-interface {p0}, Lokio/Source;->timeout()Lokio/Timeout;
|
|
|
|
move-result-object p0
|
|
|
|
add-long/2addr v0, v5
|
|
|
|
invoke-virtual {p0, v0, v1}, Lokio/Timeout;->deadlineNanoTime(J)Lokio/Timeout;
|
|
|
|
:goto_4
|
|
return p1
|
|
.end method
|
|
|
|
.method public static skipLeadingAsciiWhitespace(Ljava/lang/String;II)I
|
|
.locals 2
|
|
|
|
:goto_0
|
|
if-ge p1, p2, :cond_1
|
|
|
|
.line 301
|
|
invoke-virtual {p0, p1}, Ljava/lang/String;->charAt(I)C
|
|
|
|
move-result v0
|
|
|
|
const/16 v1, 0x9
|
|
|
|
if-eq v0, v1, :cond_0
|
|
|
|
const/16 v1, 0xa
|
|
|
|
if-eq v0, v1, :cond_0
|
|
|
|
const/16 v1, 0xc
|
|
|
|
if-eq v0, v1, :cond_0
|
|
|
|
const/16 v1, 0xd
|
|
|
|
if-eq v0, v1, :cond_0
|
|
|
|
const/16 v1, 0x20
|
|
|
|
if-eq v0, v1, :cond_0
|
|
|
|
return p1
|
|
|
|
:cond_0
|
|
add-int/lit8 p1, p1, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
return p2
|
|
.end method
|
|
|
|
.method public static skipTrailingAsciiWhitespace(Ljava/lang/String;II)I
|
|
.locals 2
|
|
|
|
add-int/lit8 p2, p2, -0x1
|
|
|
|
:goto_0
|
|
if-lt p2, p1, :cond_1
|
|
|
|
.line 321
|
|
invoke-virtual {p0, p2}, Ljava/lang/String;->charAt(I)C
|
|
|
|
move-result v0
|
|
|
|
const/16 v1, 0x9
|
|
|
|
if-eq v0, v1, :cond_0
|
|
|
|
const/16 v1, 0xa
|
|
|
|
if-eq v0, v1, :cond_0
|
|
|
|
const/16 v1, 0xc
|
|
|
|
if-eq v0, v1, :cond_0
|
|
|
|
const/16 v1, 0xd
|
|
|
|
if-eq v0, v1, :cond_0
|
|
|
|
const/16 v1, 0x20
|
|
|
|
if-eq v0, v1, :cond_0
|
|
|
|
add-int/lit8 p2, p2, 0x1
|
|
|
|
return p2
|
|
|
|
:cond_0
|
|
add-int/lit8 p2, p2, -0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
return p1
|
|
.end method
|
|
|
|
.method public static threadFactory(Ljava/lang/String;Z)Ljava/util/concurrent/ThreadFactory;
|
|
.locals 1
|
|
|
|
.line 197
|
|
new-instance v0, Lokhttp3/internal/Util$2;
|
|
|
|
invoke-direct {v0, p0, p1}, Lokhttp3/internal/Util$2;-><init>(Ljava/lang/String;Z)V
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public static toHumanReadableAscii(Ljava/lang/String;)Ljava/lang/String;
|
|
.locals 7
|
|
|
|
.line 257
|
|
invoke-virtual {p0}, Ljava/lang/String;->length()I
|
|
|
|
move-result v0
|
|
|
|
const/4 v1, 0x0
|
|
|
|
move v2, v1
|
|
|
|
:goto_0
|
|
if-ge v2, v0, :cond_3
|
|
|
|
.line 258
|
|
invoke-virtual {p0, v2}, Ljava/lang/String;->codePointAt(I)I
|
|
|
|
move-result v3
|
|
|
|
const/16 v4, 0x7f
|
|
|
|
const/16 v5, 0x1f
|
|
|
|
if-le v3, v5, :cond_0
|
|
|
|
if-ge v3, v4, :cond_0
|
|
|
|
.line 257
|
|
invoke-static {v3}, Ljava/lang/Character;->charCount(I)I
|
|
|
|
move-result v3
|
|
|
|
add-int/2addr v2, v3
|
|
|
|
goto :goto_0
|
|
|
|
.line 261
|
|
:cond_0
|
|
new-instance v3, Lokio/Buffer;
|
|
|
|
invoke-direct {v3}, Lokio/Buffer;-><init>()V
|
|
|
|
.line 262
|
|
invoke-virtual {v3, p0, v1, v2}, Lokio/Buffer;->writeUtf8(Ljava/lang/String;II)Lokio/Buffer;
|
|
|
|
:goto_1
|
|
if-ge v2, v0, :cond_2
|
|
|
|
.line 264
|
|
invoke-virtual {p0, v2}, Ljava/lang/String;->codePointAt(I)I
|
|
|
|
move-result v1
|
|
|
|
if-le v1, v5, :cond_1
|
|
|
|
if-ge v1, v4, :cond_1
|
|
|
|
move v6, v1
|
|
|
|
goto :goto_2
|
|
|
|
:cond_1
|
|
const/16 v6, 0x3f
|
|
|
|
.line 265
|
|
:goto_2
|
|
invoke-virtual {v3, v6}, Lokio/Buffer;->writeUtf8CodePoint(I)Lokio/Buffer;
|
|
|
|
.line 263
|
|
invoke-static {v1}, Ljava/lang/Character;->charCount(I)I
|
|
|
|
move-result v1
|
|
|
|
add-int/2addr v2, v1
|
|
|
|
goto :goto_1
|
|
|
|
.line 267
|
|
:cond_2
|
|
invoke-virtual {v3}, Lokio/Buffer;->readUtf8()Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
:cond_3
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static trimSubstring(Ljava/lang/String;II)Ljava/lang/String;
|
|
.locals 0
|
|
|
|
.line 337
|
|
invoke-static {p0, p1, p2}, Lokhttp3/internal/Util;->skipLeadingAsciiWhitespace(Ljava/lang/String;II)I
|
|
|
|
move-result p1
|
|
|
|
.line 338
|
|
invoke-static {p0, p1, p2}, Lokhttp3/internal/Util;->skipTrailingAsciiWhitespace(Ljava/lang/String;II)I
|
|
|
|
move-result p2
|
|
|
|
.line 339
|
|
invoke-virtual {p0, p1, p2}, Ljava/lang/String;->substring(II)Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static verifyAsIpAddress(Ljava/lang/String;)Z
|
|
.locals 1
|
|
|
|
.line 422
|
|
sget-object v0, Lokhttp3/internal/Util;->VERIFY_AS_IP_ADDRESS:Ljava/util/regex/Pattern;
|
|
|
|
invoke-virtual {v0, p0}, Ljava/util/regex/Pattern;->matcher(Ljava/lang/CharSequence;)Ljava/util/regex/Matcher;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-virtual {p0}, Ljava/util/regex/Matcher;->matches()Z
|
|
|
|
move-result p0
|
|
|
|
return p0
|
|
.end method
|