Rabbit-R1/switch port/smali/smali_classes3/okhttp3/Headers.smali
2024-05-21 17:08:36 -04:00

788 lines
20 KiB
Smali

.class public final Lokhttp3/Headers;
.super Ljava/lang/Object;
.source "Headers.kt"
# interfaces
.implements Ljava/lang/Iterable;
.implements Lkotlin/jvm/internal/markers/KMappedMarker;
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Lokhttp3/Headers$Builder;,
Lokhttp3/Headers$Companion;
}
.end annotation
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/lang/Object;",
"Ljava/lang/Iterable<",
"Lkotlin/Pair<",
"+",
"Ljava/lang/String;",
"+",
"Ljava/lang/String;",
">;>;",
"Lkotlin/jvm/internal/markers/KMappedMarker;"
}
.end annotation
.annotation runtime Lkotlin/Metadata;
bv = {
0x1,
0x0,
0x3
}
d1 = {
"\u0000f\n\u0002\u0018\u0002\n\u0002\u0010\u001c\n\u0002\u0018\u0002\n\u0002\u0010\u000e\n\u0000\n\u0002\u0010\u0011\n\u0002\u0008\u0003\n\u0002\u0010\u0008\n\u0002\u0008\u0002\n\u0002\u0010\t\n\u0000\n\u0002\u0010\u000b\n\u0000\n\u0002\u0010\u0000\n\u0002\u0008\u0003\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0008\u0002\n\u0002\u0010(\n\u0002\u0008\u0002\n\u0002\u0010\"\n\u0000\n\u0002\u0018\u0002\n\u0002\u0008\u0002\n\u0002\u0010$\n\u0002\u0010 \n\u0002\u0008\u0006\u0018\u0000 \'2\u0014\u0012\u0010\u0012\u000e\u0012\u0004\u0012\u00020\u0003\u0012\u0004\u0012\u00020\u00030\u00020\u0001:\u0002&\'B\u0015\u0008\u0002\u0012\u000c\u0010\u0004\u001a\u0008\u0012\u0004\u0012\u00020\u00030\u0005\u00a2\u0006\u0002\u0010\u0006J\u0006\u0010\u000b\u001a\u00020\u000cJ\u0013\u0010\r\u001a\u00020\u000e2\u0008\u0010\u000f\u001a\u0004\u0018\u00010\u0010H\u0096\u0002J\u0013\u0010\u0011\u001a\u0004\u0018\u00010\u00032\u0006\u0010\u0012\u001a\u00020\u0003H\u0086\u0002J\u0010\u0010\u0013\u001a\u0004\u0018\u00010\u00142\u0006\u0010\u0012\u001a\u00020\u0003J\u0012\u0010\u0015\u001a\u0004\u0018\u00010\u00162\u0006\u0010\u0012\u001a\u00020\u0003H\u0007J\u0008\u0010\u0017\u001a\u00020\tH\u0016J\u001b\u0010\u0018\u001a\u0014\u0012\u0010\u0012\u000e\u0012\u0004\u0012\u00020\u0003\u0012\u0004\u0012\u00020\u00030\u00020\u0019H\u0096\u0002J\u000e\u0010\u0012\u001a\u00020\u00032\u0006\u0010\u001a\u001a\u00020\tJ\u000c\u0010\u001b\u001a\u0008\u0012\u0004\u0012\u00020\u00030\u001cJ\u0006\u0010\u001d\u001a\u00020\u001eJ\r\u0010\u0008\u001a\u00020\tH\u0007\u00a2\u0006\u0002\u0008\u001fJ\u0018\u0010 \u001a\u0014\u0012\u0004\u0012\u00020\u0003\u0012\n\u0012\u0008\u0012\u0004\u0012\u00020\u00030\"0!J\u0008\u0010#\u001a\u00020\u0003H\u0016J\u000e\u0010$\u001a\u00020\u00032\u0006\u0010\u001a\u001a\u00020\tJ\u0014\u0010%\u001a\u0008\u0012\u0004\u0012\u00020\u00030\"2\u0006\u0010\u0012\u001a\u00020\u0003R\u0016\u0010\u0004\u001a\u0008\u0012\u0004\u0012\u00020\u00030\u0005X\u0082\u0004\u00a2\u0006\u0004\n\u0002\u0010\u0007R\u0011\u0010\u0008\u001a\u00020\t8G\u00a2\u0006\u0006\u001a\u0004\u0008\u0008\u0010\n\u00a8\u0006("
}
d2 = {
"Lokhttp3/Headers;",
"",
"Lkotlin/Pair;",
"",
"namesAndValues",
"",
"([Ljava/lang/String;)V",
"[Ljava/lang/String;",
"size",
"",
"()I",
"byteCount",
"",
"equals",
"",
"other",
"",
"get",
"name",
"getDate",
"Ljava/util/Date;",
"getInstant",
"Ljava/time/Instant;",
"hashCode",
"iterator",
"",
"index",
"names",
"",
"newBuilder",
"Lokhttp3/Headers$Builder;",
"-deprecated_size",
"toMultimap",
"",
"",
"toString",
"value",
"values",
"Builder",
"Companion",
"okhttp"
}
k = 0x1
mv = {
0x1,
0x4,
0x0
}
.end annotation
# static fields
.field public static final Companion:Lokhttp3/Headers$Companion;
# instance fields
.field private final namesAndValues:[Ljava/lang/String;
# direct methods
.method static constructor <clinit>()V
.locals 2
new-instance v0, Lokhttp3/Headers$Companion;
const/4 v1, 0x0
invoke-direct {v0, v1}, Lokhttp3/Headers$Companion;-><init>(Lkotlin/jvm/internal/DefaultConstructorMarker;)V
sput-object v0, Lokhttp3/Headers;->Companion:Lokhttp3/Headers$Companion;
return-void
.end method
.method private constructor <init>([Ljava/lang/String;)V
.locals 0
.line 50
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
iput-object p1, p0, Lokhttp3/Headers;->namesAndValues:[Ljava/lang/String;
return-void
.end method
.method public synthetic constructor <init>([Ljava/lang/String;Lkotlin/jvm/internal/DefaultConstructorMarker;)V
.locals 0
.line 50
invoke-direct {p0, p1}, Lokhttp3/Headers;-><init>([Ljava/lang/String;)V
return-void
.end method
.method public static final of(Ljava/util/Map;)Lokhttp3/Headers;
.locals 1
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/util/Map<",
"Ljava/lang/String;",
"Ljava/lang/String;",
">;)",
"Lokhttp3/Headers;"
}
.end annotation
.annotation runtime Lkotlin/jvm/JvmStatic;
.end annotation
sget-object v0, Lokhttp3/Headers;->Companion:Lokhttp3/Headers$Companion;
invoke-virtual {v0, p0}, Lokhttp3/Headers$Companion;->of(Ljava/util/Map;)Lokhttp3/Headers;
move-result-object p0
return-object p0
.end method
.method public static final varargs of([Ljava/lang/String;)Lokhttp3/Headers;
.locals 1
.annotation runtime Lkotlin/jvm/JvmStatic;
.end annotation
sget-object v0, Lokhttp3/Headers;->Companion:Lokhttp3/Headers$Companion;
invoke-virtual {v0, p0}, Lokhttp3/Headers$Companion;->of([Ljava/lang/String;)Lokhttp3/Headers;
move-result-object p0
return-object p0
.end method
# virtual methods
.method public final -deprecated_size()I
.locals 0
.annotation runtime Lkotlin/Deprecated;
level = .enum Lkotlin/DeprecationLevel;->ERROR:Lkotlin/DeprecationLevel;
message = "moved to val"
replaceWith = .subannotation Lkotlin/ReplaceWith;
expression = "size"
imports = {}
.end subannotation
.end annotation
.line 81
invoke-virtual {p0}, Lokhttp3/Headers;->size()I
move-result p0
return p0
.end method
.method public final byteCount()J
.locals 6
iget-object v0, p0, Lokhttp3/Headers;->namesAndValues:[Ljava/lang/String;
.line 122
array-length v1, v0
mul-int/lit8 v1, v1, 0x2
int-to-long v1, v1
.line 124
array-length v0, v0
const/4 v3, 0x0
:goto_0
if-ge v3, v0, :cond_0
iget-object v4, p0, Lokhttp3/Headers;->namesAndValues:[Ljava/lang/String;
.line 125
aget-object v4, v4, v3
invoke-virtual {v4}, Ljava/lang/String;->length()I
move-result v4
int-to-long v4, v4
add-long/2addr v1, v4
add-int/lit8 v3, v3, 0x1
goto :goto_0
:cond_0
return-wide v1
.end method
.method public equals(Ljava/lang/Object;)Z
.locals 1
.line 178
instance-of v0, p1, Lokhttp3/Headers;
if-eqz v0, :cond_0
iget-object p0, p0, Lokhttp3/Headers;->namesAndValues:[Ljava/lang/String;
check-cast p1, Lokhttp3/Headers;
iget-object p1, p1, Lokhttp3/Headers;->namesAndValues:[Ljava/lang/String;
invoke-static {p0, p1}, Ljava/util/Arrays;->equals([Ljava/lang/Object;[Ljava/lang/Object;)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 final get(Ljava/lang/String;)Ljava/lang/String;
.locals 1
const-string v0, "name"
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
sget-object v0, Lokhttp3/Headers;->Companion:Lokhttp3/Headers$Companion;
iget-object p0, p0, Lokhttp3/Headers;->namesAndValues:[Ljava/lang/String;
.line 54
invoke-static {v0, p0, p1}, Lokhttp3/Headers$Companion;->access$get(Lokhttp3/Headers$Companion;[Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
move-result-object p0
return-object p0
.end method
.method public final getDate(Ljava/lang/String;)Ljava/util/Date;
.locals 1
const-string v0, "name"
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
.line 60
invoke-virtual {p0, p1}, Lokhttp3/Headers;->get(Ljava/lang/String;)Ljava/lang/String;
move-result-object p0
if-eqz p0, :cond_0
invoke-static {p0}, Lokhttp3/internal/http/DatesKt;->toHttpDateOrNull(Ljava/lang/String;)Ljava/util/Date;
move-result-object p0
goto :goto_0
:cond_0
const/4 p0, 0x0
:goto_0
return-object p0
.end method
.method public final getInstant(Ljava/lang/String;)Ljava/time/Instant;
.locals 1
const-string v0, "name"
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
.line 68
invoke-virtual {p0, p1}, Lokhttp3/Headers;->getDate(Ljava/lang/String;)Ljava/util/Date;
move-result-object p0
if-eqz p0, :cond_0
.line 69
invoke-virtual {p0}, Ljava/util/Date;->toInstant()Ljava/time/Instant;
move-result-object p0
goto :goto_0
:cond_0
const/4 p0, 0x0
:goto_0
return-object p0
.end method
.method public hashCode()I
.locals 0
iget-object p0, p0, Lokhttp3/Headers;->namesAndValues:[Ljava/lang/String;
.line 181
invoke-static {p0}, Ljava/util/Arrays;->hashCode([Ljava/lang/Object;)I
move-result p0
return p0
.end method
.method public iterator()Ljava/util/Iterator;
.locals 5
.annotation system Ldalvik/annotation/Signature;
value = {
"()",
"Ljava/util/Iterator<",
"Lkotlin/Pair<",
"Ljava/lang/String;",
"Ljava/lang/String;",
">;>;"
}
.end annotation
.line 132
invoke-virtual {p0}, Lokhttp3/Headers;->size()I
move-result v0
new-array v1, v0, [Lkotlin/Pair;
const/4 v2, 0x0
:goto_0
if-ge v2, v0, :cond_0
invoke-virtual {p0, v2}, Lokhttp3/Headers;->name(I)Ljava/lang/String;
move-result-object v3
invoke-virtual {p0, v2}, Lokhttp3/Headers;->value(I)Ljava/lang/String;
move-result-object v4
invoke-static {v3, v4}, Lkotlin/TuplesKt;->to(Ljava/lang/Object;Ljava/lang/Object;)Lkotlin/Pair;
move-result-object v3
aput-object v3, v1, v2
add-int/lit8 v2, v2, 0x1
goto :goto_0
:cond_0
invoke-static {v1}, Lkotlin/jvm/internal/ArrayIteratorKt;->iterator([Ljava/lang/Object;)Ljava/util/Iterator;
move-result-object p0
return-object p0
.end method
.method public final name(I)Ljava/lang/String;
.locals 0
iget-object p0, p0, Lokhttp3/Headers;->namesAndValues:[Ljava/lang/String;
mul-int/lit8 p1, p1, 0x2
.line 84
aget-object p0, p0, p1
return-object p0
.end method
.method public final names()Ljava/util/Set;
.locals 4
.annotation system Ldalvik/annotation/Signature;
value = {
"()",
"Ljava/util/Set<",
"Ljava/lang/String;",
">;"
}
.end annotation
.line 91
new-instance v0, Ljava/util/TreeSet;
sget-object v1, Lkotlin/jvm/internal/StringCompanionObject;->INSTANCE:Lkotlin/jvm/internal/StringCompanionObject;
invoke-static {v1}, Lkotlin/text/StringsKt;->getCASE_INSENSITIVE_ORDER(Lkotlin/jvm/internal/StringCompanionObject;)Ljava/util/Comparator;
move-result-object v1
invoke-direct {v0, v1}, Ljava/util/TreeSet;-><init>(Ljava/util/Comparator;)V
.line 92
invoke-virtual {p0}, Lokhttp3/Headers;->size()I
move-result v1
const/4 v2, 0x0
:goto_0
if-ge v2, v1, :cond_0
.line 93
invoke-virtual {p0, v2}, Lokhttp3/Headers;->name(I)Ljava/lang/String;
move-result-object v3
invoke-virtual {v0, v3}, Ljava/util/TreeSet;->add(Ljava/lang/Object;)Z
add-int/lit8 v2, v2, 0x1
goto :goto_0
.line 95
:cond_0
check-cast v0, Ljava/util/Set;
invoke-static {v0}, Ljava/util/Collections;->unmodifiableSet(Ljava/util/Set;)Ljava/util/Set;
move-result-object p0
const-string v0, "Collections.unmodifiableSet(result)"
invoke-static {p0, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
return-object p0
.end method
.method public final newBuilder()Lokhttp3/Headers$Builder;
.locals 2
.line 136
new-instance v0, Lokhttp3/Headers$Builder;
invoke-direct {v0}, Lokhttp3/Headers$Builder;-><init>()V
.line 137
invoke-virtual {v0}, Lokhttp3/Headers$Builder;->getNamesAndValues$okhttp()Ljava/util/List;
move-result-object v1
check-cast v1, Ljava/util/Collection;
iget-object p0, p0, Lokhttp3/Headers;->namesAndValues:[Ljava/lang/String;
invoke-static {v1, p0}, Lkotlin/collections/CollectionsKt;->addAll(Ljava/util/Collection;[Ljava/lang/Object;)Z
return-object v0
.end method
.method public final size()I
.locals 0
iget-object p0, p0, Lokhttp3/Headers;->namesAndValues:[Ljava/lang/String;
.line 74
array-length p0, p0
div-int/lit8 p0, p0, 0x2
return p0
.end method
.method public final toMultimap()Ljava/util/Map;
.locals 6
.annotation system Ldalvik/annotation/Signature;
value = {
"()",
"Ljava/util/Map<",
"Ljava/lang/String;",
"Ljava/util/List<",
"Ljava/lang/String;",
">;>;"
}
.end annotation
.line 195
new-instance v0, Ljava/util/TreeMap;
sget-object v1, Lkotlin/jvm/internal/StringCompanionObject;->INSTANCE:Lkotlin/jvm/internal/StringCompanionObject;
invoke-static {v1}, Lkotlin/text/StringsKt;->getCASE_INSENSITIVE_ORDER(Lkotlin/jvm/internal/StringCompanionObject;)Ljava/util/Comparator;
move-result-object v1
invoke-direct {v0, v1}, Ljava/util/TreeMap;-><init>(Ljava/util/Comparator;)V
.line 196
invoke-virtual {p0}, Lokhttp3/Headers;->size()I
move-result v1
const/4 v2, 0x0
:goto_0
if-ge v2, v1, :cond_2
.line 197
invoke-virtual {p0, v2}, Lokhttp3/Headers;->name(I)Ljava/lang/String;
move-result-object v3
sget-object v4, Ljava/util/Locale;->US:Ljava/util/Locale;
const-string v5, "Locale.US"
invoke-static {v4, v5}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
if-eqz v3, :cond_1
invoke-virtual {v3, v4}, Ljava/lang/String;->toLowerCase(Ljava/util/Locale;)Ljava/lang/String;
move-result-object v3
const-string v4, "(this as java.lang.String).toLowerCase(locale)"
invoke-static {v3, v4}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
.line 198
invoke-virtual {v0, v3}, Ljava/util/TreeMap;->get(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object v4
check-cast v4, Ljava/util/List;
if-nez v4, :cond_0
.line 200
new-instance v4, Ljava/util/ArrayList;
const/4 v5, 0x2
invoke-direct {v4, v5}, Ljava/util/ArrayList;-><init>(I)V
check-cast v4, Ljava/util/List;
.line 201
move-object v5, v0
check-cast v5, Ljava/util/Map;
invoke-interface {v5, v3, v4}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
.line 203
:cond_0
invoke-virtual {p0, v2}, Lokhttp3/Headers;->value(I)Ljava/lang/String;
move-result-object v3
invoke-interface {v4, v3}, Ljava/util/List;->add(Ljava/lang/Object;)Z
add-int/lit8 v2, v2, 0x1
goto :goto_0
.line 197
:cond_1
new-instance p0, Ljava/lang/NullPointerException;
const-string v0, "null cannot be cast to non-null type java.lang.String"
invoke-direct {p0, v0}, Ljava/lang/NullPointerException;-><init>(Ljava/lang/String;)V
throw p0
.line 205
:cond_2
check-cast v0, Ljava/util/Map;
return-object v0
.end method
.method public toString()Ljava/lang/String;
.locals 4
.line 184
new-instance v0, Ljava/lang/StringBuilder;
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
.line 185
invoke-virtual {p0}, Lokhttp3/Headers;->size()I
move-result v1
const/4 v2, 0x0
:goto_0
if-ge v2, v1, :cond_0
.line 186
invoke-virtual {p0, v2}, Lokhttp3/Headers;->name(I)Ljava/lang/String;
move-result-object v3
invoke-virtual {v0, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
const-string v3, ": "
.line 187
invoke-virtual {v0, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
.line 188
invoke-virtual {p0, v2}, Lokhttp3/Headers;->value(I)Ljava/lang/String;
move-result-object v3
invoke-virtual {v0, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
const-string v3, "\n"
.line 189
invoke-virtual {v0, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
add-int/lit8 v2, v2, 0x1
goto :goto_0
.line 184
:cond_0
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p0
const-string v0, "StringBuilder().apply(builderAction).toString()"
invoke-static {p0, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
return-object p0
.end method
.method public final value(I)Ljava/lang/String;
.locals 0
iget-object p0, p0, Lokhttp3/Headers;->namesAndValues:[Ljava/lang/String;
mul-int/lit8 p1, p1, 0x2
add-int/lit8 p1, p1, 0x1
.line 87
aget-object p0, p0, p1
return-object p0
.end method
.method public final values(Ljava/lang/String;)Ljava/util/List;
.locals 5
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/lang/String;",
")",
"Ljava/util/List<",
"Ljava/lang/String;",
">;"
}
.end annotation
const-string v0, "name"
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
const/4 v0, 0x0
.line 100
move-object v1, v0
check-cast v1, Ljava/util/List;
.line 101
invoke-virtual {p0}, Lokhttp3/Headers;->size()I
move-result v1
const/4 v2, 0x0
:goto_0
if-ge v2, v1, :cond_2
.line 102
invoke-virtual {p0, v2}, Lokhttp3/Headers;->name(I)Ljava/lang/String;
move-result-object v3
const/4 v4, 0x1
invoke-static {p1, v3, v4}, Lkotlin/text/StringsKt;->equals(Ljava/lang/String;Ljava/lang/String;Z)Z
move-result v3
if-eqz v3, :cond_1
if-nez v0, :cond_0
.line 103
new-instance v0, Ljava/util/ArrayList;
const/4 v3, 0x2
invoke-direct {v0, v3}, Ljava/util/ArrayList;-><init>(I)V
check-cast v0, Ljava/util/List;
.line 104
:cond_0
invoke-virtual {p0, v2}, Lokhttp3/Headers;->value(I)Ljava/lang/String;
move-result-object v3
invoke-interface {v0, v3}, Ljava/util/List;->add(Ljava/lang/Object;)Z
:cond_1
add-int/lit8 v2, v2, 0x1
goto :goto_0
:cond_2
if-eqz v0, :cond_3
.line 108
invoke-static {v0}, Ljava/util/Collections;->unmodifiableList(Ljava/util/List;)Ljava/util/List;
move-result-object p0
const-string p1, "Collections.unmodifiableList(result)"
invoke-static {p0, p1}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
goto :goto_1
.line 110
:cond_3
invoke-static {}, Lkotlin/collections/CollectionsKt;->emptyList()Ljava/util/List;
move-result-object p0
:goto_1
return-object p0
.end method