2020-05-17 12:40:10 +00:00
|
|
|
.class public final Lokhttp3/MultipartBody$Part;
|
|
|
|
.super Ljava/lang/Object;
|
|
|
|
.source "MultipartBody.kt"
|
|
|
|
|
|
|
|
|
|
|
|
# annotations
|
|
|
|
.annotation system Ldalvik/annotation/EnclosingClass;
|
|
|
|
value = Lokhttp3/MultipartBody;
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
.annotation system Ldalvik/annotation/InnerClass;
|
|
|
|
accessFlags = 0x19
|
|
|
|
name = "Part"
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
|
|
|
|
# instance fields
|
|
|
|
.field public final a:Lokhttp3/Headers;
|
|
|
|
|
|
|
|
.field public final b:Lokhttp3/RequestBody;
|
|
|
|
|
|
|
|
|
|
|
|
# direct methods
|
2020-07-08 16:44:49 +00:00
|
|
|
.method public constructor <init>(Lokhttp3/Headers;Lokhttp3/RequestBody;Lkotlin/jvm/internal/DefaultConstructorMarker;)V
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
|
|
|
|
iput-object p1, p0, Lokhttp3/MultipartBody$Part;->a:Lokhttp3/Headers;
|
|
|
|
|
|
|
|
iput-object p2, p0, Lokhttp3/MultipartBody$Part;->b:Lokhttp3/RequestBody;
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public static final a(Lokhttp3/Headers;Lokhttp3/RequestBody;)Lokhttp3/MultipartBody$Part;
|
2020-05-17 12:40:10 +00:00
|
|
|
.locals 2
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
const-string v0, "Content-Type"
|
|
|
|
|
|
|
|
invoke-virtual {p0, v0}, Lokhttp3/Headers;->c(Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object v0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
const/4 v1, 0x0
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
if-nez v0, :cond_0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
const/4 v0, 0x1
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
goto :goto_0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
:cond_0
|
|
|
|
const/4 v0, 0x0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
:goto_0
|
|
|
|
if-eqz v0, :cond_3
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
const-string v0, "Content-Length"
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-virtual {p0, v0}, Lokhttp3/Headers;->c(Ljava/lang/String;)Ljava/lang/String;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
move-result-object v0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
if-nez v0, :cond_1
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
const/4 v1, 0x1
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
:cond_1
|
|
|
|
if-eqz v1, :cond_2
|
|
|
|
|
|
|
|
new-instance v0, Lokhttp3/MultipartBody$Part;
|
|
|
|
|
|
|
|
const/4 v1, 0x0
|
|
|
|
|
|
|
|
invoke-direct {v0, p0, p1, v1}, Lokhttp3/MultipartBody$Part;-><init>(Lokhttp3/Headers;Lokhttp3/RequestBody;Lkotlin/jvm/internal/DefaultConstructorMarker;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
return-object v0
|
2020-07-08 16:44:49 +00:00
|
|
|
|
|
|
|
:cond_2
|
|
|
|
new-instance p0, Ljava/lang/IllegalArgumentException;
|
|
|
|
|
|
|
|
const-string p1, "Unexpected header: Content-Length"
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Ljava/lang/Object;->toString()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
invoke-direct {p0, p1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
|
|
|
|
|
|
|
|
throw p0
|
|
|
|
|
|
|
|
:cond_3
|
|
|
|
new-instance p0, Ljava/lang/IllegalArgumentException;
|
|
|
|
|
|
|
|
const-string p1, "Unexpected header: Content-Type"
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Ljava/lang/Object;->toString()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
invoke-direct {p0, p1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
|
|
|
|
|
|
|
|
throw p0
|
2020-05-17 12:40:10 +00:00
|
|
|
.end method
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
.method public static final b(Ljava/lang/String;Ljava/lang/String;Lokhttp3/RequestBody;)Lokhttp3/MultipartBody$Part;
|
|
|
|
.locals 9
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
const/4 v0, 0x0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
if-eqz p0, :cond_6
|
|
|
|
|
|
|
|
const-string v1, "form-data; name="
|
|
|
|
|
2020-07-14 22:43:59 +00:00
|
|
|
invoke-static {v1}, Lf/e/b/a/a;->D(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
2020-07-08 16:44:49 +00:00
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
sget-object v2, Lokhttp3/MultipartBody;->k:Lokhttp3/MultipartBody$b;
|
|
|
|
|
|
|
|
invoke-virtual {v2, v1, p0}, Lokhttp3/MultipartBody$b;->a(Ljava/lang/StringBuilder;Ljava/lang/String;)V
|
|
|
|
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
|
|
|
|
const-string p0, "; filename="
|
|
|
|
|
|
|
|
invoke-virtual {v1, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
sget-object p0, Lokhttp3/MultipartBody;->k:Lokhttp3/MultipartBody$b;
|
|
|
|
|
|
|
|
invoke-virtual {p0, v1, p1}, Lokhttp3/MultipartBody$b;->a(Ljava/lang/StringBuilder;Ljava/lang/String;)V
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object p0
|
|
|
|
|
|
|
|
const-string p1, "StringBuilder().apply(builderAction).toString()"
|
|
|
|
|
2020-07-25 00:57:58 +00:00
|
|
|
invoke-static {p0, p1}, Lj0/n/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-07-08 16:44:49 +00:00
|
|
|
|
|
|
|
new-instance p1, Ljava/util/ArrayList;
|
|
|
|
|
|
|
|
const/16 v1, 0x14
|
|
|
|
|
|
|
|
invoke-direct {p1, v1}, Ljava/util/ArrayList;-><init>(I)V
|
|
|
|
|
|
|
|
const-string v1, "Content-Disposition"
|
|
|
|
|
|
|
|
const/16 v2, 0x13
|
|
|
|
|
|
|
|
const/4 v3, 0x0
|
|
|
|
|
|
|
|
const/4 v4, 0x0
|
|
|
|
|
|
|
|
:goto_0
|
|
|
|
if-ge v4, v2, :cond_4
|
|
|
|
|
|
|
|
invoke-virtual {v1, v4}, Ljava/lang/String;->charAt(I)C
|
|
|
|
|
|
|
|
move-result v5
|
|
|
|
|
|
|
|
const/16 v6, 0x7e
|
|
|
|
|
|
|
|
const/16 v7, 0x21
|
|
|
|
|
|
|
|
const/4 v8, 0x1
|
|
|
|
|
|
|
|
if-le v7, v5, :cond_1
|
|
|
|
|
|
|
|
goto :goto_1
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
if-lt v6, v5, :cond_2
|
|
|
|
|
|
|
|
const/4 v6, 0x1
|
|
|
|
|
|
|
|
goto :goto_2
|
|
|
|
|
|
|
|
:cond_2
|
|
|
|
:goto_1
|
|
|
|
const/4 v6, 0x0
|
|
|
|
|
|
|
|
:goto_2
|
|
|
|
if-eqz v6, :cond_3
|
|
|
|
|
|
|
|
add-int/lit8 v4, v4, 0x1
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_3
|
|
|
|
const/4 p0, 0x3
|
|
|
|
|
|
|
|
new-array p0, p0, [Ljava/lang/Object;
|
|
|
|
|
|
|
|
invoke-static {v5}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
aput-object p1, p0, v3
|
|
|
|
|
|
|
|
invoke-static {v4}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
aput-object p1, p0, v8
|
|
|
|
|
|
|
|
const/4 p1, 0x2
|
|
|
|
|
|
|
|
aput-object v1, p0, p1
|
|
|
|
|
|
|
|
const-string p1, "Unexpected char %#04x at %d in header name: %s"
|
|
|
|
|
2020-07-23 01:06:17 +00:00
|
|
|
invoke-static {p1, p0}, Ln0/g0/b;->l(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
|
2020-07-08 16:44:49 +00:00
|
|
|
|
|
|
|
move-result-object p0
|
|
|
|
|
|
|
|
new-instance p1, Ljava/lang/IllegalArgumentException;
|
|
|
|
|
|
|
|
invoke-virtual {p0}, Ljava/lang/Object;->toString()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object p0
|
|
|
|
|
|
|
|
invoke-direct {p1, p0}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
|
|
|
|
|
|
|
|
throw p1
|
|
|
|
|
|
|
|
:cond_4
|
|
|
|
invoke-virtual {p1, v1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
|
|
|
|
|
2020-07-25 00:57:58 +00:00
|
|
|
invoke-static {p0}, Lj0/t/p;->trim(Ljava/lang/CharSequence;)Ljava/lang/CharSequence;
|
2020-07-08 16:44:49 +00:00
|
|
|
|
|
|
|
move-result-object p0
|
|
|
|
|
|
|
|
invoke-virtual {p0}, Ljava/lang/Object;->toString()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object p0
|
|
|
|
|
|
|
|
invoke-virtual {p1, p0}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
|
|
|
|
|
|
|
|
new-array p0, v3, [Ljava/lang/String;
|
|
|
|
|
|
|
|
invoke-virtual {p1, p0}, Ljava/util/ArrayList;->toArray([Ljava/lang/Object;)[Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object p0
|
|
|
|
|
|
|
|
if-eqz p0, :cond_5
|
|
|
|
|
|
|
|
check-cast p0, [Ljava/lang/String;
|
|
|
|
|
|
|
|
new-instance p1, Lokhttp3/Headers;
|
|
|
|
|
|
|
|
invoke-direct {p1, p0, v0}, Lokhttp3/Headers;-><init>([Ljava/lang/String;Lkotlin/jvm/internal/DefaultConstructorMarker;)V
|
|
|
|
|
|
|
|
invoke-static {p1, p2}, Lokhttp3/MultipartBody$Part;->a(Lokhttp3/Headers;Lokhttp3/RequestBody;)Lokhttp3/MultipartBody$Part;
|
|
|
|
|
|
|
|
move-result-object p0
|
|
|
|
|
|
|
|
return-object p0
|
|
|
|
|
|
|
|
:cond_5
|
|
|
|
new-instance p0, Lkotlin/TypeCastException;
|
|
|
|
|
|
|
|
const-string p1, "null cannot be cast to non-null type kotlin.Array<T>"
|
|
|
|
|
|
|
|
invoke-direct {p0, p1}, Lkotlin/TypeCastException;-><init>(Ljava/lang/String;)V
|
|
|
|
|
|
|
|
throw p0
|
|
|
|
|
|
|
|
:cond_6
|
|
|
|
const-string p0, "name"
|
|
|
|
|
2020-07-25 00:57:58 +00:00
|
|
|
invoke-static {p0}, Lj0/n/c/h;->c(Ljava/lang/String;)V
|
2020-07-08 16:44:49 +00:00
|
|
|
|
|
|
|
throw v0
|
2020-05-17 12:40:10 +00:00
|
|
|
.end method
|