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

370 lines
7.7 KiB
Smali
Raw Normal View History

2019-02-04 20:05:16 +00:00
.class public final Lokhttp3/Headers;
.super Ljava/lang/Object;
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
2019-02-04 20:08:30 +00:00
Lokhttp3/Headers$a;
2019-02-04 20:05:16 +00:00
}
.end annotation
# instance fields
2019-02-04 20:20:43 +00:00
.field public final bYZ:[Ljava/lang/String;
2019-02-04 20:05:16 +00:00
# direct methods
2019-02-04 20:08:30 +00:00
.method constructor <init>(Lokhttp3/Headers$a;)V
.locals 1
2019-02-04 20:05:16 +00:00
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
2019-02-04 20:20:43 +00:00
iget-object v0, p1, Lokhttp3/Headers$a;->bZa:Ljava/util/List;
2019-02-04 20:05:16 +00:00
2019-02-04 20:20:43 +00:00
iget-object p1, p1, Lokhttp3/Headers$a;->bZa:Ljava/util/List;
2019-02-04 20:05:16 +00:00
2019-02-04 20:08:30 +00:00
invoke-interface {p1}, Ljava/util/List;->size()I
2019-02-04 20:05:16 +00:00
2019-02-04 20:08:30 +00:00
move-result p1
2019-02-04 20:05:16 +00:00
2019-02-04 20:08:30 +00:00
new-array p1, p1, [Ljava/lang/String;
2019-02-04 20:05:16 +00:00
2019-02-04 20:08:30 +00:00
invoke-interface {v0, p1}, Ljava/util/List;->toArray([Ljava/lang/Object;)[Ljava/lang/Object;
2019-02-04 20:05:16 +00:00
2019-02-04 20:08:30 +00:00
move-result-object p1
2019-02-04 20:05:16 +00:00
2019-02-04 20:08:30 +00:00
check-cast p1, [Ljava/lang/String;
2019-02-04 20:05:16 +00:00
2019-02-04 20:20:43 +00:00
iput-object p1, p0, Lokhttp3/Headers;->bYZ:[Ljava/lang/String;
2019-02-04 20:05:16 +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-02-04 20:20:43 +00:00
iput-object p1, p0, Lokhttp3/Headers;->bYZ:[Ljava/lang/String;
2019-02-04 20:05:16 +00:00
return-void
.end method
2019-02-04 20:08:30 +00:00
.method private static b([Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
2019-02-04 20:05:16 +00:00
.locals 2
2019-02-04 20:08:30 +00:00
array-length v0, p0
2019-02-04 20:05:16 +00:00
2019-02-04 20:08:30 +00:00
add-int/lit8 v0, v0, -0x2
2019-02-04 20:05:16 +00:00
: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
2019-02-04 20:08:30 +00:00
add-int/lit8 v0, v0, 0x1
2019-02-04 20:05:16 +00:00
2019-02-04 20:08:30 +00:00
aget-object p0, p0, v0
2019-02-04 20:05:16 +00:00
2019-02-04 20:08:30 +00:00
return-object p0
2019-02-04 20:05:16 +00:00
:cond_0
add-int/lit8 v0, v0, -0x2
goto :goto_0
:cond_1
2019-02-04 20:08:30 +00:00
const/4 p0, 0x0
2019-02-04 20:05:16 +00:00
2019-02-04 20:08:30 +00:00
return-object p0
2019-02-04 20:05:16 +00:00
.end method
2019-02-04 20:08:30 +00:00
.method public static varargs f([Ljava/lang/String;)Lokhttp3/Headers;
.locals 6
2019-02-04 20:05:16 +00:00
2019-02-04 20:08:30 +00:00
array-length v0, p0
2019-02-04 20:05:16 +00:00
2019-02-04 20:08:30 +00:00
rem-int/lit8 v0, v0, 0x2
2019-02-04 20:05:16 +00:00
2019-02-04 20:08:30 +00:00
if-nez v0, :cond_4
2019-02-04 20:05:16 +00:00
2019-02-04 20:08:30 +00:00
invoke-virtual {p0}, [Ljava/lang/String;->clone()Ljava/lang/Object;
2019-02-04 20:05:16 +00:00
2019-02-04 20:08:30 +00:00
move-result-object p0
2019-02-04 20:05:16 +00:00
2019-02-04 20:08:30 +00:00
check-cast p0, [Ljava/lang/String;
2019-02-04 20:05:16 +00:00
2019-02-04 20:08:30 +00:00
const/4 v0, 0x0
2019-02-04 20:05:16 +00:00
const/4 v1, 0x0
:goto_0
2019-02-04 20:08:30 +00:00
array-length v2, p0
2019-02-04 20:05:16 +00:00
2019-02-04 20:08:30 +00:00
if-ge v1, v2, :cond_1
2019-02-04 20:05:16 +00:00
2019-02-04 20:08:30 +00:00
aget-object v2, p0, v1
2019-02-04 20:05:16 +00:00
2019-02-04 20:08:30 +00:00
if-eqz v2, :cond_0
2019-02-04 20:05:16 +00:00
2019-02-04 20:08:30 +00:00
aget-object v2, p0, v1
2019-02-04 20:05:16 +00:00
2019-02-04 20:08:30 +00:00
invoke-virtual {v2}, Ljava/lang/String;->trim()Ljava/lang/String;
2019-02-04 20:05:16 +00:00
move-result-object v2
2019-02-04 20:08:30 +00:00
aput-object v2, p0, v1
2019-02-04 20:05:16 +00:00
2019-02-04 20:08:30 +00:00
add-int/lit8 v1, v1, 0x1
2019-02-04 20:05:16 +00:00
goto :goto_0
:cond_0
2019-02-04 20:08:30 +00:00
new-instance p0, Ljava/lang/IllegalArgumentException;
2019-02-04 20:05:16 +00:00
2019-02-04 20:08:30 +00:00
const-string v0, "Headers cannot be null"
2019-02-04 20:05:16 +00:00
2019-02-04 20:08:30 +00:00
invoke-direct {p0, v0}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
2019-02-04 20:05:16 +00:00
2019-02-04 20:08:30 +00:00
throw p0
2019-02-04 20:05:16 +00:00
:cond_1
2019-02-04 20:08:30 +00:00
const/4 v1, 0x0
2019-02-04 20:05:16 +00:00
2019-02-04 20:08:30 +00:00
:goto_1
array-length v2, p0
2019-02-04 20:05:16 +00:00
2019-02-04 20:08:30 +00:00
if-ge v1, v2, :cond_3
2019-02-04 20:05:16 +00:00
2019-02-04 20:08:30 +00:00
aget-object v2, p0, v1
2019-02-04 20:05:16 +00:00
2019-02-04 20:08:30 +00:00
add-int/lit8 v3, v1, 0x1
2019-02-04 20:05:16 +00:00
2019-02-04 20:08:30 +00:00
aget-object v3, p0, v3
2019-02-04 20:05:16 +00:00
2019-02-04 20:08:30 +00:00
invoke-virtual {v2}, Ljava/lang/String;->length()I
2019-02-04 20:05:16 +00:00
2019-02-04 20:08:30 +00:00
move-result v4
2019-02-04 20:05:16 +00:00
2019-02-04 20:08:30 +00:00
if-eqz v4, :cond_2
2019-02-04 20:05:16 +00:00
2019-02-04 20:08:30 +00:00
invoke-virtual {v2, v0}, Ljava/lang/String;->indexOf(I)I
2019-02-04 20:05:16 +00:00
2019-02-04 20:08:30 +00:00
move-result v4
2019-02-04 20:05:16 +00:00
2019-02-04 20:08:30 +00:00
const/4 v5, -0x1
2019-02-04 20:05:16 +00:00
2019-02-04 20:08:30 +00:00
if-ne v4, v5, :cond_2
2019-02-04 20:05:16 +00:00
2019-02-04 20:08:30 +00:00
invoke-virtual {v3, v0}, Ljava/lang/String;->indexOf(I)I
2019-02-04 20:05:16 +00:00
2019-02-04 20:08:30 +00:00
move-result v4
2019-02-04 20:05:16 +00:00
2019-02-04 20:08:30 +00:00
if-ne v4, v5, :cond_2
2019-02-04 20:05:16 +00:00
2019-02-04 20:08:30 +00:00
add-int/lit8 v1, v1, 0x2
2019-02-04 20:05:16 +00:00
2019-02-04 20:08:30 +00:00
goto :goto_1
2019-02-04 20:05:16 +00:00
2019-02-04 20:08:30 +00:00
:cond_2
new-instance p0, Ljava/lang/IllegalArgumentException;
2019-02-04 20:05:16 +00:00
2019-02-04 20:08:30 +00:00
new-instance v0, Ljava/lang/StringBuilder;
2019-02-04 20:05:16 +00:00
2019-02-04 20:08:30 +00:00
const-string v1, "Unexpected header: "
2019-02-04 20:05:16 +00:00
2019-02-04 20:08:30 +00:00
invoke-direct {v0, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
2019-02-04 20:05:16 +00:00
2019-02-04 20:08:30 +00:00
invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
2019-02-04 20:05:16 +00:00
2019-02-04 20:08:30 +00:00
const-string v1, ": "
2019-02-04 20:05:16 +00:00
2019-02-04 20:08:30 +00:00
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
2019-02-04 20:05:16 +00:00
2019-02-04 20:08:30 +00:00
invoke-virtual {v0, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
2019-02-04 20:05:16 +00:00
2019-02-04 20:08:30 +00:00
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
2019-02-04 20:05:16 +00:00
2019-02-04 20:08:30 +00:00
move-result-object v0
2019-02-04 20:05:16 +00:00
2019-02-04 20:08:30 +00:00
invoke-direct {p0, v0}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
2019-02-04 20:05:16 +00:00
2019-02-04 20:08:30 +00:00
throw p0
2019-02-04 20:05:16 +00:00
2019-02-04 20:08:30 +00:00
:cond_3
new-instance v0, Lokhttp3/Headers;
2019-02-04 20:05:16 +00:00
2019-02-04 20:08:30 +00:00
invoke-direct {v0, p0}, Lokhttp3/Headers;-><init>([Ljava/lang/String;)V
2019-02-04 20:05:16 +00:00
2019-02-04 20:08:30 +00:00
return-object v0
2019-02-04 20:05:16 +00:00
:cond_4
2019-02-04 20:08:30 +00:00
new-instance p0, Ljava/lang/IllegalArgumentException;
2019-02-04 20:05:16 +00:00
2019-02-04 20:08:30 +00:00
const-string v0, "Expected alternating header names and values"
2019-02-04 20:05:16 +00:00
2019-02-04 20:08:30 +00:00
invoke-direct {p0, v0}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
2019-02-04 20:05:16 +00:00
2019-02-04 20:08:30 +00:00
throw p0
.end method
2019-02-04 20:05:16 +00:00
2019-02-04 20:08:30 +00:00
# virtual methods
2019-02-04 20:17:36 +00:00
.method public final Hh()Lokhttp3/Headers$a;
2019-02-04 20:08:30 +00:00
.locals 3
2019-02-04 20:05:16 +00:00
2019-02-04 20:08:30 +00:00
new-instance v0, Lokhttp3/Headers$a;
2019-02-04 20:05:16 +00:00
2019-02-04 20:08:30 +00:00
invoke-direct {v0}, Lokhttp3/Headers$a;-><init>()V
2019-02-04 20:05:16 +00:00
2019-02-04 20:20:43 +00:00
iget-object v1, v0, Lokhttp3/Headers$a;->bZa:Ljava/util/List;
2019-02-04 20:05:16 +00:00
2019-02-04 20:20:43 +00:00
iget-object v2, p0, Lokhttp3/Headers;->bYZ:[Ljava/lang/String;
2019-02-04 20:05:16 +00:00
2019-02-04 20:08:30 +00:00
invoke-static {v1, v2}, Ljava/util/Collections;->addAll(Ljava/util/Collection;[Ljava/lang/Object;)Z
2019-02-04 20:05:16 +00:00
2019-02-04 20:08:30 +00:00
return-object v0
2019-02-04 20:05:16 +00:00
.end method
2019-02-04 20:08:30 +00:00
.method public final equals(Ljava/lang/Object;)Z
2019-02-04 20:05:16 +00:00
.locals 1
2019-02-04 20:08:30 +00:00
.param p1 # Ljava/lang/Object;
.annotation runtime Ljavax/annotation/Nullable;
.end annotation
.end param
2019-02-04 20:05:16 +00:00
2019-02-04 20:08:30 +00:00
instance-of v0, p1, Lokhttp3/Headers;
2019-02-04 20:05:16 +00:00
2019-02-04 20:08:30 +00:00
if-eqz v0, :cond_0
2019-02-04 20:05:16 +00:00
2019-02-04 20:08:30 +00:00
check-cast p1, Lokhttp3/Headers;
2019-02-04 20:05:16 +00:00
2019-02-04 20:20:43 +00:00
iget-object p1, p1, Lokhttp3/Headers;->bYZ:[Ljava/lang/String;
2019-02-04 20:05:16 +00:00
2019-02-04 20:20:43 +00:00
iget-object v0, p0, Lokhttp3/Headers;->bYZ:[Ljava/lang/String;
2019-02-04 20:05:16 +00:00
2019-02-04 20:08:30 +00:00
invoke-static {p1, v0}, Ljava/util/Arrays;->equals([Ljava/lang/Object;[Ljava/lang/Object;)Z
2019-02-04 20:05:16 +00:00
2019-02-04 20:08:30 +00:00
move-result p1
2019-02-04 20:05:16 +00:00
2019-02-04 20:08:30 +00:00
if-eqz p1, :cond_0
2019-02-04 20:05:16 +00:00
2019-02-04 20:08:30 +00:00
const/4 p1, 0x1
2019-02-04 20:05:16 +00:00
2019-02-04 20:08:30 +00:00
return p1
2019-02-04 20:05:16 +00:00
:cond_0
2019-02-04 20:08:30 +00:00
const/4 p1, 0x0
2019-02-04 20:05:16 +00:00
2019-02-04 20:08:30 +00:00
return p1
2019-02-04 20:05:16 +00:00
.end method
2019-02-04 20:08:30 +00:00
.method public final fb(I)Ljava/lang/String;
.locals 1
2019-02-04 20:05:16 +00:00
2019-02-04 20:20:43 +00:00
iget-object v0, p0, Lokhttp3/Headers;->bYZ:[Ljava/lang/String;
2019-02-04 20:05:16 +00:00
2019-02-04 20:08:30 +00:00
mul-int/lit8 p1, p1, 0x2
2019-02-04 20:05:16 +00:00
2019-02-04 20:08:30 +00:00
aget-object p1, v0, p1
2019-02-04 20:05:16 +00:00
2019-02-04 20:08:30 +00:00
return-object p1
2019-02-04 20:05:16 +00:00
.end method
2019-02-04 20:08:30 +00:00
.method public final fc(I)Ljava/lang/String;
.locals 1
2019-02-04 20:05:16 +00:00
2019-02-04 20:20:43 +00:00
iget-object v0, p0, Lokhttp3/Headers;->bYZ:[Ljava/lang/String;
2019-02-04 20:05:16 +00:00
2019-02-04 20:08:30 +00:00
mul-int/lit8 p1, p1, 0x2
2019-02-04 20:05:16 +00:00
2019-02-04 20:08:30 +00:00
add-int/lit8 p1, p1, 0x1
2019-02-04 20:05:16 +00:00
2019-02-04 20:08:30 +00:00
aget-object p1, v0, p1
2019-02-04 20:05:16 +00:00
2019-02-04 20:08:30 +00:00
return-object p1
2019-02-04 20:05:16 +00:00
.end method
2019-02-04 20:08:30 +00:00
.method public final get(Ljava/lang/String;)Ljava/lang/String;
.locals 1
.annotation runtime Ljavax/annotation/Nullable;
.end annotation
2019-02-04 20:05:16 +00:00
2019-02-04 20:20:43 +00:00
iget-object v0, p0, Lokhttp3/Headers;->bYZ:[Ljava/lang/String;
2019-02-04 20:05:16 +00:00
2019-02-04 20:08:30 +00:00
invoke-static {v0, p1}, Lokhttp3/Headers;->b([Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
2019-02-04 20:05:16 +00:00
2019-02-04 20:08:30 +00:00
move-result-object p1
2019-02-04 20:05:16 +00:00
2019-02-04 20:08:30 +00:00
return-object p1
2019-02-04 20:05:16 +00:00
.end method
2019-02-04 20:08:30 +00:00
.method public final hashCode()I
2019-02-04 20:05:16 +00:00
.locals 1
2019-02-04 20:20:43 +00:00
iget-object v0, p0, Lokhttp3/Headers;->bYZ:[Ljava/lang/String;
2019-02-04 20:05:16 +00:00
2019-02-04 20:08:30 +00:00
invoke-static {v0}, Ljava/util/Arrays;->hashCode([Ljava/lang/Object;)I
2019-02-04 20:05:16 +00:00
2019-02-04 20:08:30 +00:00
move-result v0
2019-02-04 20:05:16 +00:00
return v0
.end method
2019-02-04 20:08:30 +00:00
.method public final toString()Ljava/lang/String;
.locals 4
2019-02-04 20:05:16 +00:00
2019-02-04 20:08:30 +00:00
new-instance v0, Ljava/lang/StringBuilder;
2019-02-04 20:05:16 +00:00
2019-02-04 20:08:30 +00:00
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
2019-02-04 20:05:16 +00:00
2019-02-04 20:20:43 +00:00
iget-object v1, p0, Lokhttp3/Headers;->bYZ:[Ljava/lang/String;
2019-02-04 20:05:16 +00:00
2019-02-04 20:08:30 +00:00
array-length v1, v1
2019-02-04 20:05:16 +00:00
2019-02-04 20:08:30 +00:00
div-int/lit8 v1, v1, 0x2
2019-02-04 20:05:16 +00:00
2019-02-04 20:08:30 +00:00
const/4 v2, 0x0
2019-02-04 20:05:16 +00:00
:goto_0
2019-02-04 20:08:30 +00:00
if-ge v2, v1, :cond_0
2019-02-04 20:05:16 +00:00
2019-02-04 20:08:30 +00:00
invoke-virtual {p0, v2}, Lokhttp3/Headers;->fb(I)Ljava/lang/String;
2019-02-04 20:05:16 +00:00
move-result-object v3
2019-02-04 20:08:30 +00:00
invoke-virtual {v0, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
2019-02-04 20:05:16 +00:00
2019-02-04 20:08:30 +00:00
const-string v3, ": "
2019-02-04 20:05:16 +00:00
2019-02-04 20:08:30 +00:00
invoke-virtual {v0, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
2019-02-04 20:05:16 +00:00
2019-02-04 20:08:30 +00:00
invoke-virtual {p0, v2}, Lokhttp3/Headers;->fc(I)Ljava/lang/String;
2019-02-04 20:05:16 +00:00
move-result-object v3
2019-02-04 20:08:30 +00:00
invoke-virtual {v0, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
2019-02-04 20:05:16 +00:00
2019-02-04 20:08:30 +00:00
const-string v3, "\n"
2019-02-04 20:05:16 +00:00
2019-02-04 20:08:30 +00:00
invoke-virtual {v0, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
2019-02-04 20:05:16 +00:00
2019-02-04 20:08:30 +00:00
add-int/lit8 v2, v2, 0x1
2019-02-04 20:05:16 +00:00
goto :goto_0
:cond_0
2019-02-04 20:08:30 +00:00
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
2019-02-04 20:05:16 +00:00
2019-02-04 20:08:30 +00:00
move-result-object v0
2019-02-04 20:05:16 +00:00
return-object v0
.end method