2020-07-16 19:51:49 +00:00
|
|
|
.class public final Lq0/t/a/b;
|
2020-05-17 12:40:10 +00:00
|
|
|
.super Ljava/lang/Object;
|
|
|
|
.source "GsonRequestBodyConverter.java"
|
|
|
|
|
|
|
|
# interfaces
|
2020-07-16 19:51:49 +00:00
|
|
|
.implements Lq0/e;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
|
|
|
|
# annotations
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"<T:",
|
|
|
|
"Ljava/lang/Object;",
|
|
|
|
">",
|
|
|
|
"Ljava/lang/Object;",
|
2020-07-16 19:51:49 +00:00
|
|
|
"Lq0/e<",
|
2020-05-17 12:40:10 +00:00
|
|
|
"TT;",
|
|
|
|
"Lokhttp3/RequestBody;",
|
|
|
|
">;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
|
|
|
|
# static fields
|
|
|
|
.field public static final c:Lokhttp3/MediaType;
|
|
|
|
|
|
|
|
.field public static final d:Ljava/nio/charset/Charset;
|
|
|
|
|
|
|
|
|
|
|
|
# instance fields
|
|
|
|
.field public final a:Lcom/google/gson/Gson;
|
|
|
|
|
|
|
|
.field public final b:Lcom/google/gson/TypeAdapter;
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"Lcom/google/gson/TypeAdapter<",
|
|
|
|
"TT;>;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
.end field
|
|
|
|
|
|
|
|
|
|
|
|
# direct methods
|
|
|
|
.method public static constructor <clinit>()V
|
|
|
|
.locals 1
|
|
|
|
|
|
|
|
const-string v0, "application/json; charset=UTF-8"
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-static {v0}, Lokhttp3/MediaType;->c(Ljava/lang/String;)Lokhttp3/MediaType;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
2020-07-16 19:51:49 +00:00
|
|
|
sput-object v0, Lq0/t/a/b;->c:Lokhttp3/MediaType;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
const-string v0, "UTF-8"
|
|
|
|
|
|
|
|
invoke-static {v0}, Ljava/nio/charset/Charset;->forName(Ljava/lang/String;)Ljava/nio/charset/Charset;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
2020-07-16 19:51:49 +00:00
|
|
|
sput-object v0, Lq0/t/a/b;->d:Ljava/nio/charset/Charset;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public constructor <init>(Lcom/google/gson/Gson;Lcom/google/gson/TypeAdapter;)V
|
|
|
|
.locals 0
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"(",
|
|
|
|
"Lcom/google/gson/Gson;",
|
|
|
|
"Lcom/google/gson/TypeAdapter<",
|
|
|
|
"TT;>;)V"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
|
2020-07-16 19:51:49 +00:00
|
|
|
iput-object p1, p0, Lq0/t/a/b;->a:Lcom/google/gson/Gson;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-16 19:51:49 +00:00
|
|
|
iput-object p2, p0, Lq0/t/a/b;->b:Lcom/google/gson/TypeAdapter;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
|
|
|
|
# virtual methods
|
|
|
|
.method public a(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
.locals 4
|
|
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
|
|
value = {
|
|
|
|
Ljava/io/IOException;
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
2020-07-16 19:51:49 +00:00
|
|
|
new-instance v0, Lo0/e;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-16 19:51:49 +00:00
|
|
|
invoke-direct {v0}, Lo0/e;-><init>()V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
new-instance v1, Ljava/io/OutputStreamWriter;
|
|
|
|
|
2020-07-16 19:51:49 +00:00
|
|
|
new-instance v2, Lo0/f;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-16 19:51:49 +00:00
|
|
|
invoke-direct {v2, v0}, Lo0/f;-><init>(Lo0/e;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-16 19:51:49 +00:00
|
|
|
sget-object v3, Lq0/t/a/b;->d:Ljava/nio/charset/Charset;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
invoke-direct {v1, v2, v3}, Ljava/io/OutputStreamWriter;-><init>(Ljava/io/OutputStream;Ljava/nio/charset/Charset;)V
|
|
|
|
|
2020-07-16 19:51:49 +00:00
|
|
|
iget-object v2, p0, Lq0/t/a/b;->a:Lcom/google/gson/Gson;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-virtual {v2, v1}, Lcom/google/gson/Gson;->i(Ljava/io/Writer;)Lcom/google/gson/stream/JsonWriter;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
2020-07-16 19:51:49 +00:00
|
|
|
iget-object v2, p0, Lq0/t/a/b;->b:Lcom/google/gson/TypeAdapter;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
invoke-virtual {v2, v1, p1}, Lcom/google/gson/TypeAdapter;->write(Lcom/google/gson/stream/JsonWriter;Ljava/lang/Object;)V
|
|
|
|
|
|
|
|
invoke-virtual {v1}, Lcom/google/gson/stream/JsonWriter;->close()V
|
|
|
|
|
2020-07-16 19:51:49 +00:00
|
|
|
sget-object p1, Lq0/t/a/b;->c:Lokhttp3/MediaType;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-16 19:51:49 +00:00
|
|
|
invoke-virtual {v0}, Lo0/e;->j()Lokio/ByteString;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
invoke-static {p1, v0}, Lokhttp3/RequestBody;->create(Lokhttp3/MediaType;Lokio/ByteString;)Lokhttp3/RequestBody;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
return-object p1
|
|
|
|
.end method
|