ACache.smali

.class public Lcom/tradplus/ads/mobileads/util/ACache;
.super Ljava/lang/Object;


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/tradplus/ads/mobileads/util/ACache$b;,
        Lcom/tradplus/ads/mobileads/util/ACache$a;
    }
.end annotation


# static fields
.field public static final TIME_DAY:I = 0x15180

.field public static final TIME_HOUR:I = 0xe10

.field private static a:Ljava/util/Map;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/Map<",
            "Ljava/lang/String;",
            "Lcom/tradplus/ads/mobileads/util/ACache;",
            ">;"
        }
    .end annotation
.end field


# instance fields
.field private b:Lcom/tradplus/ads/mobileads/util/ACache$a;


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

    new-instance v0, Ljava/util/HashMap;

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

    sput-object v0, Lcom/tradplus/ads/mobileads/util/ACache;->a:Ljava/util/Map;

    return-void
.end method

.method private constructor <init>(Ljava/io/File;JI)V
    .registers 13

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

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

    move-result v0

    if-nez v0, :cond_15

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

    move-result v0

    if-nez v0, :cond_15

    const-string p1, "create acache file failed."

    invoke-static {p1}, Lcom/tradplus/ads/common/util/LogUtil;->ownShow(Ljava/lang/String;)V

    return-void

    :cond_15
    new-instance v7, Lcom/tradplus/ads/mobileads/util/ACache$a;

    const/4 v6, 0x0

    move-object v0, v7

    move-object v1, p0

    move-object v2, p1

    move-wide v3, p2

    move v5, p4

    invoke-direct/range {v0 .. v6}, Lcom/tradplus/ads/mobileads/util/ACache$a;-><init>(Lcom/tradplus/ads/mobileads/util/ACache;Ljava/io/File;JILcom/tradplus/ads/mobileads/util/ACache$1;)V

    iput-object v7, p0, Lcom/tradplus/ads/mobileads/util/ACache;->b:Lcom/tradplus/ads/mobileads/util/ACache$a;

    return-void
.end method

.method private static a()Ljava/lang/String;
    .registers 2

    new-instance v0, Ljava/lang/StringBuilder;

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

    const-string v1, "_"

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

    invoke-static {}, Landroid/os/Process;->myPid()I

    move-result v1

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

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

    move-result-object v0

    return-object v0
.end method

.method public static get(Landroid/content/Context;I)Lcom/tradplus/ads/mobileads/util/ACache;
    .registers 7

    const/4 v0, 0x0

    if-nez p0, :cond_4

    return-object v0

    :cond_4
    sget v1, Lcom/tradplus/ads/mobileads/util/TradPlusDataConstants;->CACHETRADPLUSTYPE:I

    const v2, 0x7fffffff

    const-wide/32 v3, 0x2faf080

    if-ne p1, v1, :cond_1e

    new-instance p1, Ljava/io/File;

    invoke-virtual {p0}, Landroid/content/Context;->getCacheDir()Ljava/io/File;

    move-result-object p0

    const-string v0, "TradPlusCache"

    invoke-direct {p1, p0, v0}, Ljava/io/File;-><init>(Ljava/io/File;Ljava/lang/String;)V

    :goto_19
    invoke-static {p1, v3, v4, v2}, Lcom/tradplus/ads/mobileads/util/ACache;->get(Ljava/io/File;JI)Lcom/tradplus/ads/mobileads/util/ACache;

    move-result-object p0

    return-object p0

    :cond_1e
    sget v1, Lcom/tradplus/ads/mobileads/util/TradPlusDataConstants;->CACHETYPE:I

    if-ne p1, v1, :cond_2e

    new-instance p1, Ljava/io/File;

    invoke-virtual {p0}, Landroid/content/Context;->getCacheDir()Ljava/io/File;

    move-result-object p0

    const-string v0, "CrossProCache"

    invoke-direct {p1, p0, v0}, Ljava/io/File;-><init>(Ljava/io/File;Ljava/lang/String;)V

    goto :goto_19

    :cond_2e
    sget v1, Lcom/tradplus/ads/mobileads/util/TradPlusDataConstants;->TRACKTYPE:I

    if-ne p1, v1, :cond_3e

    new-instance p1, Ljava/io/File;

    invoke-virtual {p0}, Landroid/content/Context;->getCacheDir()Ljava/io/File;

    move-result-object p0

    const-string v0, "TrackCache"

    invoke-direct {p1, p0, v0}, Ljava/io/File;-><init>(Ljava/io/File;Ljava/lang/String;)V

    goto :goto_19

    :cond_3e
    return-object v0
.end method

.method public static get(Landroid/content/Context;JI)Lcom/tradplus/ads/mobileads/util/ACache;
    .registers 6

    if-nez p0, :cond_4

    const/4 p0, 0x0

    return-object p0

    :cond_4
    new-instance v0, Ljava/io/File;

    invoke-virtual {p0}, Landroid/content/Context;->getCacheDir()Ljava/io/File;

    move-result-object p0

    const-string v1, "TradPlusCache"

    invoke-direct {v0, p0, v1}, Ljava/io/File;-><init>(Ljava/io/File;Ljava/lang/String;)V

    invoke-static {v0, p1, p2, p3}, Lcom/tradplus/ads/mobileads/util/ACache;->get(Ljava/io/File;JI)Lcom/tradplus/ads/mobileads/util/ACache;

    move-result-object p0

    return-object p0
