.class public final Lokhttp3/MultipartBody$Part$Companion; .super Ljava/lang/Object; .source "MultipartBody.kt" # annotations .annotation system Ldalvik/annotation/EnclosingClass; value = Lokhttp3/MultipartBody$Part; .end annotation .annotation system Ldalvik/annotation/InnerClass; accessFlags = 0x19 name = "Companion" .end annotation .annotation system Ldalvik/annotation/SourceDebugExtension; value = "SMAP\nMultipartBody.kt\nKotlin\n*S Kotlin\n*F\n+ 1 MultipartBody.kt\nokhttp3/MultipartBody$Part$Companion\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\u0002\u0008\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0008\u0002\n\u0002\u0010\u000e\n\u0002\u0008\u0003\u0008\u0086\u0003\u0018\u00002\u00020\u0001B\u0007\u0008\u0002\u00a2\u0006\u0002\u0010\u0002J\u001a\u0010\u0003\u001a\u00020\u00042\u0008\u0010\u0005\u001a\u0004\u0018\u00010\u00062\u0006\u0010\u0007\u001a\u00020\u0008H\u0007J\u0010\u0010\u0003\u001a\u00020\u00042\u0006\u0010\u0007\u001a\u00020\u0008H\u0007J\u0018\u0010\t\u001a\u00020\u00042\u0006\u0010\n\u001a\u00020\u000b2\u0006\u0010\u000c\u001a\u00020\u000bH\u0007J\"\u0010\t\u001a\u00020\u00042\u0006\u0010\n\u001a\u00020\u000b2\u0008\u0010\r\u001a\u0004\u0018\u00010\u000b2\u0006\u0010\u0007\u001a\u00020\u0008H\u0007\u00a8\u0006\u000e" } d2 = { "Lokhttp3/MultipartBody$Part$Companion;", "", "()V", "create", "Lokhttp3/MultipartBody$Part;", "headers", "Lokhttp3/Headers;", "body", "Lokhttp3/RequestBody;", "createFormData", "name", "", "value", "filename", "okhttp" } k = 0x1 mv = { 0x1, 0x4, 0x0 } .end annotation # direct methods .method private constructor ()V .locals 0 .line 195 invoke-direct {p0}, Ljava/lang/Object;->()V return-void .end method .method public synthetic constructor (Lkotlin/jvm/internal/DefaultConstructorMarker;)V .locals 0 .line 195 invoke-direct {p0}, Lokhttp3/MultipartBody$Part$Companion;->()V return-void .end method # virtual methods .method public final create(Lokhttp3/Headers;Lokhttp3/RequestBody;)Lokhttp3/MultipartBody$Part; .locals 3 .annotation runtime Lkotlin/jvm/JvmStatic; .end annotation const-string p0, "body" invoke-static {p2, p0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V const/4 p0, 0x0 if-eqz p1, :cond_0 const-string v0, "Content-Type" .line 201 invoke-virtual {p1, v0}, Lokhttp3/Headers;->get(Ljava/lang/String;)Ljava/lang/String; move-result-object v0 goto :goto_0 :cond_0 move-object v0, p0 :goto_0 const/4 v1, 0x1 const/4 v2, 0x0 if-nez v0, :cond_1 move v0, v1 goto :goto_1 :cond_1 move v0, v2 :goto_1 if-eqz v0, :cond_5 if-eqz p1, :cond_2 const-string v0, "Content-Length" .line 202 invoke-virtual {p1, v0}, Lokhttp3/Headers;->get(Ljava/lang/String;)Ljava/lang/String; move-result-object v0 goto :goto_2 :cond_2 move-object v0, p0 :goto_2 if-nez v0, :cond_3 goto :goto_3 :cond_3 move v1, v2 :goto_3 if-eqz v1, :cond_4 .line 203 new-instance v0, Lokhttp3/MultipartBody$Part; invoke-direct {v0, p1, p2, p0}, Lokhttp3/MultipartBody$Part;->(Lokhttp3/Headers;Lokhttp3/RequestBody;Lkotlin/jvm/internal/DefaultConstructorMarker;)V return-object v0 .line 202 :cond_4 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;->(Ljava/lang/String;)V check-cast p0, Ljava/lang/Throwable; throw p0 .line 201 :cond_5 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;->(Ljava/lang/String;)V check-cast p0, Ljava/lang/Throwable; throw p0 .end method .method public final create(Lokhttp3/RequestBody;)Lokhttp3/MultipartBody$Part; .locals 1 .annotation runtime Lkotlin/jvm/JvmStatic; .end annotation const-string v0, "body" invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V .line 197 move-object v0, p0 check-cast v0, Lokhttp3/MultipartBody$Part$Companion; const/4 v0, 0x0 invoke-virtual {p0, v0, p1}, Lokhttp3/MultipartBody$Part$Companion;->create(Lokhttp3/Headers;Lokhttp3/RequestBody;)Lokhttp3/MultipartBody$Part; move-result-object p0 return-object p0 .end method .method public final createFormData(Ljava/lang/String;Ljava/lang/String;)Lokhttp3/MultipartBody$Part; .locals 3 .annotation runtime Lkotlin/jvm/JvmStatic; .end annotation 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 208 move-object v0, p0 check-cast v0, Lokhttp3/MultipartBody$Part$Companion; sget-object v0, Lokhttp3/RequestBody;->Companion:Lokhttp3/RequestBody$Companion; const/4 v1, 0x1 const/4 v2, 0x0 invoke-static {v0, p2, v2, v1, v2}, Lokhttp3/RequestBody$Companion;->create$default(Lokhttp3/RequestBody$Companion;Ljava/lang/String;Lokhttp3/MediaType;ILjava/lang/Object;)Lokhttp3/RequestBody; move-result-object p2 invoke-virtual {p0, p1, v2, p2}, Lokhttp3/MultipartBody$Part$Companion;->createFormData(Ljava/lang/String;Ljava/lang/String;Lokhttp3/RequestBody;)Lokhttp3/MultipartBody$Part; move-result-object p0 return-object p0 .end method .method public final createFormData(Ljava/lang/String;Ljava/lang/String;Lokhttp3/RequestBody;)Lokhttp3/MultipartBody$Part; .locals 2 .annotation runtime Lkotlin/jvm/JvmStatic; .end annotation 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 212 new-instance v0, Ljava/lang/StringBuilder; invoke-direct {v0}, Ljava/lang/StringBuilder;->()V const-string v1, "form-data; name=" .line 213 invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; .line 214 sget-object v1, Lokhttp3/MultipartBody;->Companion:Lokhttp3/MultipartBody$Companion; invoke-virtual {v1, v0, p1}, Lokhttp3/MultipartBody$Companion;->appendQuotedString$okhttp(Ljava/lang/StringBuilder;Ljava/lang/String;)V if-eqz p2, :cond_0 const-string p1, "; filename=" .line 217 invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; .line 218 sget-object p1, Lokhttp3/MultipartBody;->Companion:Lokhttp3/MultipartBody$Companion; invoke-virtual {p1, v0, p2}, Lokhttp3/MultipartBody$Companion;->appendQuotedString$okhttp(Ljava/lang/StringBuilder;Ljava/lang/String;)V .line 212 :cond_0 invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; move-result-object p1 const-string p2, "StringBuilder().apply(builderAction).toString()" invoke-static {p1, p2}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V .line 222 new-instance p2, Lokhttp3/Headers$Builder; invoke-direct {p2}, Lokhttp3/Headers$Builder;->()V const-string v0, "Content-Disposition" .line 223 invoke-virtual {p2, v0, p1}, Lokhttp3/Headers$Builder;->addUnsafeNonAscii(Ljava/lang/String;Ljava/lang/String;)Lokhttp3/Headers$Builder; move-result-object p1 .line 224 invoke-virtual {p1}, Lokhttp3/Headers$Builder;->build()Lokhttp3/Headers; move-result-object p1 .line 226 move-object p2, p0 check-cast p2, Lokhttp3/MultipartBody$Part$Companion; invoke-virtual {p0, p1, p3}, Lokhttp3/MultipartBody$Part$Companion;->create(Lokhttp3/Headers;Lokhttp3/RequestBody;)Lokhttp3/MultipartBody$Part; move-result-object p0 return-object p0 .end method