u.smali

.class public Lio/openinstall/sdk/u;
.super Ljava/lang/Object;


# direct methods
.method static constructor <clinit>()V
    .registers 1

    return-void
.end method

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

    :try_start_0
    invoke-virtual {p0}, Ljava/io/File;->getParentFile()Ljava/io/File;

    move-result-object v0

    if-eqz v0, :cond_f

    invoke-virtual {v0}, Ljava/io/File;->exists()Z

    move-result v1

    if-nez v1, :cond_f

    invoke-virtual {v0}, Ljava/io/File;->mkdirs()Z

    :cond_f
    invoke-virtual {p0}, Ljava/io/File;->createNewFile()Z
    :try_end_12
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_12} :catch_13

    goto :goto_14

    :catch_13
    move-exception p0

    :goto_14
    return-void
.end method

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

    const/4 v0, 0x0

    invoke-static {p0, p1, v0, p2}, Lio/openinstall/sdk/u;->a(Ljava/io/File;Ljava/lang/String;ZZ)V

    return-void
.end method

.method public static a(Ljava/io/File;Ljava/lang/String;ZZ)V
    .registers 6

    invoke-static {p0}, Lio/openinstall/sdk/u;->a(Ljava/io/File;)V

    const/4 v0, 0x0

    :try_start_4
    new-instance v1, Ljava/io/FileWriter;

    invoke-direct {v1, p0, p3}, Ljava/io/FileWriter;-><init>(Ljava/io/File;Z)V
    :try_end_9
    .catch Ljava/io/IOException; {:try_start_4 .. :try_end_9} :catch_3c
    .catchall {:try_start_4 .. :try_end_9} :catchall_2c

    :try_start_9
    new-instance p0, Ljava/io/BufferedWriter;

    invoke-direct {p0, v1}, Ljava/io/BufferedWriter;-><init>(Ljava/io/Writer;)V
    :try_end_e
    .catch Ljava/io/IOException; {:try_start_9 .. :try_end_e} :catch_2a
    .catchall {:try_start_9 .. :try_end_e} :catchall_28

    :try_start_e
    invoke-virtual {p0, p1}, Ljava/io/BufferedWriter;->write(Ljava/lang/String;)V

    if-eqz p2, :cond_16

    invoke-virtual {p0}, Ljava/io/BufferedWriter;->newLine()V

    :cond_16
    invoke-virtual {p0}, Ljava/io/BufferedWriter;->flush()V
    :try_end_19
    .catch Ljava/io/IOException; {:try_start_e .. :try_end_19} :catch_25
    .catchall {:try_start_e .. :try_end_19} :catchall_22

    :try_start_19
    invoke-virtual {p0}, Ljava/io/BufferedWriter;->close()V

    :goto_1c
    invoke-virtual {v1}, Ljava/io/FileWriter;->close()V
    :try_end_1f
    .catch Ljava/io/IOException; {:try_start_19 .. :try_end_1f} :catch_20

    goto :goto_46

    :catch_20
    move-exception p0

    goto :goto_46

    :catchall_22
    move-exception p1

    move-object v0, p0

    goto :goto_2e

    :catch_25
    move-exception p1

    move-object v0, p0

    goto :goto_3e

    :catchall_28
    move-exception p1

    goto :goto_2e

    :catch_2a
    move-exception p0

    goto :goto_3e

    :catchall_2c
    move-exception p1

    move-object v1, v0

    :goto_2e
    if-eqz v0, :cond_36

    :try_start_30
    invoke-virtual {v0}, Ljava/io/BufferedWriter;->close()V

    goto :goto_36

    :catch_34
    move-exception p0

    goto :goto_3b

    :cond_36
    :goto_36
    if-eqz v1, :cond_3b

    invoke-virtual {v1}, Ljava/io/FileWriter;->close()V
    :try_end_3b
    .catch Ljava/io/IOException; {:try_start_30 .. :try_end_3b} :catch_34

    :cond_3b
    :goto_3b
    throw p1

    :catch_3c
    move-exception p0

    move-object v1, v0

    :goto_3e
    if-eqz v0, :cond_43

    :try_start_40
    invoke-virtual {v0}, Ljava/io/BufferedWriter;->close()V
    :try_end_43
    .catch Ljava/io/IOException; {:try_start_40 .. :try_end_43} :catch_20

    :cond_43
    if-eqz v1, :cond_46

    goto :goto_1c

    :cond_46
    :goto_46
    return-void
.end method

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

    new-instance v0, Ljava/lang/StringBuilder;

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

    const/4 v1, 0x0

    :try_start_6
    new-instance v2, Ljava/io/FileReader;

    invoke-direct {v2, p0}, Ljava/io/FileReader;-><init>(Ljava/io/File;)V
    :try_end_b
    .catch Ljava/io/IOException; {:try_start_6 .. :try_end_b} :catch_3f
    .catchall {:try_start_6 .. :try_end_b} :catchall_2f

    :try_start_b
    new-instance p0, Ljava/io/BufferedReader;

    invoke-direct {p0, v2}, Ljava/io/BufferedReader;-><init>(Ljava/io/Reader;)V
    :try_end_10
    .catch Ljava/io/IOException; {:try_start_b .. :try_end_10} :catch_2b
    .catchall {:try_start_b .. :try_end_10} :catchall_27

    :goto_10
    :try_start_10
    invoke-virtual {p0}, Ljava/io/BufferedReader;->readLine()Ljava/lang/String;

    move-result-object v1

    if-eqz v1, :cond_1a

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
    :try_end_19
    .catch Ljava/io/IOException; {:try_start_10 .. :try_end_19} :catch_25
    .catchall {:try_start_10 .. :try_end_19} :catchall_23

    goto :goto_10

    :cond_1a
    :try_start_1a
    invoke-virtual {v2}, Ljava/io/FileReader;->close()V

    :goto_1d
    invoke-virtual {p0}, Ljava/io/BufferedReader;->close()V
    :try_end_20
    .catch Ljava/io/IOException; {:try_start_1a .. :try_end_20} :catch_21

    goto :goto_49

    :catch_21
    move-exception p0

    goto :goto_49

    :catchall_23
    move-exception v0

    goto :goto_29

    :catch_25
    move-exception v1

    goto :goto_2d

    :catchall_27
    move-exception v0

    move-object p0, v1

    :goto_29
    move-object v1, v2

    goto :goto_31

    :catch_2b
    move-exception p0

    move-object p0, v1

    :goto_2d
    move-object v1, v2

    goto :goto_41

    :catchall_2f
    move-exception v0

    move-object p0, v1

    :goto_31
    if-eqz v1, :cond_39

    :try_start_33
    invoke-virtual {v1}, Ljava/io/FileReader;->close()V

    goto :goto_39

    :catch_37
    move-exception p0

    goto :goto_3e

    :cond_39
    :goto_39
    if-eqz p0, :cond_3e

    invoke-virtual {p0}, Ljava/io/BufferedReader;->close()V
    :try_end_3e
    .catch Ljava/io/IOException; {:try_start_33 .. :try_end_3e} :catch_37

    :cond_3e
    :goto_3e
    throw v0

    :catch_3f
    move-exception p0

    move-object p0, v1

    :goto_41
    if-eqz v1, :cond_46

    :try_start_43
    invoke-virtual {v1}, Ljava/io/FileReader;->close()V
    :try_end_46
    .catch Ljava/io/IOException; {:try_start_43 .. :try_end_46} :catch_21

    :cond_46
    if-eqz p0, :cond_49

    goto :goto_1d

    :cond_49
    :goto_49
    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object p0

    return-object p0
.end method