a.smali

.class public final Lcom/bumptech/glide/g/a;
.super Ljava/lang/Object;
.source "ByteArrayPool.java"


# static fields
.field private static final JP:Lcom/bumptech/glide/g/a;


# instance fields
.field private final JO:Ljava/util/Queue;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/Queue",
            "<[B>;"
        }
    .end annotation
.end field


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

    .prologue
    .line 19
    new-instance v0, Lcom/bumptech/glide/g/a;

    invoke-direct {v0}, Lcom/bumptech/glide/g/a;-><init>()V

    sput-object v0, Lcom/bumptech/glide/g/a;->JP:Lcom/bumptech/glide/g/a;

    return-void
.end method

.method private constructor <init>()V
    .registers 2

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

    .line 18
    const/4 v0, 0x0

    invoke-static {v0}, Lcom/bumptech/glide/g/h;->au(I)Ljava/util/Queue;

    move-result-object v0

    iput-object v0, p0, Lcom/bumptech/glide/g/a;->JO:Ljava/util/Queue;

    .line 28
    return-void
.end method

.method public static eJ()Lcom/bumptech/glide/g/a;
    .registers 1

    .prologue
    .line 25
    sget-object v0, Lcom/bumptech/glide/g/a;->JP:Lcom/bumptech/glide/g/a;

    return-object v0
.end method


# virtual methods
.method public final d([B)Z
    .registers 6

    .prologue
    const/4 v0, 0x0

    .line 64
    array-length v1, p1

    const/high16 v2, 0x10000

    if-eq v1, v2, :cond_7

    .line 75
    :goto_6
    return v0

    .line 69
    :cond_7
    iget-object v1, p0, Lcom/bumptech/glide/g/a;->JO:Ljava/util/Queue;

    monitor-enter v1

    .line 70
    :try_start_a
    iget-object v2, p0, Lcom/bumptech/glide/g/a;->JO:Ljava/util/Queue;

    invoke-interface {v2}, Ljava/util/Queue;->size()I

    move-result v2

    const/16 v3, 0x20

    if-ge v2, v3, :cond_1a

    .line 71
    const/4 v0, 0x1

    .line 72
    iget-object v2, p0, Lcom/bumptech/glide/g/a;->JO:Ljava/util/Queue;

    invoke-interface {v2, p1}, Ljava/util/Queue;->offer(Ljava/lang/Object;)Z

    .line 74
    :cond_1a
    monitor-exit v1

    goto :goto_6

    :catchall_1c
    move-exception v0

    monitor-exit v1
    :try_end_1e
    .catchall {:try_start_a .. :try_end_1e} :catchall_1c

    throw v0
.end method

.method public final getBytes()[B
    .registers 3

    .prologue
    .line 45
    iget-object v1, p0, Lcom/bumptech/glide/g/a;->JO:Ljava/util/Queue;

    monitor-enter v1

    .line 46
    :try_start_3
    iget-object v0, p0, Lcom/bumptech/glide/g/a;->JO:Ljava/util/Queue;

    invoke-interface {v0}, Ljava/util/Queue;->poll()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, [B

    .line 47
    monitor-exit v1
    :try_end_c
    .catchall {:try_start_3 .. :try_end_c} :catchall_13

    .line 48
    if-nez v0, :cond_12

    .line 49
    const/high16 v0, 0x10000

    new-array v0, v0, [B

    .line 54
    :cond_12
    return-object v0

    .line 47
    :catchall_13
    move-exception v0

    :try_start_14
    monitor-exit v1
    :try_end_15
    .catchall {:try_start_14 .. :try_end_15} :catchall_13

    throw v0
.end method