i.smali
.class public Lcom/cleanmaster/pluginscommonlib/i;
.super Ljava/lang/Object;
.source "FileUtils.java"
# direct methods
.method public static a(Ljava/lang/String;Ljava/lang/String;)I
.registers 10
.prologue
const/4 v3, 0x0
const/4 v1, 0x0
const/4 v0, -0x1
.line 50
if-eqz p0, :cond_e
if-eqz p1, :cond_e
invoke-virtual {p0, p1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v2
if-eqz v2, :cond_e
.line 80
:cond_d
:goto_d
return v0
.line 54
:cond_e
if-eqz p0, :cond_d
.line 58
const/4 v2, 0x0
.line 59
const/4 v4, 0x0
.line 63
:try_start_12
new-instance v5, Ljava/io/File;
invoke-direct {v5, p0}, Ljava/io/File;-><init>(Ljava/lang/String;)V
.line 64
invoke-virtual {v5}, Ljava/io/File;->exists()Z
move-result v5
if-eqz v5, :cond_5e
.line 65
new-instance v4, Ljava/io/FileInputStream;
invoke-direct {v4, p0}, Ljava/io/FileInputStream;-><init>(Ljava/lang/String;)V
:try_end_22
.catch Ljava/lang/Exception; {:try_start_12 .. :try_end_22} :catch_8a
.catchall {:try_start_12 .. :try_end_22} :catchall_6c
.line 66
:try_start_22
new-instance v2, Ljava/io/FileOutputStream;
invoke-direct {v2, p1}, Ljava/io/FileOutputStream;-><init>(Ljava/lang/String;)V
:try_end_27
.catch Ljava/lang/Exception; {:try_start_22 .. :try_end_27} :catch_8d
.catchall {:try_start_22 .. :try_end_27} :catchall_85
.line 67
const/16 v3, 0x5a4
:try_start_29
new-array v5, v3, [B
move v3, v1
.line 68
:goto_2c
invoke-virtual {v4, v5}, Ljava/io/InputStream;->read([B)I
move-result v6
if-eq v6, v0, :cond_48
.line 69
add-int/2addr v3, v6
.line 71
const/4 v7, 0x0
invoke-virtual {v2, v5, v7, v6}, Ljava/io/FileOutputStream;->write([BII)V
:try_end_37
.catch Ljava/lang/Exception; {:try_start_29 .. :try_end_37} :catch_38
.catchall {:try_start_29 .. :try_end_37} :catchall_87
goto :goto_2c
.line 79
:catch_38
move-exception v1
move-object v1, v2
move-object v3, v4
.line 83
:goto_3b
if-eqz v3, :cond_40
.line 84
:try_start_3d
invoke-virtual {v3}, Ljava/io/InputStream;->close()V
:try_end_40
.catch Ljava/lang/Exception; {:try_start_3d .. :try_end_40} :catch_7f
.line 91
:cond_40
:goto_40
if-eqz v1, :cond_d
.line 92
:try_start_42
invoke-virtual {v1}, Ljava/io/FileOutputStream;->close()V
:try_end_45
.catch Ljava/lang/Exception; {:try_start_42 .. :try_end_45} :catch_46
goto :goto_d
.line 94
:catch_46
move-exception v1
goto :goto_d
.line 73
:cond_48
:try_start_48
invoke-virtual {v2}, Ljava/io/FileOutputStream;->flush()V
.line 74
invoke-virtual {v2}, Ljava/io/FileOutputStream;->getFD()Ljava/io/FileDescriptor;
move-result-object v3
invoke-virtual {v3}, Ljava/io/FileDescriptor;->sync()V
:try_end_52
.catch Ljava/lang/Exception; {:try_start_48 .. :try_end_52} :catch_38
.catchall {:try_start_48 .. :try_end_52} :catchall_87
.line 83
if-eqz v4, :cond_57
.line 84
:try_start_54
invoke-virtual {v4}, Ljava/io/InputStream;->close()V
:try_end_57
.catch Ljava/lang/Exception; {:try_start_54 .. :try_end_57} :catch_79
.line 91
:cond_57
:goto_57
if-eqz v2, :cond_5c
.line 92
:try_start_59
invoke-virtual {v2}, Ljava/io/FileOutputStream;->close()V
:try_end_5c
.catch Ljava/lang/Exception; {:try_start_59 .. :try_end_5c} :catch_7b
:cond_5c
:goto_5c
move v0, v1
.line 75
goto :goto_d
.line 77
:cond_5e
const/4 v0, -0x2
.line 83
if-eqz v3, :cond_64
.line 84
:try_start_61
invoke-virtual {v2}, Ljava/io/InputStream;->close()V
:try_end_64
.catch Ljava/lang/Exception; {:try_start_61 .. :try_end_64} :catch_7d
.line 91
:cond_64
:goto_64
if-eqz v3, :cond_d
.line 92
:try_start_66
invoke-virtual {v4}, Ljava/io/FileOutputStream;->close()V
:try_end_69
.catch Ljava/lang/Exception; {:try_start_66 .. :try_end_69} :catch_6a
goto :goto_d
.line 94
:catch_6a
move-exception v1
goto :goto_d
.line 82
:catchall_6c
move-exception v0
move-object v4, v3
.line 83
:goto_6e
if-eqz v4, :cond_73
.line 84
:try_start_70
invoke-virtual {v4}, Ljava/io/InputStream;->close()V
:try_end_73
.catch Ljava/lang/Exception; {:try_start_70 .. :try_end_73} :catch_81
.line 91
:cond_73
:goto_73
if-eqz v3, :cond_78
.line 92
:try_start_75
invoke-virtual {v3}, Ljava/io/FileOutputStream;->close()V
:try_end_78
.catch Ljava/lang/Exception; {:try_start_75 .. :try_end_78} :catch_83
.line 96
:cond_78
:goto_78
throw v0
.line 86
:catch_79
move-exception v0
goto :goto_57
.line 94
:catch_7b
move-exception v0
goto :goto_5c
.line 86
:catch_7d
move-exception v1
goto :goto_64
:catch_7f
move-exception v2
goto :goto_40
:catch_81
move-exception v1
goto :goto_73
.line 94
:catch_83
move-exception v1
goto :goto_78
.line 82
:catchall_85
move-exception v0
goto :goto_6e
:catchall_87
move-exception v0
move-object v3, v2
goto :goto_6e
.line 79
:catch_8a
move-exception v1
move-object v1, v3
goto :goto_3b
:catch_8d
move-exception v1
move-object v1, v3
move-object v3, v4
goto :goto_3b
.end method