196 lines
4.5 KiB
Smali
196 lines
4.5 KiB
Smali
.class public Lj8/d;
|
|
.super Ljava/lang/Object;
|
|
.source "RequestParams.java"
|
|
|
|
|
|
# static fields
|
|
.field public static final c:Ljava/nio/charset/Charset;
|
|
|
|
|
|
# instance fields
|
|
.field public a:Ljava/util/concurrent/ConcurrentHashMap;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Ljava/util/concurrent/ConcurrentHashMap<",
|
|
"Ljava/lang/String;",
|
|
"Ljava/lang/String;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field public b:Ljava/nio/charset/Charset;
|
|
|
|
|
|
# direct methods
|
|
.method public static constructor <clinit>()V
|
|
.locals 1
|
|
|
|
const-string v0, "UTF-8"
|
|
|
|
.line 1
|
|
invoke-static {v0}, Ljava/nio/charset/Charset;->forName(Ljava/lang/String;)Ljava/nio/charset/Charset;
|
|
|
|
move-result-object v0
|
|
|
|
sput-object v0, Lj8/d;->c:Ljava/nio/charset/Charset;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>()V
|
|
.locals 1
|
|
|
|
.line 1
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
.line 2
|
|
new-instance v0, Ljava/util/concurrent/ConcurrentHashMap;
|
|
|
|
invoke-direct {v0}, Ljava/util/concurrent/ConcurrentHashMap;-><init>()V
|
|
|
|
iput-object v0, p0, Lj8/d;->a:Ljava/util/concurrent/ConcurrentHashMap;
|
|
|
|
.line 3
|
|
sget-object v0, Lj8/d;->c:Ljava/nio/charset/Charset;
|
|
|
|
iput-object v0, p0, Lj8/d;->b:Ljava/nio/charset/Charset;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public a()I
|
|
.locals 1
|
|
|
|
.line 1
|
|
iget-object v0, p0, Lj8/d;->a:Ljava/util/concurrent/ConcurrentHashMap;
|
|
|
|
invoke-virtual {v0}, Ljava/util/concurrent/ConcurrentHashMap;->size()I
|
|
|
|
move-result v0
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public b()Ljava/nio/charset/Charset;
|
|
.locals 1
|
|
|
|
.line 1
|
|
iget-object v0, p0, Lj8/d;->b:Ljava/nio/charset/Charset;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public c()Ljava/lang/String;
|
|
.locals 5
|
|
|
|
.line 1
|
|
:try_start_0
|
|
new-instance v0, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
.line 2
|
|
iget-object v1, p0, Lj8/d;->a:Ljava/util/concurrent/ConcurrentHashMap;
|
|
|
|
invoke-virtual {v1}, Ljava/util/concurrent/ConcurrentHashMap;->entrySet()Ljava/util/Set;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-interface {v1}, Ljava/util/Set;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object v1
|
|
|
|
:goto_0
|
|
invoke-interface {v1}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v2
|
|
|
|
if-eqz v2, :cond_1
|
|
|
|
invoke-interface {v1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object v2
|
|
|
|
check-cast v2, Ljava/util/Map$Entry;
|
|
|
|
.line 3
|
|
invoke-virtual {v0}, Ljava/lang/StringBuilder;->length()I
|
|
|
|
move-result v3
|
|
|
|
if-lez v3, :cond_0
|
|
|
|
const-string v3, "&"
|
|
|
|
invoke-virtual {v0, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
.line 4
|
|
:cond_0
|
|
invoke-interface {v2}, Ljava/util/Map$Entry;->getKey()Ljava/lang/Object;
|
|
|
|
move-result-object v3
|
|
|
|
check-cast v3, Ljava/lang/String;
|
|
|
|
iget-object v4, p0, Lj8/d;->b:Ljava/nio/charset/Charset;
|
|
|
|
invoke-virtual {v4}, Ljava/nio/charset/Charset;->name()Ljava/lang/String;
|
|
|
|
move-result-object v4
|
|
|
|
invoke-static {v3, v4}, Ljava/net/URLEncoder;->encode(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-virtual {v0, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
const-string v3, "="
|
|
|
|
.line 5
|
|
invoke-virtual {v0, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
.line 6
|
|
invoke-interface {v2}, Ljava/util/Map$Entry;->getValue()Ljava/lang/Object;
|
|
|
|
move-result-object v2
|
|
|
|
check-cast v2, Ljava/lang/String;
|
|
|
|
iget-object v3, p0, Lj8/d;->b:Ljava/nio/charset/Charset;
|
|
|
|
invoke-virtual {v3}, Ljava/nio/charset/Charset;->name()Ljava/lang/String;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-static {v2, v3}, Ljava/net/URLEncoder;->encode(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
goto :goto_0
|
|
|
|
.line 7
|
|
:cond_1
|
|
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
:try_end_0
|
|
.catch Ljava/io/UnsupportedEncodingException; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
return-object v0
|
|
|
|
:catch_0
|
|
move-exception v0
|
|
|
|
.line 8
|
|
invoke-virtual {v0}, Ljava/io/UnsupportedEncodingException;->printStackTrace()V
|
|
|
|
const-string v0, ""
|
|
|
|
return-object v0
|
|
.end method
|