.end method

.method public static get(Ljava/io/File;)Lcom/tradplus/ads/mobileads/util/ACache;
    .registers 4

    const-wide/32 v0, 0x2faf080

    const v2, 0x7fffffff

    invoke-static {p0, v0, v1, v2}, Lcom/tradplus/ads/mobileads/util/ACache;->get(Ljava/io/File;JI)Lcom/tradplus/ads/mobileads/util/ACache;

    move-result-object p0

    return-object p0
.end method

.method public static get(Ljava/io/File;JI)Lcom/tradplus/ads/mobileads/util/ACache;
    .registers 7

    sget-object v0, Lcom/tradplus/ads/mobileads/util/ACache;->a:Ljava/util/Map;

    new-instance v1, Ljava/lang/StringBuilder;

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

    invoke-virtual {p0}, Ljava/io/File;->getAbsoluteFile()Ljava/io/File;

    move-result-object v2

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

    invoke-static {}, Lcom/tradplus/ads/mobileads/util/ACache;->a()Ljava/lang/String;

    move-result-object v2

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

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-interface {v0, v1}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/tradplus/ads/mobileads/util/ACache;

    if-nez v0, :cond_42

    new-instance v0, Lcom/tradplus/ads/mobileads/util/ACache;

    invoke-direct {v0, p0, p1, p2, p3}, Lcom/tradplus/ads/mobileads/util/ACache;-><init>(Ljava/io/File;JI)V

    sget-object p1, Lcom/tradplus/ads/mobileads/util/ACache;->a:Ljava/util/Map;

    new-instance p2, Ljava/lang/StringBuilder;

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

    invoke-virtual {p0}, Ljava/io/File;->getAbsolutePath()Ljava/lang/String;

    move-result-object p0

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

    invoke-static {}, Lcom/tradplus/ads/mobileads/util/ACache;->a()Ljava/lang/String;

    move-result-object p0

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

    invoke-virtual {p2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object p0

    invoke-interface {p1, p0, v0}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    :cond_42
    return-object v0
.end method


# virtual methods
.method public clear()V
    .registers 2

    iget-object v0, p0, Lcom/tradplus/ads/mobileads/util/ACache;->b:Lcom/tradplus/ads/mobileads/util/ACache$a;

    if-nez v0, :cond_5

    return-void

    :cond_5
    invoke-static {v0}, Lcom/tradplus/ads/mobileads/util/ACache$a;->a(Lcom/tradplus/ads/mobileads/util/ACache$a;)V

    return-void
.end method

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

    iget-object v0, p0, Lcom/tradplus/ads/mobileads/util/ACache;->b:Lcom/tradplus/ads/mobileads/util/ACache$a;

    const/4 v1, 0x0

    if-nez v0, :cond_6

    return-object v1

    :cond_6
    invoke-static {v0, p1}, Lcom/tradplus/ads/mobileads/util/ACache$a;->a(Lcom/tradplus/ads/mobileads/util/ACache$a;Ljava/lang/String;)Ljava/io/File;

    move-result-object p1

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

    move-result v0

    if-eqz v0, :cond_11

    return-object p1

    :cond_11
    return-object v1
.end method

.method public getAsBinary(Ljava/lang/String;)[B
    .registers 7

    iget-object v0, p0, Lcom/tradplus/ads/mobileads/util/ACache;->b:Lcom/tradplus/ads/mobileads/util/ACache$a;

    const/4 v1, 0x0

    if-nez v0, :cond_6

    return-object v1

    :cond_6
    :try_start_6
    invoke-static {v0, p1}, Lcom/tradplus/ads/mobileads/util/ACache$a;->b(Lcom/tradplus/ads/mobileads/util/ACache$a;Ljava/lang/String;)Ljava/io/File;

    move-result-object v0

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

    move-result v2

    if-nez v2, :cond_11

    return-object v1

    :cond_11
    new-instance v2, Ljava/io/RandomAccessFile;

    const-string v3, "r"

    invoke-direct {v2, v0, v3}, Ljava/io/RandomAccessFile;-><init>(Ljava/io/File;Ljava/lang/String;)V
    :try_end_18
    .catch Ljava/lang/Exception; {:try_start_6 .. :try_end_18} :catch_46
    .catchall {:try_start_6 .. :try_end_18} :catchall_43

    :try_start_18
    invoke-virtual {v2}, Ljava/io/RandomAccessFile;->length()J

    move-result-wide v3

    long-to-int v0, v3

    new-array v0, v0, [B

    invoke-virtual {v2, v0}, Ljava/io/RandomAccessFile;->read([B)I

    invoke-static {v0}, Lcom/tradplus/ads/mobileads/util/ACache$b;->a([B)Z

    move-result v3

    if-nez v3, :cond_35

    invoke-static {v0}, Lcom/tradplus/ads/mobileads/util/ACache$b;->b([B)[B

    move-result-object p1
    :try_end_2c
    .catch Ljava/lang/Exception; {:try_start_18 .. :try_end_2c} :catch_41
    .catchall {:try_start_18 .. :try_end_2c} :catchall_56

    :try_start_2c
    invoke-virtual {v2}, Ljava/io/RandomAccessFile;->close()V
    :try_end_2f
    .catch Ljava/io/IOException; {:try_start_2c .. :try_end_2f} :catch_30

    goto :goto_34

    :catch_30
    move-exception v0

    invoke-virtual {v0}, Ljava/io/IOException;->printStackTrace()V

    :goto_34
    return-object p1

    :cond_35
    :try_start_35
    invoke-virtual {v2}, Ljava/io/RandomAccessFile;->close()V
    :try_end_38
    .catch Ljava/io/IOException; {:try_start_35 .. :try_end_38} :catch_39

    goto :goto_3d

    :catch_39
    move-exception v0

    invoke-virtual {v0}, Ljava/io/IOException;->printStackTrace()V

    :goto_3d
    invoke-virtual {p0, p1}, Lcom/tradplus/ads/mobileads/util/ACache;->remove(Ljava/lang/String;)Z

    return-object v1

    :catch_41
    move-exception p1

    goto :goto_48

    :catchall_43
    move-exception p1

    move-object v2, v1

    goto :goto_57

    :catch_46
    move-exception p1

    move-object v2, v1

    :goto_48
    :try_start_48
    invoke-virtual {p1}, Ljava/lang/Exception;->printStackTrace()V
    :try_end_4b
    .catchall {:try_start_48 .. :try_end_4b} :catchall_56

    if-eqz v2, :cond_55

    :try_start_4d
    invoke-virtual {v2}, Ljava/io/RandomAccessFile;->close()V
    :try_end_50
    .catch Ljava/io/IOException; {:try_start_4d .. :try_end_50} :catch_51

    goto :goto_55

    :catch_51
    move-exception p1

    invoke-virtual {p1}, Ljava/io/IOException;->printStackTrace()V

    :cond_55
    :goto_55
    return-object v1

    :catchall_56
    move-exception p1

    :goto_57
    if-eqz v2, :cond_61

    :try_start_59
    invoke-virtual {v2}, Ljava/io/RandomAccessFile;->close()V
    :try_end_5c
    .catch Ljava/io/IOException; {:try_start_59 .. :try_end_5c} :catch_5d

    goto :goto_61

    :catch_5d
    move-exception v0

    invoke-virtual {v0}, Ljava/io/IOException;->printStackTrace()V

    :cond_61
    :goto_61
    throw p1
.end method

.method public getAsBitmap(Ljava/lang/String;)Landroid/graphics/Bitmap;
    .registers 3

    invoke-virtual {p0, p1}, Lcom/tradplus/ads/mobileads/util/ACache;->getAsBinary(Ljava/lang/String;)[B

    move-result-object v0

    if-nez v0, :cond_8

    const/4 p1, 0x0

    return-object p1

    :cond_8
    invoke-virtual {p0, p1}, Lcom/tradplus/ads/mobileads/util/ACache;->getAsBinary(Ljava/lang/String;)[B

    move-result-object p1

    invoke-static {p1}, Lcom/tradplus/ads/mobileads/util/ACache$b;->c([B)Landroid/graphics/Bitmap;

    move-result-object p1

    return-object p1
.end method

.method public getAsDrawable(Ljava/lang/String;)Landroid/graphics/drawable/Drawable;
    .registers 3

    invoke-virtual {p0, p1}, Lcom/tradplus/ads/mobileads/util/ACache;->getAsBinary(Ljava/lang/String;)[B

    move-result-object v0

    if-nez v0, :cond_8

    const/4 p1, 0x0

    return-object p1

    :cond_8
    invoke-virtual {p0, p1}, Lcom/tradplus/ads/mobileads/util/ACache;->getAsBinary(Ljava/lang/String;)[B

    move-result-object p1

    invoke-static {p1}, Lcom/tradplus/ads/mobileads/util/ACache$b;->c([B)Landroid/graphics/Bitmap;

    move-result-object p1

    invoke-static {p1}, Lcom/tradplus/ads/mobileads/util/ACache$b;->b(Landroid/graphics/Bitmap;)Landroid/graphics/drawable/Drawable;

    move-result-object p1

    return-object p1
.end method

.method public getAsJSONArray(Ljava/lang/String;)Lorg/json/JSONArray;
    .registers 4

    invoke-virtual {p0, p1}, Lcom/tradplus/ads/mobileads/util/ACache;->getAsString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object p1

    invoke-static {p1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v0

    const/4 v1, 0x0

    if-eqz v0, :cond_c

    return-object v1

    :cond_c
    :try_start_c
    new-instance v0, Lorg/json/JSONArray;

    invoke-direct {v0, p1}, Lorg/json/JSONArray;-><init>(Ljava/lang/String;)V
    :try_end_11
    .catch Ljava/lang/Exception; {:try_start_c .. :try_end_11} :catch_12

    return-object v0

    :catch_12
    move-exception p1

    invoke-virtual {p1}, Ljava/lang/Exception;->printStackTrace()V

    return-object v1
.end method

.method public getAsJSONObject(Ljava/lang/String;)Lorg/json/JSONObject;
    .registers 3

    invoke-virtual {p0, p1}, Lcom/tradplus/ads/mobileads/util/ACache;->getAsString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object p1

    :try_start_4
    new-instance v0, Lorg/json/JSONObject;

    invoke-direct {v0, p1}, Lorg/json/JSONObject;-><init>(Ljava/lang/String;)V
    :try_end_9
    .catch Ljava/lang/Exception; {:try_start_4 .. :try_end_9} :catch_a

    return-object v0

    :catch_a
    const/4 p1, 0x0

    return-object p1
.end method

.method public getAsObject(Ljava/lang/String;)Ljava/lang/Object;
    .registers 6

    invoke-virtual {p0, p1}, Lcom/tradplus/ads/mobileads/util/ACache;->getAsBinary(Ljava/lang/String;)[B

    move-result-object p1

    const/4 v0, 0x0

    if-eqz p1, :cond_64

    :try_start_7
    new-instance v1, Ljava/io/ByteArrayInputStream;

    invoke-direct {v1, p1}, Ljava/io/ByteArrayInputStream;-><init>([B)V
    :try_end_c
    .catch Ljava/lang/Exception; {:try_start_7 .. :try_end_c} :catch_30
    .catchall {:try_start_7 .. :try_end_c} :catchall_2d

    :try_start_c
    new-instance p1, Ljava/io/ObjectInputStream;

    invoke-direct {p1, v1}, Ljava/io/ObjectInputStream;-><init>(Ljava/io/InputStream;)V
    :try_end_11
    .catch Ljava/lang/Exception; {:try_start_c .. :try_end_11} :catch_2a
    .catchall {:try_start_c .. :try_end_11} :catchall_28

    :try_start_11
    invoke-virtual {p1}, Ljava/io/ObjectInputStream;->readObject()Ljava/lang/Object;

    move-result-object v0
    :try_end_15
    .catch Ljava/lang/Exception; {:try_start_11 .. :try_end_15} :catch_26
    .catchall {:try_start_11 .. :try_end_15} :catchall_4b

    :try_start_15
    invoke-virtual {v1}, Ljava/io/ByteArrayInputStream;->close()V
    :try_end_18
    .catch Ljava/io/IOException; {:try_start_15 .. :try_end_18} :catch_19

    goto :goto_1d

    :catch_19
    move-exception v1

    invoke-virtual {v1}, Ljava/io/IOException;->printStackTrace()V

    :goto_1d
    :try_start_1d
    invoke-virtual {p1}, Ljava/io/ObjectInputStream;->close()V
    :try_end_20
    .catch Ljava/io/IOException; {:try_start_1d .. :try_end_20} :catch_21

    goto :goto_25

    :catch_21
    move-exception p1

    invoke-virtual {p1}, Ljava/io/IOException;->printStackTrace()V

    :goto_25
    return-object v0

    :catch_26
    move-exception v2

    goto :goto_33

    :catchall_28
    move-exception p1

    goto :goto_4f

    :catch_2a
    move-exception v2

    move-object p1, v0

    goto :goto_33

    :catchall_2d
    move-exception p1

    move-object v1, v0

    goto :goto_4f

    :catch_30
    move-exception v2

    move-object p1, v0

    move-object v1, p1

    :goto_33
    :try_start_33
    invoke-virtual {v2}, Ljava/lang/Exception;->printStackTrace()V
    :try_end_36
    .catchall {:try_start_33 .. :try_end_36} :catchall_4b

    if-eqz v1, :cond_40

    :try_start_38
    invoke-virtual {v1}, Ljava/io/ByteArrayInputStream;->close()V
    :try_end_3b
    .catch Ljava/io/IOException; {:try_start_38 .. :try_end_3b} :catch_3c

    goto :goto_40

    :catch_3c
    move-exception v1

    invoke-virtual {v1}, Ljava/io/IOException;->printStackTrace()V

    :cond_40
    :goto_40
    if-eqz p1, :cond_4a

    :try_start_42
    invoke-virtual {p1}, Ljava/io/ObjectInputStream;->close()V
    :try_end_45
    .catch Ljava/io/IOException; {:try_start_42 .. :try_end_45} :catch_46

    goto :goto_4a

    :catch_46
    move-exception p1

    invoke-virtual {p1}, Ljava/io/IOException;->printStackTrace()V

    :cond_4a
    :goto_4a
    return-object v0

    :catchall_4b
    move-exception v0

    move-object v3, v0

    move-object v0, p1

    move-object p1, v3

    :goto_4f
    if-eqz v1, :cond_59

    :try_start_51
    invoke-virtual {v1}, Ljava/io/ByteArrayInputStream;->close()V
    :try_end_54
    .catch Ljava/io/IOException; {:try_start_51 .. :try_end_54} :catch_55

    goto :goto_59

    :catch_55
    move-exception v1

    invoke-virtual {v1}, Ljava/io/IOException;->printStackTrace()V

    :cond_59
    :goto_59
    if-eqz v0, :cond_63

    :try_start_5b
    invoke-virtual {v0}, Ljava/io/ObjectInputStream;->close()V
    :try_end_5e
    .catch Ljava/io/IOException; {:try_start_5b .. :try_end_5e} :catch_5f

    goto :goto_63

    :catch_5f
    move-exception v0

    invoke-virtual {v0}, Ljava/io/IOException;->printStackTrace()V

    :cond_63
    :goto_63
    throw p1

    :cond_64
    return-object v0
.end method

.method public getAsString(Ljava/lang/String;)Ljava/lang/String;
    .registers 7

    iget-object v0, p0, Lcom/tradplus/ads/mobileads/util/ACache;->b:Lcom/tradplus/ads/mobileads/util/ACache$a;

    const-string v1, ""

    if-nez v0, :cond_7

    return-object v1

    :cond_7
    invoke-static {v0, p1}, Lcom/tradplus/ads/mobileads/util/ACache$a;->b(Lcom/tradplus/ads/mobileads/util/ACache$a;Ljava/lang/String;)Ljava/io/File;

    move-result-object v0

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

    move-result v2

    const/4 v3, 0x0

    if-nez v2, :cond_13

    return-object v3

    :cond_13
    :try_start_13
    new-instance v2, Ljava/io/BufferedReader;

    new-instance v4, Ljava/io/FileReader;

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

    invoke-direct {v2, v4}, Ljava/io/BufferedReader;-><init>(Ljava/io/Reader;)V
    :try_end_1d
    .catch Ljava/io/IOException; {:try_start_13 .. :try_end_1d} :catch_57
    .catchall {:try_start_13 .. :try_end_1d} :catchall_54

    :goto_1d
    :try_start_1d
    invoke-virtual {v2}, Ljava/io/BufferedReader;->readLine()Ljava/lang/String;

    move-result-object v0

    if-eqz v0, :cond_33

    new-instance v4, Ljava/lang/StringBuilder;

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

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

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

    invoke-virtual {v4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    goto :goto_1d

    :cond_33
    invoke-static {v1}, Lcom/tradplus/ads/mobileads/util/ACache$b;->a(Ljava/lang/String;)Z

    move-result v0

    if-nez v0, :cond_46

    invoke-static {v1}, Lcom/tradplus/ads/mobileads/util/ACache$b;->b(Ljava/lang/String;)Ljava/lang/String;

    move-result-object p1
    :try_end_3d
    .catch Ljava/io/IOException; {:try_start_1d .. :try_end_3d} :catch_52
    .catchall {:try_start_1d .. :try_end_3d} :catchall_67

    :try_start_3d
    invoke-virtual {v2}, Ljava/io/BufferedReader;->close()V
    :try_end_40
    .catch Ljava/io/IOException; {:try_start_3d .. :try_end_40} :catch_41

    goto :goto_45

    :catch_41
    move-exception v0

    invoke-virtual {v0}, Ljava/io/IOException;->printStackTrace()V

    :goto_45
    return-object p1

    :cond_46
    :try_start_46
    invoke-virtual {v2}, Ljava/io/BufferedReader;->close()V
    :try_end_49
    .catch Ljava/io/IOException; {:try_start_46 .. :try_end_49} :catch_4a

    goto :goto_4e

    :catch_4a
    move-exception v0

    invoke-virtual {v0}, Ljava/io/IOException;->printStackTrace()V

    :goto_4e
    invoke-virtual {p0, p1}, Lcom/tradplus/ads/mobileads/util/ACache;->remove(Ljava/lang/String;)Z

    return-object v3

    :catch_52
    move-exception p1

    goto :goto_59

    :catchall_54
    move-exception p1

    move-object v2, v3

    goto :goto_68

    :catch_57
    move-exception p1

    move-object v2, v3

    :goto_59
    :try_start_59
    invoke-virtual {p1}, Ljava/io/IOException;->printStackTrace()V
    :try_end_5c
    .catchall {:try_start_59 .. :try_end_5c} :catchall_67

    if-eqz v2, :cond_66

    :try_start_5e
    invoke-virtual {v2}, Ljava/io/BufferedReader;->close()V
    :try_end_61
    .catch Ljava/io/IOException; {:try_start_5e .. :try_end_61} :catch_62

    goto :goto_66

    :catch_62
    move-exception p1

    invoke-virtual {p1}, Ljava/io/IOException;->printStackTrace()V

    :cond_66
    :goto_66
    return-object v3

    :catchall_67
    move-exception p1

    :goto_68
    if-eqz v2, :cond_72

    :try_start_6a
    invoke-virtual {v2}, Ljava/io/BufferedReader;->close()V
    :try_end_6d
    .catch Ljava/io/IOException; {:try_start_6a .. :try_end_6d} :catch_6e

    goto :goto_72

    :catch_6e
    move-exception v0

    invoke-virtual {v0}, Ljava/io/IOException;->printStackTrace()V

    :cond_72
    :goto_72
    goto :goto_74

    :goto_73
    throw p1

    :goto_74
    goto :goto_73
.end method

.method public put(Ljava/lang/String;Landroid/graphics/Bitmap;)V
    .registers 3

    invoke-static {p2}, Lcom/tradplus/ads/mobileads/util/ACache$b;->a(Landroid/graphics/Bitmap;)[B

    move-result-object p2

    invoke-virtual {p0, p1, p2}, Lcom/tradplus/ads/mobileads/util/ACache;->put(Ljava/lang/String;[B)V

    return-void
.end method

.method public put(Ljava/lang/String;Landroid/graphics/Bitmap;I)V
    .registers 4

    invoke-static {p2}, Lcom/tradplus/ads/mobileads/util/ACache$b;->a(Landroid/graphics/Bitmap;)[B

    move-result-object p2

    invoke-virtual {p0, p1, p2, p3}, Lcom/tradplus/ads/mobileads/util/ACache;->put(Ljava/lang/String;[BI)V

    return-void
.end method

.method public put(Ljava/lang/String;Landroid/graphics/drawable/Drawable;)V
    .registers 3

    invoke-static {p2}, Lcom/tradplus/ads/mobileads/util/ACache$b;->a(Landroid/graphics/drawable/Drawable;)Landroid/graphics/Bitmap;

    move-result-object p2

    invoke-virtual {p0, p1, p2}, Lcom/tradplus/ads/mobileads/util/ACache;->put(Ljava/lang/String;Landroid/graphics/Bitmap;)V

    return-void
.end method

.method public put(Ljava/lang/String;Landroid/graphics/drawable/Drawable;I)V
    .registers 4

    invoke-static {p2}, Lcom/tradplus/ads/mobileads/util/ACache$b;->a(Landroid/graphics/drawable/Drawable;)Landroid/graphics/Bitmap;

    move-result-object p2

    invoke-virtual {p0, p1, p2, p3}, Lcom/tradplus/ads/mobileads/util/ACache;->put(Ljava/lang/String;Landroid/graphics/Bitmap;I)V

    return-void
.end method

.method public put(Ljava/lang/String;Ljava/io/Serializable;)V
    .registers 4

    const/4 v0, -0x1

    invoke-virtual {p0, p1, p2, v0}, Lcom/tradplus/ads/mobileads/util/ACache;->put(Ljava/lang/String;Ljava/io/Serializable;I)V

    return-void
.end method

.method public put(Ljava/lang/String;Ljava/io/Serializable;I)V
    .registers 7

    const/4 v0, 0x0

    :try_start_1
    new-instance v1, Ljava/io/ByteArrayOutputStream;

    invoke-direct {v1}, Ljava/io/ByteArrayOutputStream;-><init>()V

    new-instance v2, Ljava/io/ObjectOutputStream;

    invoke-direct {v2, v1}, Ljava/io/ObjectOutputStream;-><init>(Ljava/io/OutputStream;)V
    :try_end_b
    .catch Ljava/lang/Exception; {:try_start_1 .. :try_end_b} :catch_28
    .catchall {:try_start_1 .. :try_end_b} :catchall_26

    :try_start_b
    invoke-virtual {v2, p2}, Ljava/io/ObjectOutputStream;->writeObject(Ljava/lang/Object;)V

    invoke-virtual {v1}, Ljava/io/ByteArrayOutputStream;->toByteArray()[B

    move-result-object p2

    const/4 v0, -0x1

    if-eq p3, v0, :cond_19

    invoke-virtual {p0, p1, p2, p3}, Lcom/tradplus/ads/mobileads/util/ACache;->put(Ljava/lang/String;[BI)V

    goto :goto_1c

    :cond_19
    invoke-virtual {p0, p1, p2}, Lcom/tradplus/ads/mobileads/util/ACache;->put(Ljava/lang/String;[B)V
    :try_end_1c
    .catch Ljava/lang/Exception; {:try_start_b .. :try_end_1c} :catch_23
    .catchall {:try_start_b .. :try_end_1c} :catchall_20

    :goto_1c
    :try_start_1c
    invoke-virtual {v2}, Ljava/io/ObjectOutputStream;->close()V
    :try_end_1f
    .catch Ljava/io/IOException; {:try_start_1c .. :try_end_1f} :catch_2f

    goto :goto_2f

    :catchall_20
    move-exception p1

    move-object v0, v2

    goto :goto_30

    :catch_23
    move-exception p1

    move-object v0, v2

    goto :goto_29

    :catchall_26
    move-exception p1

    goto :goto_30

    :catch_28
    move-exception p1

    :goto_29
    :try_start_29
    invoke-virtual {p1}, Ljava/lang/Exception;->printStackTrace()V
    :try_end_2c
    .catchall {:try_start_29 .. :try_end_2c} :catchall_26

    :try_start_2c
    invoke-virtual {v0}, Ljava/io/ObjectOutputStream;->close()V
    :try_end_2f
    .catch Ljava/io/IOException; {:try_start_2c .. :try_end_2f} :catch_2f

    :catch_2f
    :goto_2f
    return-void

    :goto_30
    :try_start_30
    invoke-virtual {v0}, Ljava/io/ObjectOutputStream;->close()V
    :try_end_33
    .catch Ljava/io/IOException; {:try_start_30 .. :try_end_33} :catch_33

    :catch_33
    throw p1
.end method

.method public put(Ljava/lang/String;Ljava/lang/String;)V
    .registers 7

    iget-object v0, p0, Lcom/tradplus/ads/mobileads/util/ACache;->b:Lcom/tradplus/ads/mobileads/util/ACache$a;

    if-nez v0, :cond_5

    return-void

    :cond_5
    invoke-static {v0, p1}, Lcom/tradplus/ads/mobileads/util/ACache$a;->a(Lcom/tradplus/ads/mobileads/util/ACache$a;Ljava/lang/String;)Ljava/io/File;

    move-result-object p1

    if-nez p2, :cond_d

    const-string p2, ""

    :cond_d
    const/4 v0, 0x0

    :try_start_e
    new-instance v1, Ljava/io/BufferedWriter;

    new-instance v2, Ljava/io/FileWriter;

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

    const/16 v3, 0x400

    invoke-direct {v1, v2, v3}, Ljava/io/BufferedWriter;-><init>(Ljava/io/Writer;I)V
    :try_end_1a
    .catch Ljava/io/IOException; {:try_start_e .. :try_end_1a} :catch_2e
    .catchall {:try_start_e .. :try_end_1a} :catchall_2c

    :try_start_1a
    invoke-virtual {v1, p2}, Ljava/io/BufferedWriter;->write(Ljava/lang/String;)V
    :try_end_1d
    .catch Ljava/io/IOException; {:try_start_1a .. :try_end_1d} :catch_29
    .catchall {:try_start_1a .. :try_end_1d} :catchall_26

    :try_start_1d
    invoke-virtual {v1}, Ljava/io/BufferedWriter;->flush()V

    invoke-virtual {v1}, Ljava/io/BufferedWriter;->close()V
    :try_end_23
    .catch Ljava/io/IOException; {:try_start_1d .. :try_end_23} :catch_24

    goto :goto_3f

    :catch_24
    move-exception p2

    goto :goto_3c

    :catchall_26
    move-exception p2

    move-object v0, v1

    goto :goto_45

    :catch_29
    move-exception p2

    move-object v0, v1

    goto :goto_2f

    :catchall_2c
    move-exception p2

    goto :goto_45

    :catch_2e
    move-exception p2

    :goto_2f
    :try_start_2f
    invoke-virtual {p2}, Ljava/io/IOException;->printStackTrace()V
    :try_end_32
    .catchall {:try_start_2f .. :try_end_32} :catchall_2c

    if-eqz v0, :cond_3f

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

    invoke-virtual {v0}, Ljava/io/BufferedWriter;->close()V
    :try_end_3a
    .catch Ljava/io/IOException; {:try_start_34 .. :try_end_3a} :catch_3b

    goto :goto_3f

    :catch_3b
    move-exception p2

    :goto_3c
    invoke-virtual {p2}, Ljava/io/IOException;->printStackTrace()V

    :cond_3f
    :goto_3f
    iget-object p2, p0, Lcom/tradplus/ads/mobileads/util/ACache;->b:Lcom/tradplus/ads/mobileads/util/ACache$a;

    invoke-static {p2, p1}, Lcom/tradplus/ads/mobileads/util/ACache$a;->a(Lcom/tradplus/ads/mobileads/util/ACache$a;Ljava/io/File;)V

    return-void

    :goto_45
    if-eqz v0, :cond_52

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

    invoke-virtual {v0}, Ljava/io/BufferedWriter;->close()V
    :try_end_4d
    .catch Ljava/io/IOException; {:try_start_47 .. :try_end_4d} :catch_4e

    goto :goto_52

    :catch_4e
    move-exception v0

    invoke-virtual {v0}, Ljava/io/IOException;->printStackTrace()V

    :cond_52
    :goto_52
    iget-object v0, p0, Lcom/tradplus/ads/mobileads/util/ACache;->b:Lcom/tradplus/ads/mobileads/util/ACache$a;

    invoke-static {v0, p1}, Lcom/tradplus/ads/mobileads/util/ACache$a;->a(Lcom/tradplus/ads/mobileads/util/ACache$a;Ljava/io/File;)V

    throw p2
.end method

.method public put(Ljava/lang/String;Ljava/lang/String;I)V
    .registers 4

    invoke-static {p3, p2}, Lcom/tradplus/ads/mobileads/util/ACache$b;->a(ILjava/lang/String;)Ljava/lang/String;

    move-result-object p2

    invoke-virtual {p0, p1, p2}, Lcom/tradplus/ads/mobileads/util/ACache;->put(Ljava/lang/String;Ljava/lang/String;)V

    return-void
.end method

.method public put(Ljava/lang/String;Lorg/json/JSONArray;)V
    .registers 3

    invoke-virtual {p2}, Lorg/json/JSONArray;->toString()Ljava/lang/String;

    move-result-object p2

    invoke-virtual {p0, p1, p2}, Lcom/tradplus/ads/mobileads/util/ACache;->put(Ljava/lang/String;Ljava/lang/String;)V

    return-void
.end method

.method public put(Ljava/lang/String;Lorg/json/JSONArray;I)V
    .registers 4

    invoke-virtual {p2}, Lorg/json/JSONArray;->toString()Ljava/lang/String;

    move-result-object p2

    invoke-virtual {p0, p1, p2, p3}, Lcom/tradplus/ads/mobileads/util/ACache;->put(Ljava/lang/String;Ljava/lang/String;I)V

    return-void
.end method

.method public put(Ljava/lang/String;Lorg/json/JSONObject;)V
    .registers 3

    invoke-virtual {p2}, Lorg/json/JSONObject;->toString()Ljava/lang/String;

    move-result-object p2

    invoke-virtual {p0, p1, p2}, Lcom/tradplus/ads/mobileads/util/ACache;->put(Ljava/lang/String;Ljava/lang/String;)V

    return-void
.end method

.method public put(Ljava/lang/String;Lorg/json/JSONObject;I)V
    .registers 4

    invoke-virtual {p2}, Lorg/json/JSONObject;->toString()Ljava/lang/String;

    move-result-object p2

    invoke-virtual {p0, p1, p2, p3}, Lcom/tradplus/ads/mobileads/util/ACache;->put(Ljava/lang/String;Ljava/lang/String;I)V

    return-void
.end method

.method public put(Ljava/lang/String;[B)V
    .registers 5

    iget-object v0, p0, Lcom/tradplus/ads/mobileads/util/ACache;->b:Lcom/tradplus/ads/mobileads/util/ACache$a;

    if-nez v0, :cond_5

    return-void

    :cond_5
    invoke-static {v0, p1}, Lcom/tradplus/ads/mobileads/util/ACache$a;->a(Lcom/tradplus/ads/mobileads/util/ACache$a;Ljava/lang/String;)Ljava/io/File;

    move-result-object p1

    const/4 v0, 0x0

    :try_start_a
    new-instance v1, Ljava/io/FileOutputStream;

    invoke-direct {v1, p1}, Ljava/io/FileOutputStream;-><init>(Ljava/io/File;)V
    :try_end_f
    .catch Ljava/lang/Exception; {:try_start_a .. :try_end_f} :catch_23
    .catchall {:try_start_a .. :try_end_f} :catchall_21

    :try_start_f
    invoke-virtual {v1, p2}, Ljava/io/FileOutputStream;->write([B)V
    :try_end_12
    .catch Ljava/lang/Exception; {:try_start_f .. :try_end_12} :catch_1e
    .catchall {:try_start_f .. :try_end_12} :catchall_1b

    :try_start_12
    invoke-virtual {v1}, Ljava/io/FileOutputStream;->flush()V

    invoke-virtual {v1}, Ljava/io/FileOutputStream;->close()V
    :try_end_18
    .catch Ljava/io/IOException; {:try_start_12 .. :try_end_18} :catch_19

    goto :goto_34

    :catch_19
    move-exception p2

    goto :goto_31

    :catchall_1b
    move-exception p2

    move-object v0, v1

    goto :goto_3a

    :catch_1e
    move-exception p2

    move-object v0, v1

    goto :goto_24

    :catchall_21
    move-exception p2

    goto :goto_3a

    :catch_23
    move-exception p2

    :goto_24
    :try_start_24
    invoke-virtual {p2}, Ljava/lang/Exception;->printStackTrace()V
    :try_end_27
    .catchall {:try_start_24 .. :try_end_27} :catchall_21

    if-eqz v0, :cond_34

    :try_start_29
    invoke-virtual {v0}, Ljava/io/FileOutputStream;->flush()V

    invoke-virtual {v0}, Ljava/io/FileOutputStream;->close()V
    :try_end_2f
    .catch Ljava/io/IOException; {:try_start_29 .. :try_end_2f} :catch_30

    goto :goto_34

    :catch_30
    move-exception p2

    :goto_31
    invoke-virtual {p2}, Ljava/io/IOException;->printStackTrace()V

    :cond_34
    :goto_34
    iget-object p2, p0, Lcom/tradplus/ads/mobileads/util/ACache;->b:Lcom/tradplus/ads/mobileads/util/ACache$a;

    invoke-static {p2, p1}, Lcom/tradplus/ads/mobileads/util/ACache$a;->a(Lcom/tradplus/ads/mobileads/util/ACache$a;Ljava/io/File;)V

    return-void

    :goto_3a
    if-eqz v0, :cond_47

    :try_start_3c
    invoke-virtual {v0}, Ljava/io/FileOutputStream;->flush()V

    invoke-virtual {v0}, Ljava/io/FileOutputStream;->close()V
    :try_end_42
    .catch Ljava/io/IOException; {:try_start_3c .. :try_end_42} :catch_43

    goto :goto_47

    :catch_43
    move-exception v0

    invoke-virtual {v0}, Ljava/io/IOException;->printStackTrace()V

    :cond_47
    :goto_47
    iget-object v0, p0, Lcom/tradplus/ads/mobileads/util/ACache;->b:Lcom/tradplus/ads/mobileads/util/ACache$a;

    invoke-static {v0, p1}, Lcom/tradplus/ads/mobileads/util/ACache$a;->a(Lcom/tradplus/ads/mobileads/util/ACache$a;Ljava/io/File;)V

    throw p2
.end method

.method public put(Ljava/lang/String;[BI)V
    .registers 4

    invoke-static {p3, p2}, Lcom/tradplus/ads/mobileads/util/ACache$b;->a(I[B)[B

    move-result-object p2

    invoke-virtual {p0, p1, p2}, Lcom/tradplus/ads/mobileads/util/ACache;->put(Ljava/lang/String;[B)V

    return-void
.end method

.method public remove(Ljava/lang/String;)Z
    .registers 3

    iget-object v0, p0, Lcom/tradplus/ads/mobileads/util/ACache;->b:Lcom/tradplus/ads/mobileads/util/ACache$a;

    if-nez v0, :cond_6

    const/4 p1, 0x0

    return p1

    :cond_6
    invoke-static {v0, p1}, Lcom/tradplus/ads/mobileads/util/ACache$a;->c(Lcom/tradplus/ads/mobileads/util/ACache$a;Ljava/lang/String;)Z

    move-result p1

    return p1
.end method