apkfuckery/com.discord/smali_classes2/okhttp3/Headers.smali

526 lines
10 KiB
Smali
Raw Normal View History

2019-07-24 11:27:29 +00:00
.class public final Lokhttp3/Headers;
.super Ljava/lang/Object;
.source "Headers.java"
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Lokhttp3/Headers$a;
}
.end annotation
# instance fields
2019-11-20 22:09:14 +00:00
.field public final brc:[Ljava/lang/String;
2019-07-24 11:27:29 +00:00
# direct methods
.method constructor <init>(Lokhttp3/Headers$a;)V
.locals 1
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
2019-11-20 22:09:14 +00:00
iget-object v0, p1, Lokhttp3/Headers$a;->brd:Ljava/util/List;
2019-07-24 11:27:29 +00:00
2019-11-20 22:09:14 +00:00
iget-object p1, p1, Lokhttp3/Headers$a;->brd:Ljava/util/List;
2019-07-24 11:27:29 +00:00
invoke-interface {p1}, Ljava/util/List;->size()I
move-result p1
new-array p1, p1, [Ljava/lang/String;
invoke-interface {v0, p1}, Ljava/util/List;->toArray([Ljava/lang/Object;)[Ljava/lang/Object;
move-result-object p1
check-cast p1, [Ljava/lang/String;
2019-11-20 22:09:14 +00:00
iput-object p1, p0, Lokhttp3/Headers;->brc:[Ljava/lang/String;
2019-07-24 11:27:29 +00:00
return-void
.end method
.method private constructor <init>([Ljava/lang/String;)V
.locals 0
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
2019-11-20 22:09:14 +00:00
iput-object p1, p0, Lokhttp3/Headers;->brc:[Ljava/lang/String;
2019-07-24 11:27:29 +00:00
return-void
.end method
2019-11-15 02:21:15 +00:00
.method static ag(Ljava/lang/String;Ljava/lang/String;)V
2019-07-24 11:27:29 +00:00
.locals 5
if-eqz p0, :cond_3
invoke-virtual {p0}, Ljava/lang/String;->length()I
move-result v0
const/4 v1, 0x0
const/4 v2, 0x0
:goto_0
if-ge v2, v0, :cond_2
invoke-virtual {p0, v2}, Ljava/lang/String;->charAt(I)C
move-result v3
const/16 v4, 0x1f
if-gt v3, v4, :cond_0
const/16 v4, 0x9
if-ne v3, v4, :cond_1
:cond_0
const/16 v4, 0x7f
if-ge v3, v4, :cond_1
add-int/lit8 v2, v2, 0x1
goto :goto_0
:cond_1
new-instance v0, Ljava/lang/IllegalArgumentException;
const/4 v4, 0x4
new-array v4, v4, [Ljava/lang/Object;
invoke-static {v3}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v3
aput-object v3, v4, v1
invoke-static {v2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v1
const/4 v2, 0x1
aput-object v1, v4, v2
const/4 v1, 0x2
aput-object p1, v4, v1
const/4 p1, 0x3
aput-object p0, v4, p1
const-string p0, "Unexpected char %#04x at %d in %s value: %s"
2019-10-09 23:16:36 +00:00
invoke-static {p0, v4}, Lokhttp3/internal/c;->h(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
2019-07-24 11:27:29 +00:00
move-result-object p0
invoke-direct {v0, p0}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
throw v0
:cond_2
return-void
:cond_3
new-instance p0, Ljava/lang/NullPointerException;
new-instance v0, Ljava/lang/StringBuilder;
const-string v1, "value for name "
invoke-direct {v0, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
const-string p1, " == null"
invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p1
invoke-direct {p0, p1}, Ljava/lang/NullPointerException;-><init>(Ljava/lang/String;)V
throw p0
.end method
.method private static b([Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
.locals 2
array-length v0, p0
add-int/lit8 v0, v0, -0x2
:goto_0
if-ltz v0, :cond_1
aget-object v1, p0, v0
invoke-virtual {p1, v1}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z
move-result v1
if-eqz v1, :cond_0
add-int/lit8 v0, v0, 0x1
aget-object p0, p0, v0
return-object p0
:cond_0
add-int/lit8 v0, v0, -0x2
goto :goto_0
:cond_1
const/4 p0, 0x0
return-object p0
.end method
2019-11-15 02:21:15 +00:00
.method static dx(Ljava/lang/String;)V
2019-07-24 11:27:29 +00:00
.locals 5
if-eqz p0, :cond_3
invoke-virtual {p0}, Ljava/lang/String;->isEmpty()Z
move-result v0
if-nez v0, :cond_2
invoke-virtual {p0}, Ljava/lang/String;->length()I
move-result v0
const/4 v1, 0x0
const/4 v2, 0x0
:goto_0
if-ge v2, v0, :cond_1
invoke-virtual {p0, v2}, Ljava/lang/String;->charAt(I)C
move-result v3
const/16 v4, 0x20
if-le v3, v4, :cond_0
const/16 v4, 0x7f
if-ge v3, v4, :cond_0
add-int/lit8 v2, v2, 0x1
goto :goto_0
:cond_0
new-instance v0, Ljava/lang/IllegalArgumentException;
const/4 v4, 0x3
new-array v4, v4, [Ljava/lang/Object;
invoke-static {v3}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v3
aput-object v3, v4, v1
invoke-static {v2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v1
const/4 v2, 0x1
aput-object v1, v4, v2
const/4 v1, 0x2
aput-object p0, v4, v1
const-string p0, "Unexpected char %#04x at %d in header name: %s"
2019-10-09 23:16:36 +00:00
invoke-static {p0, v4}, Lokhttp3/internal/c;->h(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
2019-07-24 11:27:29 +00:00
move-result-object p0
invoke-direct {v0, p0}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
throw v0
:cond_1
return-void
:cond_2
new-instance p0, Ljava/lang/IllegalArgumentException;
const-string v0, "name is empty"
invoke-direct {p0, v0}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
throw p0
:cond_3
new-instance p0, Ljava/lang/NullPointerException;
const-string v0, "name == null"
invoke-direct {p0, v0}, Ljava/lang/NullPointerException;-><init>(Ljava/lang/String;)V
throw p0
.end method
.method public static varargs f([Ljava/lang/String;)Lokhttp3/Headers;
.locals 3
array-length v0, p0
rem-int/lit8 v0, v0, 0x2
if-nez v0, :cond_3
invoke-virtual {p0}, [Ljava/lang/String;->clone()Ljava/lang/Object;
move-result-object p0
check-cast p0, [Ljava/lang/String;
const/4 v0, 0x0
const/4 v1, 0x0
:goto_0
array-length v2, p0
if-ge v1, v2, :cond_1
aget-object v2, p0, v1
if-eqz v2, :cond_0
aget-object v2, p0, v1
invoke-virtual {v2}, Ljava/lang/String;->trim()Ljava/lang/String;
move-result-object v2
aput-object v2, p0, v1
add-int/lit8 v1, v1, 0x1
goto :goto_0
:cond_0
new-instance p0, Ljava/lang/IllegalArgumentException;
const-string v0, "Headers cannot be null"
invoke-direct {p0, v0}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
throw p0
:cond_1
:goto_1
array-length v1, p0
if-ge v0, v1, :cond_2
aget-object v1, p0, v0
add-int/lit8 v2, v0, 0x1
aget-object v2, p0, v2
2019-11-15 02:21:15 +00:00
invoke-static {v1}, Lokhttp3/Headers;->dx(Ljava/lang/String;)V
2019-07-24 11:27:29 +00:00
2019-11-15 02:21:15 +00:00
invoke-static {v2, v1}, Lokhttp3/Headers;->ag(Ljava/lang/String;Ljava/lang/String;)V
2019-07-24 11:27:29 +00:00
add-int/lit8 v0, v0, 0x2
goto :goto_1
:cond_2
new-instance v0, Lokhttp3/Headers;
invoke-direct {v0, p0}, Lokhttp3/Headers;-><init>([Ljava/lang/String;)V
return-object v0
:cond_3
new-instance p0, Ljava/lang/IllegalArgumentException;
const-string v0, "Expected alternating header names and values"
invoke-direct {p0, v0}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
throw p0
.end method
# virtual methods
2019-11-15 02:21:15 +00:00
.method public final Fo()Lokhttp3/Headers$a;
2019-07-24 11:27:29 +00:00
.locals 3
new-instance v0, Lokhttp3/Headers$a;
invoke-direct {v0}, Lokhttp3/Headers$a;-><init>()V
2019-11-20 22:09:14 +00:00
iget-object v1, v0, Lokhttp3/Headers$a;->brd:Ljava/util/List;
2019-07-24 11:27:29 +00:00
2019-11-20 22:09:14 +00:00
iget-object v2, p0, Lokhttp3/Headers;->brc:[Ljava/lang/String;
2019-07-24 11:27:29 +00:00
invoke-static {v1, v2}, Ljava/util/Collections;->addAll(Ljava/util/Collection;[Ljava/lang/Object;)Z
return-object v0
.end method
2019-11-15 02:21:15 +00:00
.method public final de(I)Ljava/lang/String;
2019-10-09 23:16:36 +00:00
.locals 1
2019-11-20 22:09:14 +00:00
iget-object v0, p0, Lokhttp3/Headers;->brc:[Ljava/lang/String;
2019-10-09 23:16:36 +00:00
2019-11-15 02:21:15 +00:00
mul-int/lit8 p1, p1, 0x2
2019-10-09 23:16:36 +00:00
2019-11-15 02:21:15 +00:00
aget-object p1, v0, p1
2019-10-09 23:16:36 +00:00
return-object p1
.end method
2019-11-15 02:21:15 +00:00
.method public final df(I)Ljava/lang/String;
2019-07-24 11:27:29 +00:00
.locals 1
2019-11-20 22:09:14 +00:00
iget-object v0, p0, Lokhttp3/Headers;->brc:[Ljava/lang/String;
2019-07-24 11:27:29 +00:00
mul-int/lit8 p1, p1, 0x2
2019-11-15 02:21:15 +00:00
add-int/lit8 p1, p1, 0x1
2019-07-24 11:27:29 +00:00
aget-object p1, v0, p1
return-object p1
.end method
2019-11-15 02:21:15 +00:00
.method public final dw(Ljava/lang/String;)Ljava/lang/String;
2019-07-24 11:27:29 +00:00
.locals 1
2019-11-15 02:21:15 +00:00
.annotation runtime Ljavax/annotation/Nullable;
.end annotation
2019-07-24 11:27:29 +00:00
2019-11-20 22:09:14 +00:00
iget-object v0, p0, Lokhttp3/Headers;->brc:[Ljava/lang/String;
2019-10-01 14:15:45 +00:00
2019-11-15 02:21:15 +00:00
invoke-static {v0, p1}, Lokhttp3/Headers;->b([Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
2019-11-14 21:08:15 +00:00
2019-11-15 02:21:15 +00:00
move-result-object p1
2019-07-24 11:27:29 +00:00
return-object p1
.end method
.method public final equals(Ljava/lang/Object;)Z
.locals 1
.param p1 # Ljava/lang/Object;
.annotation runtime Ljavax/annotation/Nullable;
.end annotation
.end param
instance-of v0, p1, Lokhttp3/Headers;
if-eqz v0, :cond_0
check-cast p1, Lokhttp3/Headers;
2019-11-20 22:09:14 +00:00
iget-object p1, p1, Lokhttp3/Headers;->brc:[Ljava/lang/String;
2019-07-24 11:27:29 +00:00
2019-11-20 22:09:14 +00:00
iget-object v0, p0, Lokhttp3/Headers;->brc:[Ljava/lang/String;
2019-07-24 11:27:29 +00:00
invoke-static {p1, v0}, Ljava/util/Arrays;->equals([Ljava/lang/Object;[Ljava/lang/Object;)Z
move-result p1
if-eqz p1, :cond_0
const/4 p1, 0x1
return p1
:cond_0
const/4 p1, 0x0
return p1
.end method
.method public final hashCode()I
.locals 1
2019-11-20 22:09:14 +00:00
iget-object v0, p0, Lokhttp3/Headers;->brc:[Ljava/lang/String;
2019-07-24 11:27:29 +00:00
invoke-static {v0}, Ljava/util/Arrays;->hashCode([Ljava/lang/Object;)I
move-result v0
return v0
.end method
.method public final toString()Ljava/lang/String;
.locals 4
new-instance v0, Ljava/lang/StringBuilder;
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
2019-11-20 22:09:14 +00:00
iget-object v1, p0, Lokhttp3/Headers;->brc:[Ljava/lang/String;
2019-07-24 11:27:29 +00:00
array-length v1, v1
div-int/lit8 v1, v1, 0x2
const/4 v2, 0x0
:goto_0
if-ge v2, v1, :cond_0
2019-10-09 23:16:36 +00:00
invoke-virtual {p0, v2}, Lokhttp3/Headers;->de(I)Ljava/lang/String;
2019-07-24 11:27:29 +00:00
move-result-object v3
invoke-virtual {v0, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
const-string v3, ": "
invoke-virtual {v0, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
2019-10-09 23:16:36 +00:00
invoke-virtual {p0, v2}, Lokhttp3/Headers;->df(I)Ljava/lang/String;
2019-07-24 11:27:29 +00:00
move-result-object v3
invoke-virtual {v0, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
const-string v3, "\n"
invoke-virtual {v0, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
add-int/lit8 v2, v2, 0x1
goto :goto_0
:cond_0
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v0
return-object v0
.end method