c.smali

.class public final Lsg/bigo/sdk/libnotification/c/c;
.super Ljava/lang/Object;
.source "SourceFile"


# direct methods
.method public constructor <init>()V
    .registers 1

    .line 16
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method

.method public static a(Ljava/io/File;)Z
    .registers 3

    const/4 v0, 0x0

    if-nez p0, :cond_4

    return v0

    .line 23
    :cond_4
    :try_start_4
    invoke-virtual {p0}, Ljava/io/File;->exists()Z

    move-result v1

    if-eqz v1, :cond_f

    .line 24
    invoke-virtual {p0}, Ljava/io/File;->isDirectory()Z

    move-result v0

    goto :goto_24

    .line 26
    :cond_f
    invoke-virtual {p0}, Ljava/io/File;->mkdirs()Z

    move-result v0
    :try_end_13
    .catch Ljava/lang/Exception; {:try_start_4 .. :try_end_13} :catch_14

    goto :goto_24

    :catch_14
    move-exception p0

    .line 29
    invoke-static {p0}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object p0

    const-string v1, "createOrExistsDir failed with "

    invoke-virtual {v1, p0}, Ljava/lang/String;->concat(Ljava/lang/String;)Ljava/lang/String;

    move-result-object p0

    const-string v1, "fUtilErr"

    invoke-static {v1, p0}, Lsg/bigo/sdk/libnotification/c/b;->a(Ljava/lang/String;Ljava/lang/String;)V

    :goto_24
    return v0
.end method

.method public static final a(Ljava/io/File;Ljava/lang/String;)Z
    .registers 5

    const/4 v0, 0x0

    .line 39
    :try_start_1
    new-instance v1, Ljava/io/BufferedWriter;

    new-instance v2, Ljava/io/FileWriter;

    invoke-direct {v2, p0}, Ljava/io/FileWriter;-><init>(Ljava/io/File;)V

    invoke-direct {v1, v2}, Ljava/io/BufferedWriter;-><init>(Ljava/io/Writer;)V
    :try_end_b
    .catch Ljava/io/FileNotFoundException; {:try_start_1 .. :try_end_b} :catch_2a
    .catch Ljava/io/IOException; {:try_start_1 .. :try_end_b} :catch_24
    .catchall {:try_start_1 .. :try_end_b} :catchall_1d

    .line 40
    :try_start_b
    invoke-virtual {v1, p1}, Ljava/io/BufferedWriter;->write(Ljava/lang/String;)V

    .line 41
    invoke-virtual {v1}, Ljava/io/BufferedWriter;->flush()V
    :try_end_11
    .catch Ljava/io/FileNotFoundException; {:try_start_b .. :try_end_11} :catch_1b
    .catch Ljava/io/IOException; {:try_start_b .. :try_end_11} :catch_19
    .catchall {:try_start_b .. :try_end_11} :catchall_16

    const/4 p0, 0x1

    .line 50
    :try_start_12
    invoke-virtual {v1}, Ljava/io/BufferedWriter;->close()V
    :try_end_15
    .catch Ljava/io/IOException; {:try_start_12 .. :try_end_15} :catch_2e

    goto :goto_2e

    :catchall_16
    move-exception p0

    move-object v0, v1

    goto :goto_1e

    :catch_19
    move-object v0, v1

    goto :goto_24

    :catch_1b
    move-object v0, v1

    goto :goto_2a

    :catchall_1d
    move-exception p0

    :goto_1e
    if-eqz v0, :cond_23

    :try_start_20
    invoke-virtual {v0}, Ljava/io/BufferedWriter;->close()V
    :try_end_23
    .catch Ljava/io/IOException; {:try_start_20 .. :try_end_23} :catch_23

    .line 53
    :catch_23
    :cond_23
    throw p0

    :catch_24
    :goto_24
    if-eqz v0, :cond_2d

    .line 50
    :goto_26
    :try_start_26
    invoke-virtual {v0}, Ljava/io/BufferedWriter;->close()V
    :try_end_29
    .catch Ljava/io/IOException; {:try_start_26 .. :try_end_29} :catch_2d

    goto :goto_2d

    :catch_2a
    :goto_2a
    if-eqz v0, :cond_2d

    goto :goto_26

    :catch_2d
    :cond_2d
    :goto_2d
    const/4 p0, 0x0

    :catch_2e
    :goto_2e
    return p0
.end method

.method public static final b(Ljava/io/File;)Ljava/lang/String;
    .registers 4

    const/4 v0, 0x0

    .line 64
    :try_start_1
    new-instance v1, Ljava/io/BufferedReader;

    new-instance v2, Ljava/io/FileReader;

    invoke-direct {v2, p0}, Ljava/io/FileReader;-><init>(Ljava/io/File;)V

    invoke-direct {v1, v2}, Ljava/io/BufferedReader;-><init>(Ljava/io/Reader;)V
    :try_end_b
    .catch Ljava/io/FileNotFoundException; {:try_start_1 .. :try_end_b} :catch_3f
    .catch Ljava/io/IOException; {:try_start_1 .. :try_end_b} :catch_39
    .catchall {:try_start_1 .. :try_end_b} :catchall_32

    .line 65
    :try_start_b
    new-instance p0, Ljava/lang/StringBuilder;

    invoke-direct {p0}, Ljava/lang/StringBuilder;-><init>()V

    .line 66
    invoke-virtual {v1}, Ljava/io/BufferedReader;->readLine()Ljava/lang/String;

    move-result-object v0

    :goto_14
    if-eqz v0, :cond_23

    .line 68
    invoke-virtual {p0, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    const-string v0, "\n"

    invoke-virtual {p0, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    .line 69
    invoke-virtual {v1}, Ljava/io/BufferedReader;->readLine()Ljava/lang/String;

    move-result-object v0

    goto :goto_14

    .line 71
    :cond_23
    invoke-virtual {p0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object p0
    :try_end_27
    .catch Ljava/io/FileNotFoundException; {:try_start_b .. :try_end_27} :catch_30
    .catch Ljava/io/IOException; {:try_start_b .. :try_end_27} :catch_2e
    .catchall {:try_start_b .. :try_end_27} :catchall_2b

    .line 79
    :try_start_27
    invoke-virtual {v1}, Ljava/io/BufferedReader;->close()V
    :try_end_2a
    .catch Ljava/io/IOException; {:try_start_27 .. :try_end_2a} :catch_44

    goto :goto_44

    :catchall_2b
    move-exception p0

    move-object v0, v1

    goto :goto_33

    :catch_2e
    move-object v0, v1

    goto :goto_39

    :catch_30
    move-object v0, v1

    goto :goto_3f

    :catchall_32
    move-exception p0

    :goto_33
    if-eqz v0, :cond_38

    :try_start_35
    invoke-virtual {v0}, Ljava/io/BufferedReader;->close()V
    :try_end_38
    .catch Ljava/io/IOException; {:try_start_35 .. :try_end_38} :catch_38

    .line 82
    :catch_38
    :cond_38
    throw p0

    :catch_39
    :goto_39
    if-eqz v0, :cond_42

    .line 79
    :goto_3b
    :try_start_3b
    invoke-virtual {v0}, Ljava/io/BufferedReader;->close()V
    :try_end_3e
    .catch Ljava/io/IOException; {:try_start_3b .. :try_end_3e} :catch_42

    goto :goto_42

    :catch_3f
    :goto_3f
    if-eqz v0, :cond_42

    goto :goto_3b

    :catch_42
    :cond_42
    :goto_42
    const-string p0, ""

    :catch_44
    :goto_44
    return-object p0
.end method