e.smali
.class public final Lcom/tencent/mm/opensdk/diffdev/a/e;
.super Ljava/lang/Object;
# direct methods
.method public static a(Ljava/lang/String;)[B
.registers 10
const-string v0, "httpGet ex:"
const-string v1, "MicroMsg.SDK.NetUtil"
const/4 v2, 0x0
if-eqz p0, :cond_153
invoke-virtual {p0}, Ljava/lang/String;->length()I
move-result v3
if-nez v3, :cond_f
goto/16 :goto_153
:cond_f
:try_start_f
new-instance v3, Ljava/net/URL;
invoke-direct {v3, p0}, Ljava/net/URL;-><init>(Ljava/lang/String;)V
invoke-virtual {v3}, Ljava/net/URL;->openConnection()Ljava/net/URLConnection;
move-result-object p0
check-cast p0, Ljava/net/HttpURLConnection;
:try_end_1a
.catch Ljava/net/MalformedURLException; {:try_start_f .. :try_end_1a} :catch_113
.catch Ljava/io/IOException; {:try_start_f .. :try_end_1a} :catch_e8
.catch Ljava/lang/Exception; {:try_start_f .. :try_end_1a} :catch_bd
.catchall {:try_start_f .. :try_end_1a} :catchall_b7
if-nez p0, :cond_27
:try_start_1c
const-string v3, "open connection failed."
invoke-static {v1, v3}, Lcom/tencent/mm/opensdk/utils/Log;->e(Ljava/lang/String;Ljava/lang/String;)V
:try_end_21
.catch Ljava/net/MalformedURLException; {:try_start_1c .. :try_end_21} :catch_b3
.catch Ljava/io/IOException; {:try_start_1c .. :try_end_21} :catch_b0
.catch Ljava/lang/Exception; {:try_start_1c .. :try_end_21} :catch_ad
.catchall {:try_start_1c .. :try_end_21} :catchall_aa
if-eqz p0, :cond_26
:try_start_23
invoke-virtual {p0}, Ljava/net/HttpURLConnection;->disconnect()V
:try_end_26
.catch Ljava/lang/Throwable; {:try_start_23 .. :try_end_26} :catch_26
:catch_26
:cond_26
return-object v2
:cond_27
:try_start_27
const-string v3, "GET"
invoke-virtual {p0, v3}, Ljava/net/HttpURLConnection;->setRequestMethod(Ljava/lang/String;)V
const v3, 0xea60
invoke-virtual {p0, v3}, Ljava/net/HttpURLConnection;->setConnectTimeout(I)V
invoke-virtual {p0, v3}, Ljava/net/HttpURLConnection;->setReadTimeout(I)V
invoke-virtual {p0}, Ljava/net/HttpURLConnection;->getResponseCode()I
move-result v3
const/16 v4, 0x12c
if-lt v3, v4, :cond_48
const-string v3, "httpURLConnectionGet 300"
invoke-static {v1, v3}, Lcom/tencent/mm/opensdk/utils/Log;->e(Ljava/lang/String;Ljava/lang/String;)V
:try_end_42
.catch Ljava/net/MalformedURLException; {:try_start_27 .. :try_end_42} :catch_b3
.catch Ljava/io/IOException; {:try_start_27 .. :try_end_42} :catch_b0
.catch Ljava/lang/Exception; {:try_start_27 .. :try_end_42} :catch_ad
.catchall {:try_start_27 .. :try_end_42} :catchall_aa
if-eqz p0, :cond_47
:try_start_44
invoke-virtual {p0}, Ljava/net/HttpURLConnection;->disconnect()V
:try_end_47
.catch Ljava/lang/Throwable; {:try_start_44 .. :try_end_47} :catch_47
:catch_47
:cond_47
return-object v2
:cond_48
:try_start_48
invoke-virtual {p0}, Ljava/net/HttpURLConnection;->getInputStream()Ljava/io/InputStream;
move-result-object v3
:try_end_4c
.catch Ljava/net/MalformedURLException; {:try_start_48 .. :try_end_4c} :catch_b3
.catch Ljava/io/IOException; {:try_start_48 .. :try_end_4c} :catch_b0
.catch Ljava/lang/Exception; {:try_start_48 .. :try_end_4c} :catch_ad
.catchall {:try_start_48 .. :try_end_4c} :catchall_aa
:try_start_4c
new-instance v4, Ljava/io/ByteArrayOutputStream;
invoke-direct {v4}, Ljava/io/ByteArrayOutputStream;-><init>()V
:try_end_51
.catch Ljava/net/MalformedURLException; {:try_start_4c .. :try_end_51} :catch_a3
.catch Ljava/io/IOException; {:try_start_4c .. :try_end_51} :catch_9d
.catch Ljava/lang/Exception; {:try_start_4c .. :try_end_51} :catch_97
.catchall {:try_start_4c .. :try_end_51} :catchall_92
const/16 v5, 0x400
:try_start_53
new-array v5, v5, [B
:goto_55
invoke-virtual {v3, v5}, Ljava/io/InputStream;->read([B)I
move-result v6
const/4 v7, -0x1
if-eq v6, v7, :cond_61
const/4 v7, 0x0
invoke-virtual {v4, v5, v7, v6}, Ljava/io/ByteArrayOutputStream;->write([BII)V
goto :goto_55
:cond_61
invoke-virtual {v4}, Ljava/io/ByteArrayOutputStream;->toByteArray()[B
move-result-object v5
const-string v6, "httpGet end"
invoke-static {v1, v6}, Lcom/tencent/mm/opensdk/utils/Log;->d(Ljava/lang/String;Ljava/lang/String;)V
:try_end_6a
.catch Ljava/net/MalformedURLException; {:try_start_53 .. :try_end_6a} :catch_8b
.catch Ljava/io/IOException; {:try_start_53 .. :try_end_6a} :catch_84
.catch Ljava/lang/Exception; {:try_start_53 .. :try_end_6a} :catch_7d
.catchall {:try_start_53 .. :try_end_6a} :catchall_7a
if-eqz p0, :cond_71
:try_start_6c
invoke-virtual {p0}, Ljava/net/HttpURLConnection;->disconnect()V
:try_end_6f
.catch Ljava/lang/Throwable; {:try_start_6c .. :try_end_6f} :catch_70
goto :goto_71
:catch_70
nop
:cond_71
:goto_71
if-eqz v3, :cond_76
:try_start_73
invoke-virtual {v3}, Ljava/io/InputStream;->close()V
:try_end_76
.catch Ljava/lang/Throwable; {:try_start_73 .. :try_end_76} :catch_76
:catch_76
:cond_76
:try_start_76
invoke-virtual {v4}, Ljava/io/ByteArrayOutputStream;->close()V
:try_end_79
.catch Ljava/lang/Throwable; {:try_start_76 .. :try_end_79} :catch_79
:catch_79
return-object v5
:catchall_7a
move-exception v0
move-object v5, v4
goto :goto_94
:catch_7d
move-exception v5
move-object v8, v4
move-object v4, v3
move-object v3, v5
move-object v5, v8
goto/16 :goto_c1
:catch_84
move-exception v5
move-object v8, v4
move-object v4, v3
move-object v3, v5
move-object v5, v8
goto/16 :goto_ec
:catch_8b
move-exception v5
move-object v8, v4
move-object v4, v3
move-object v3, v5
move-object v5, v8
goto/16 :goto_117
:catchall_92
move-exception v0
move-object v5, v2
:goto_94
move-object v4, v3
goto/16 :goto_13f
:catch_97
move-exception v4
move-object v5, v2
move-object v8, v4
move-object v4, v3
move-object v3, v8
goto :goto_c1
:catch_9d
move-exception v4
move-object v5, v2
move-object v8, v4
move-object v4, v3
move-object v3, v8
goto :goto_ec
:catch_a3
move-exception v4
move-object v5, v2
move-object v8, v4
move-object v4, v3
move-object v3, v8
goto/16 :goto_117
:catchall_aa
move-exception v0
move-object v4, v2
goto :goto_ba
:catch_ad
move-exception v3
move-object v4, v2
goto :goto_c0
:catch_b0
move-exception v3
move-object v4, v2
goto :goto_eb
:catch_b3
move-exception v3
move-object v4, v2
goto/16 :goto_116
:catchall_b7
move-exception v0
move-object p0, v2
move-object v4, p0
:goto_ba
move-object v5, v4
goto/16 :goto_13f
:catch_bd
move-exception v3
move-object p0, v2
move-object v4, p0
:goto_c0
move-object v5, v4
:goto_c1
:try_start_c1
new-instance v6, Ljava/lang/StringBuilder;
invoke-direct {v6, v0}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
invoke-virtual {v3}, Ljava/lang/Exception;->getMessage()Ljava/lang/String;
move-result-object v0
invoke-virtual {v6, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v6}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v0
invoke-static {v1, v0}, Lcom/tencent/mm/opensdk/utils/Log;->e(Ljava/lang/String;Ljava/lang/String;)V
:try_end_d4
.catchall {:try_start_c1 .. :try_end_d4} :catchall_13e
if-eqz p0, :cond_db
:try_start_d6
invoke-virtual {p0}, Ljava/net/HttpURLConnection;->disconnect()V
:try_end_d9
.catch Ljava/lang/Throwable; {:try_start_d6 .. :try_end_d9} :catch_da
goto :goto_db
:catch_da
nop
:cond_db
:goto_db
if-eqz v4, :cond_e2
:try_start_dd
invoke-virtual {v4}, Ljava/io/InputStream;->close()V
:try_end_e0
.catch Ljava/lang/Throwable; {:try_start_dd .. :try_end_e0} :catch_e1
goto :goto_e2
:catch_e1
nop
:cond_e2
:goto_e2
if-eqz v5, :cond_e7
:try_start_e4
invoke-virtual {v5}, Ljava/io/ByteArrayOutputStream;->close()V
:try_end_e7
.catch Ljava/lang/Throwable; {:try_start_e4 .. :try_end_e7} :catch_e7
:catch_e7
:cond_e7
return-object v2
:catch_e8
move-exception v3
move-object p0, v2
move-object v4, p0
:goto_eb
move-object v5, v4
:goto_ec
:try_start_ec
new-instance v6, Ljava/lang/StringBuilder;
invoke-direct {v6, v0}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
invoke-virtual {v3}, Ljava/io/IOException;->getMessage()Ljava/lang/String;
move-result-object v0
invoke-virtual {v6, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v6}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v0
invoke-static {v1, v0}, Lcom/tencent/mm/opensdk/utils/Log;->e(Ljava/lang/String;Ljava/lang/String;)V
:try_end_ff
.catchall {:try_start_ec .. :try_end_ff} :catchall_13e
if-eqz p0, :cond_106
:try_start_101
invoke-virtual {p0}, Ljava/net/HttpURLConnection;->disconnect()V
:try_end_104
.catch Ljava/lang/Throwable; {:try_start_101 .. :try_end_104} :catch_105
goto :goto_106
:catch_105
nop
:cond_106
:goto_106
if-eqz v4, :cond_10d
:try_start_108
invoke-virtual {v4}, Ljava/io/InputStream;->close()V
:try_end_10b
.catch Ljava/lang/Throwable; {:try_start_108 .. :try_end_10b} :catch_10c
goto :goto_10d
:catch_10c
nop
:cond_10d
:goto_10d
if-eqz v5, :cond_112
:try_start_10f
invoke-virtual {v5}, Ljava/io/ByteArrayOutputStream;->close()V
:try_end_112
.catch Ljava/lang/Throwable; {:try_start_10f .. :try_end_112} :catch_112
:catch_112
:cond_112
return-object v2
:catch_113
move-exception v3
move-object p0, v2
move-object v4, p0
:goto_116
move-object v5, v4
:goto_117
:try_start_117
new-instance v6, Ljava/lang/StringBuilder;
invoke-direct {v6, v0}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
invoke-virtual {v3}, Ljava/net/MalformedURLException;->getMessage()Ljava/lang/String;
move-result-object v0
invoke-virtual {v6, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v6}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v0
invoke-static {v1, v0}, Lcom/tencent/mm/opensdk/utils/Log;->e(Ljava/lang/String;Ljava/lang/String;)V
:try_end_12a
.catchall {:try_start_117 .. :try_end_12a} :catchall_13e
if-eqz p0, :cond_131
:try_start_12c
invoke-virtual {p0}, Ljava/net/HttpURLConnection;->disconnect()V
:try_end_12f
.catch Ljava/lang/Throwable; {:try_start_12c .. :try_end_12f} :catch_130
goto :goto_131
:catch_130
nop
:cond_131
:goto_131
if-eqz v4, :cond_138
:try_start_133
invoke-virtual {v4}, Ljava/io/InputStream;->close()V
:try_end_136
.catch Ljava/lang/Throwable; {:try_start_133 .. :try_end_136} :catch_137
goto :goto_138
:catch_137
nop
:cond_138
:goto_138
if-eqz v5, :cond_13d
:try_start_13a
invoke-virtual {v5}, Ljava/io/ByteArrayOutputStream;->close()V
:try_end_13d
.catch Ljava/lang/Throwable; {:try_start_13a .. :try_end_13d} :catch_13d
:catch_13d
:cond_13d
return-object v2
:catchall_13e
move-exception v0
:goto_13f
if-eqz p0, :cond_146
:try_start_141
invoke-virtual {p0}, Ljava/net/HttpURLConnection;->disconnect()V
:try_end_144
.catch Ljava/lang/Throwable; {:try_start_141 .. :try_end_144} :catch_145
goto :goto_146
:catch_145
nop
:cond_146
:goto_146
if-eqz v4, :cond_14d
:try_start_148
invoke-virtual {v4}, Ljava/io/InputStream;->close()V
:try_end_14b
.catch Ljava/lang/Throwable; {:try_start_148 .. :try_end_14b} :catch_14c
goto :goto_14d
:catch_14c
nop
:cond_14d
:goto_14d
if-eqz v5, :cond_152
:try_start_14f
invoke-virtual {v5}, Ljava/io/ByteArrayOutputStream;->close()V
:try_end_152
.catch Ljava/lang/Throwable; {:try_start_14f .. :try_end_152} :catch_152
:catch_152
:cond_152
throw v0
:cond_153
:goto_153
const-string p0, "httpGet, url is null"
invoke-static {v1, p0}, Lcom/tencent/mm/opensdk/utils/Log;->e(Ljava/lang/String;Ljava/lang/String;)V
return-object v2
.end method