c.smali
.class public abstract Lcom/huawei/updatesdk/sdk/a/c/c;
.super Ljava/lang/Object;
# direct methods
.method public static a(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
.registers 12
const-wide/16 v6, 0x0
const/4 v0, 0x0
:try_start_3
invoke-static {p1}, Ljava/security/MessageDigest;->getInstance(Ljava/lang/String;)Ljava/security/MessageDigest;
move-result-object v1
new-instance v2, Ljava/io/FileInputStream;
invoke-direct {v2, p0}, Ljava/io/FileInputStream;-><init>(Ljava/lang/String;)V
:try_end_c
.catch Ljava/security/NoSuchAlgorithmException; {:try_start_3 .. :try_end_c} :catch_3a
.catch Ljava/io/FileNotFoundException; {:try_start_3 .. :try_end_c} :catch_52
.catch Ljava/io/IOException; {:try_start_3 .. :try_end_c} :catch_6a
.catch Ljava/lang/IllegalArgumentException; {:try_start_3 .. :try_end_c} :catch_82
.catch Ljava/lang/IndexOutOfBoundsException; {:try_start_3 .. :try_end_c} :catch_9a
.catchall {:try_start_3 .. :try_end_c} :catchall_b3
const/16 v3, 0x400
:try_start_e
new-array v3, v3, [B
move-wide v4, v6
:goto_11
invoke-virtual {v2, v3}, Ljava/io/FileInputStream;->read([B)I
move-result v8
const/4 v9, -0x1
if-eq v8, v9, :cond_1f
const/4 v9, 0x0
invoke-virtual {v1, v3, v9, v8}, Ljava/security/MessageDigest;->update([BII)V
int-to-long v8, v8
add-long/2addr v4, v8
goto :goto_11
:cond_1f
cmp-long v3, v4, v6
if-lez v3, :cond_2b
invoke-virtual {v1}, Ljava/security/MessageDigest;->digest()[B
move-result-object v1
invoke-static {v1}, Lcom/huawei/updatesdk/sdk/a/c/b;->a([B)Ljava/lang/String;
:try_end_2a
.catch Ljava/security/NoSuchAlgorithmException; {:try_start_e .. :try_end_2a} :catch_cf
.catch Ljava/io/FileNotFoundException; {:try_start_e .. :try_end_2a} :catch_cd
.catch Ljava/io/IOException; {:try_start_e .. :try_end_2a} :catch_cb
.catch Ljava/lang/IllegalArgumentException; {:try_start_e .. :try_end_2a} :catch_c9
.catch Ljava/lang/IndexOutOfBoundsException; {:try_start_e .. :try_end_2a} :catch_c7
.catchall {:try_start_e .. :try_end_2a} :catchall_c5
move-result-object v0
:cond_2b
if-eqz v2, :cond_30
:try_start_2d
invoke-virtual {v2}, Ljava/io/FileInputStream;->close()V
:try_end_30
.catch Ljava/io/IOException; {:try_start_2d .. :try_end_30} :catch_31
:cond_30
:goto_30
return-object v0
:catch_31
move-exception v1
const-string v1, "FileUtil"
const-string v2, "Close FileInputStream failed!"
invoke-static {v1, v2}, Lcom/huawei/updatesdk/sdk/a/b/a/a/a;->d(Ljava/lang/String;Ljava/lang/String;)V
goto :goto_30
:catch_3a
move-exception v1
move-object v2, v0
:goto_3c
:try_start_3c
const-string v3, "FileUtil"
const-string v4, "getFileHashData NoSuchAlgorithmException"
invoke-static {v3, v4, v1}, Lcom/huawei/updatesdk/sdk/a/b/a/a/a;->a(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)V
:try_end_43
.catchall {:try_start_3c .. :try_end_43} :catchall_c5
if-eqz v2, :cond_30
:try_start_45
invoke-virtual {v2}, Ljava/io/FileInputStream;->close()V
:try_end_48
.catch Ljava/io/IOException; {:try_start_45 .. :try_end_48} :catch_49
goto :goto_30
:catch_49
move-exception v1
const-string v1, "FileUtil"
const-string v2, "Close FileInputStream failed!"
invoke-static {v1, v2}, Lcom/huawei/updatesdk/sdk/a/b/a/a/a;->d(Ljava/lang/String;Ljava/lang/String;)V
goto :goto_30
:catch_52
move-exception v1
move-object v2, v0
:goto_54
:try_start_54
const-string v3, "FileUtil"
const-string v4, "getFileHashData FileNotFoundException"
invoke-static {v3, v4, v1}, Lcom/huawei/updatesdk/sdk/a/b/a/a/a;->a(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)V
:try_end_5b
.catchall {:try_start_54 .. :try_end_5b} :catchall_c5
if-eqz v2, :cond_30
:try_start_5d
invoke-virtual {v2}, Ljava/io/FileInputStream;->close()V
:try_end_60
.catch Ljava/io/IOException; {:try_start_5d .. :try_end_60} :catch_61
goto :goto_30
:catch_61
move-exception v1
const-string v1, "FileUtil"
const-string v2, "Close FileInputStream failed!"
invoke-static {v1, v2}, Lcom/huawei/updatesdk/sdk/a/b/a/a/a;->d(Ljava/lang/String;Ljava/lang/String;)V
goto :goto_30
:catch_6a
move-exception v1
move-object v2, v0
:goto_6c
:try_start_6c
const-string v3, "FileUtil"
const-string v4, "getFileHashData IOException"
invoke-static {v3, v4, v1}, Lcom/huawei/updatesdk/sdk/a/b/a/a/a;->a(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)V
:try_end_73
.catchall {:try_start_6c .. :try_end_73} :catchall_c5
if-eqz v2, :cond_30
:try_start_75
invoke-virtual {v2}, Ljava/io/FileInputStream;->close()V
:try_end_78
.catch Ljava/io/IOException; {:try_start_75 .. :try_end_78} :catch_79
goto :goto_30
:catch_79
move-exception v1
const-string v1, "FileUtil"
const-string v2, "Close FileInputStream failed!"
invoke-static {v1, v2}, Lcom/huawei/updatesdk/sdk/a/b/a/a/a;->d(Ljava/lang/String;Ljava/lang/String;)V
goto :goto_30
:catch_82
move-exception v1
move-object v2, v0
:goto_84
:try_start_84
const-string v3, "FileUtil"
const-string v4, "getFileHashData IllegalArgumentException"
invoke-static {v3, v4, v1}, Lcom/huawei/updatesdk/sdk/a/b/a/a/a;->a(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)V
:try_end_8b
.catchall {:try_start_84 .. :try_end_8b} :catchall_c5
if-eqz v2, :cond_30
:try_start_8d
invoke-virtual {v2}, Ljava/io/FileInputStream;->close()V
:try_end_90
.catch Ljava/io/IOException; {:try_start_8d .. :try_end_90} :catch_91
goto :goto_30
:catch_91
move-exception v1
const-string v1, "FileUtil"
const-string v2, "Close FileInputStream failed!"
invoke-static {v1, v2}, Lcom/huawei/updatesdk/sdk/a/b/a/a/a;->d(Ljava/lang/String;Ljava/lang/String;)V
goto :goto_30
:catch_9a
move-exception v1
move-object v2, v0
:goto_9c
:try_start_9c
const-string v3, "FileUtil"
const-string v4, "getFileHashData IndexOutOfBoundsException"
invoke-static {v3, v4, v1}, Lcom/huawei/updatesdk/sdk/a/b/a/a/a;->a(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)V
:try_end_a3
.catchall {:try_start_9c .. :try_end_a3} :catchall_c5
if-eqz v2, :cond_30
:try_start_a5
invoke-virtual {v2}, Ljava/io/FileInputStream;->close()V
:try_end_a8
.catch Ljava/io/IOException; {:try_start_a5 .. :try_end_a8} :catch_a9
goto :goto_30
:catch_a9
move-exception v1
const-string v1, "FileUtil"
const-string v2, "Close FileInputStream failed!"
invoke-static {v1, v2}, Lcom/huawei/updatesdk/sdk/a/b/a/a/a;->d(Ljava/lang/String;Ljava/lang/String;)V
goto/16 :goto_30
:catchall_b3
move-exception v1
move-object v2, v0
move-object v0, v1
:goto_b6
if-eqz v2, :cond_bb
:try_start_b8
invoke-virtual {v2}, Ljava/io/FileInputStream;->close()V
:try_end_bb
.catch Ljava/io/IOException; {:try_start_b8 .. :try_end_bb} :catch_bc
:cond_bb
:goto_bb
throw v0
:catch_bc
move-exception v1
const-string v1, "FileUtil"
const-string v2, "Close FileInputStream failed!"
invoke-static {v1, v2}, Lcom/huawei/updatesdk/sdk/a/b/a/a/a;->d(Ljava/lang/String;Ljava/lang/String;)V
goto :goto_bb
:catchall_c5
move-exception v0
goto :goto_b6
:catch_c7
move-exception v1
goto :goto_9c
:catch_c9
move-exception v1
goto :goto_84
:catch_cb
move-exception v1
goto :goto_6c
:catch_cd
move-exception v1
goto :goto_54
:catch_cf
move-exception v1
goto/16 :goto_3c
.end method
.method public static a(Ljava/io/Closeable;)V
.registers 4
if-eqz p0, :cond_5
:try_start_2
invoke-interface {p0}, Ljava/io/Closeable;->close()V
:try_end_5
.catch Ljava/io/IOException; {:try_start_2 .. :try_end_5} :catch_6
:cond_5
:goto_5
return-void
:catch_6
move-exception v0
const-string v1, "FileUtil"
const-string v2, "Closeable exception"
invoke-static {v1, v2, v0}, Lcom/huawei/updatesdk/sdk/a/b/a/a/a;->a(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)V
goto :goto_5
.end method