mirror of
https://github.com/Pinball3D/Rabbit-R1.git
synced 2024-12-25 16:42:30 -06:00
389 lines
12 KiB
Smali
389 lines
12 KiB
Smali
.class public final Lokhttp3/MultipartBody$Builder;
|
|
.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 = "Builder"
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/SourceDebugExtension;
|
|
value = "SMAP\nMultipartBody.kt\nKotlin\n*S Kotlin\n*F\n+ 1 MultipartBody.kt\nokhttp3/MultipartBody$Builder\n+ 2 fake.kt\nkotlin/jvm/internal/FakeKt\n*L\n1#1,345:1\n1#2:346\n*E\n"
|
|
.end annotation
|
|
|
|
.annotation runtime Lkotlin/Metadata;
|
|
bv = {
|
|
0x1,
|
|
0x0,
|
|
0x3
|
|
}
|
|
d1 = {
|
|
"\u0000@\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0000\n\u0002\u0010\u000e\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010!\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0008\u0005\n\u0002\u0018\u0002\n\u0002\u0008\u0002\n\u0002\u0018\u0002\n\u0002\u0008\u0002\n\u0002\u0018\u0002\n\u0002\u0008\u0002\u0018\u00002\u00020\u0001B\u0011\u0008\u0007\u0012\u0008\u0008\u0002\u0010\u0002\u001a\u00020\u0003\u00a2\u0006\u0002\u0010\u0004J\u0016\u0010\u000b\u001a\u00020\u00002\u0006\u0010\u000c\u001a\u00020\u00032\u0006\u0010\r\u001a\u00020\u0003J \u0010\u000b\u001a\u00020\u00002\u0006\u0010\u000c\u001a\u00020\u00032\u0008\u0010\u000e\u001a\u0004\u0018\u00010\u00032\u0006\u0010\u000f\u001a\u00020\u0010J\u0018\u0010\u0011\u001a\u00020\u00002\u0008\u0010\u0012\u001a\u0004\u0018\u00010\u00132\u0006\u0010\u000f\u001a\u00020\u0010J\u000e\u0010\u0011\u001a\u00020\u00002\u0006\u0010\u0014\u001a\u00020\u0008J\u000e\u0010\u0011\u001a\u00020\u00002\u0006\u0010\u000f\u001a\u00020\u0010J\u0006\u0010\u0015\u001a\u00020\u0016J\u000e\u0010\u0017\u001a\u00020\u00002\u0006\u0010\t\u001a\u00020\nR\u000e\u0010\u0002\u001a\u00020\u0005X\u0082\u0004\u00a2\u0006\u0002\n\u0000R\u0014\u0010\u0006\u001a\u0008\u0012\u0004\u0012\u00020\u00080\u0007X\u0082\u0004\u00a2\u0006\u0002\n\u0000R\u000e\u0010\t\u001a\u00020\nX\u0082\u000e\u00a2\u0006\u0002\n\u0000\u00a8\u0006\u0018"
|
|
}
|
|
d2 = {
|
|
"Lokhttp3/MultipartBody$Builder;",
|
|
"",
|
|
"boundary",
|
|
"",
|
|
"(Ljava/lang/String;)V",
|
|
"Lokio/ByteString;",
|
|
"parts",
|
|
"",
|
|
"Lokhttp3/MultipartBody$Part;",
|
|
"type",
|
|
"Lokhttp3/MediaType;",
|
|
"addFormDataPart",
|
|
"name",
|
|
"value",
|
|
"filename",
|
|
"body",
|
|
"Lokhttp3/RequestBody;",
|
|
"addPart",
|
|
"headers",
|
|
"Lokhttp3/Headers;",
|
|
"part",
|
|
"build",
|
|
"Lokhttp3/MultipartBody;",
|
|
"setType",
|
|
"okhttp"
|
|
}
|
|
k = 0x1
|
|
mv = {
|
|
0x1,
|
|
0x4,
|
|
0x0
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# instance fields
|
|
.field private final boundary:Lokio/ByteString;
|
|
|
|
.field private final parts:Ljava/util/List;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Ljava/util/List<",
|
|
"Lokhttp3/MultipartBody$Part;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field private type:Lokhttp3/MediaType;
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>()V
|
|
.locals 2
|
|
|
|
const/4 v0, 0x0
|
|
|
|
const/4 v1, 0x1
|
|
|
|
invoke-direct {p0, v0, v1, v0}, Lokhttp3/MultipartBody$Builder;-><init>(Ljava/lang/String;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>(Ljava/lang/String;)V
|
|
.locals 1
|
|
|
|
const-string v0, "boundary"
|
|
|
|
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
.line 231
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
.line 232
|
|
sget-object v0, Lokio/ByteString;->Companion:Lokio/ByteString$Companion;
|
|
|
|
invoke-virtual {v0, p1}, Lokio/ByteString$Companion;->encodeUtf8(Ljava/lang/String;)Lokio/ByteString;
|
|
|
|
move-result-object p1
|
|
|
|
iput-object p1, p0, Lokhttp3/MultipartBody$Builder;->boundary:Lokio/ByteString;
|
|
|
|
.line 233
|
|
sget-object p1, Lokhttp3/MultipartBody;->MIXED:Lokhttp3/MediaType;
|
|
|
|
iput-object p1, p0, Lokhttp3/MultipartBody$Builder;->type:Lokhttp3/MediaType;
|
|
|
|
.line 234
|
|
new-instance p1, Ljava/util/ArrayList;
|
|
|
|
invoke-direct {p1}, Ljava/util/ArrayList;-><init>()V
|
|
|
|
check-cast p1, Ljava/util/List;
|
|
|
|
iput-object p1, p0, Lokhttp3/MultipartBody$Builder;->parts:Ljava/util/List;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public synthetic constructor <init>(Ljava/lang/String;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
|
|
.locals 0
|
|
|
|
and-int/lit8 p2, p2, 0x1
|
|
|
|
if-eqz p2, :cond_0
|
|
|
|
.line 231
|
|
invoke-static {}, Ljava/util/UUID;->randomUUID()Ljava/util/UUID;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p1}, Ljava/util/UUID;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
const-string p2, "UUID.randomUUID().toString()"
|
|
|
|
invoke-static {p1, p2}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
:cond_0
|
|
invoke-direct {p0, p1}, Lokhttp3/MultipartBody$Builder;-><init>(Ljava/lang/String;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public final addFormDataPart(Ljava/lang/String;Ljava/lang/String;)Lokhttp3/MultipartBody$Builder;
|
|
.locals 1
|
|
|
|
const-string v0, "name"
|
|
|
|
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const-string v0, "value"
|
|
|
|
invoke-static {p2, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
.line 256
|
|
move-object v0, p0
|
|
|
|
check-cast v0, Lokhttp3/MultipartBody$Builder;
|
|
|
|
.line 257
|
|
sget-object v0, Lokhttp3/MultipartBody$Part;->Companion:Lokhttp3/MultipartBody$Part$Companion;
|
|
|
|
invoke-virtual {v0, p1, p2}, Lokhttp3/MultipartBody$Part$Companion;->createFormData(Ljava/lang/String;Ljava/lang/String;)Lokhttp3/MultipartBody$Part;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p0, p1}, Lokhttp3/MultipartBody$Builder;->addPart(Lokhttp3/MultipartBody$Part;)Lokhttp3/MultipartBody$Builder;
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public final addFormDataPart(Ljava/lang/String;Ljava/lang/String;Lokhttp3/RequestBody;)Lokhttp3/MultipartBody$Builder;
|
|
.locals 1
|
|
|
|
const-string v0, "name"
|
|
|
|
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const-string v0, "body"
|
|
|
|
invoke-static {p3, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
.line 261
|
|
move-object v0, p0
|
|
|
|
check-cast v0, Lokhttp3/MultipartBody$Builder;
|
|
|
|
.line 262
|
|
sget-object v0, Lokhttp3/MultipartBody$Part;->Companion:Lokhttp3/MultipartBody$Part$Companion;
|
|
|
|
invoke-virtual {v0, p1, p2, p3}, Lokhttp3/MultipartBody$Part$Companion;->createFormData(Ljava/lang/String;Ljava/lang/String;Lokhttp3/RequestBody;)Lokhttp3/MultipartBody$Part;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p0, p1}, Lokhttp3/MultipartBody$Builder;->addPart(Lokhttp3/MultipartBody$Part;)Lokhttp3/MultipartBody$Builder;
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public final addPart(Lokhttp3/Headers;Lokhttp3/RequestBody;)Lokhttp3/MultipartBody$Builder;
|
|
.locals 1
|
|
|
|
const-string v0, "body"
|
|
|
|
invoke-static {p2, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
.line 251
|
|
move-object v0, p0
|
|
|
|
check-cast v0, Lokhttp3/MultipartBody$Builder;
|
|
|
|
.line 252
|
|
sget-object v0, Lokhttp3/MultipartBody$Part;->Companion:Lokhttp3/MultipartBody$Part$Companion;
|
|
|
|
invoke-virtual {v0, p1, p2}, Lokhttp3/MultipartBody$Part$Companion;->create(Lokhttp3/Headers;Lokhttp3/RequestBody;)Lokhttp3/MultipartBody$Part;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p0, p1}, Lokhttp3/MultipartBody$Builder;->addPart(Lokhttp3/MultipartBody$Part;)Lokhttp3/MultipartBody$Builder;
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public final addPart(Lokhttp3/MultipartBody$Part;)Lokhttp3/MultipartBody$Builder;
|
|
.locals 1
|
|
|
|
const-string v0, "part"
|
|
|
|
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
.line 266
|
|
move-object v0, p0
|
|
|
|
check-cast v0, Lokhttp3/MultipartBody$Builder;
|
|
|
|
iget-object v0, p0, Lokhttp3/MultipartBody$Builder;->parts:Ljava/util/List;
|
|
|
|
.line 267
|
|
check-cast v0, Ljava/util/Collection;
|
|
|
|
invoke-interface {v0, p1}, Ljava/util/Collection;->add(Ljava/lang/Object;)Z
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public final addPart(Lokhttp3/RequestBody;)Lokhttp3/MultipartBody$Builder;
|
|
.locals 1
|
|
|
|
const-string v0, "body"
|
|
|
|
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
.line 246
|
|
move-object v0, p0
|
|
|
|
check-cast v0, Lokhttp3/MultipartBody$Builder;
|
|
|
|
.line 247
|
|
sget-object v0, Lokhttp3/MultipartBody$Part;->Companion:Lokhttp3/MultipartBody$Part$Companion;
|
|
|
|
invoke-virtual {v0, p1}, Lokhttp3/MultipartBody$Part$Companion;->create(Lokhttp3/RequestBody;)Lokhttp3/MultipartBody$Part;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p0, p1}, Lokhttp3/MultipartBody$Builder;->addPart(Lokhttp3/MultipartBody$Part;)Lokhttp3/MultipartBody$Builder;
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public final build()Lokhttp3/MultipartBody;
|
|
.locals 3
|
|
|
|
iget-object v0, p0, Lokhttp3/MultipartBody$Builder;->parts:Ljava/util/List;
|
|
|
|
.line 272
|
|
check-cast v0, Ljava/util/Collection;
|
|
|
|
invoke-interface {v0}, Ljava/util/Collection;->isEmpty()Z
|
|
|
|
move-result v0
|
|
|
|
xor-int/lit8 v0, v0, 0x1
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
.line 273
|
|
new-instance v0, Lokhttp3/MultipartBody;
|
|
|
|
iget-object v1, p0, Lokhttp3/MultipartBody$Builder;->boundary:Lokio/ByteString;
|
|
|
|
iget-object v2, p0, Lokhttp3/MultipartBody$Builder;->type:Lokhttp3/MediaType;
|
|
|
|
iget-object p0, p0, Lokhttp3/MultipartBody$Builder;->parts:Ljava/util/List;
|
|
|
|
invoke-static {p0}, Lokhttp3/internal/Util;->toImmutableList(Ljava/util/List;)Ljava/util/List;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-direct {v0, v1, v2, p0}, Lokhttp3/MultipartBody;-><init>(Lokio/ByteString;Lokhttp3/MediaType;Ljava/util/List;)V
|
|
|
|
return-object v0
|
|
|
|
.line 272
|
|
:cond_0
|
|
new-instance p0, Ljava/lang/IllegalStateException;
|
|
|
|
const-string v0, "Multipart body must have at least one part."
|
|
|
|
invoke-virtual {v0}, Ljava/lang/Object;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-direct {p0, v0}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
|
|
|
|
check-cast p0, Ljava/lang/Throwable;
|
|
|
|
throw p0
|
|
.end method
|
|
|
|
.method public final setType(Lokhttp3/MediaType;)Lokhttp3/MultipartBody$Builder;
|
|
.locals 2
|
|
|
|
const-string v0, "type"
|
|
|
|
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
.line 240
|
|
move-object v0, p0
|
|
|
|
check-cast v0, Lokhttp3/MultipartBody$Builder;
|
|
|
|
.line 241
|
|
invoke-virtual {p1}, Lokhttp3/MediaType;->type()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
const-string v1, "multipart"
|
|
|
|
invoke-static {v0, v1}, Lkotlin/jvm/internal/Intrinsics;->areEqual(Ljava/lang/Object;Ljava/lang/Object;)Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
iput-object p1, p0, Lokhttp3/MultipartBody$Builder;->type:Lokhttp3/MediaType;
|
|
|
|
return-object p0
|
|
|
|
:cond_0
|
|
new-instance p0, Ljava/lang/StringBuilder;
|
|
|
|
const-string v0, "multipart != "
|
|
|
|
invoke-direct {p0, v0}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
|
|
|
|
invoke-virtual {p0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-virtual {p0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
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
|
|
|
|
check-cast p1, Ljava/lang/Throwable;
|
|
|
|
throw p1
|
|
.end method
|