72 lines
1.6 KiB
Smali
72 lines
1.6 KiB
Smali
.class public abstract Lcom/skt/aicloud/sdk/BaseJsonRequestBody;
|
|
.super Lokhttp3/RequestBody;
|
|
.source "BaseJsonRequestBody.java"
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>()V
|
|
.locals 0
|
|
|
|
.line 1
|
|
invoke-direct {p0}, Lokhttp3/RequestBody;-><init>()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public final contentType()Lokhttp3/MediaType;
|
|
.locals 1
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
.end annotation
|
|
|
|
const-string v0, "application/json; charset=utf-8"
|
|
|
|
.line 1
|
|
invoke-static {v0}, Lokhttp3/MediaType;->parse(Ljava/lang/String;)Lokhttp3/MediaType;
|
|
|
|
move-result-object v0
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public abstract getJsonObject()Lorg/json/JSONObject;
|
|
.end method
|
|
|
|
.method public final writeTo(Lzj/n;)V
|
|
.locals 2
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
.line 1
|
|
invoke-virtual {p0}, Lcom/skt/aicloud/sdk/BaseJsonRequestBody;->getJsonObject()Lorg/json/JSONObject;
|
|
|
|
move-result-object v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
const-string/jumbo v1, "utf-8"
|
|
|
|
.line 2
|
|
invoke-static {v1}, Ljava/nio/charset/Charset;->forName(Ljava/lang/String;)Ljava/nio/charset/Charset;
|
|
|
|
move-result-object v1
|
|
|
|
.line 3
|
|
invoke-virtual {v0}, Lorg/json/JSONObject;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/String;->getBytes(Ljava/nio/charset/Charset;)[B
|
|
|
|
move-result-object v0
|
|
|
|
invoke-interface {p1, v0}, Lzj/n;->write([B)Lzj/n;
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|