ExceptionCatchingInputStream.smali 
.class public Lcom/bumptech/glide/util/ExceptionCatchingInputStream;
.super Ljava/io/InputStream;
.source "ExceptionCatchingInputStream.java"
# static fields
.field private static final QUEUE:Ljava/util/Queue;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/Queue<",
            "Lcom/bumptech/glide/util/ExceptionCatchingInputStream;",
            ">;"
        }
    .end annotation
.end field
# instance fields
.field private exception:Ljava/io/IOException;
.field private wrapped:Ljava/io/InputStream;
# direct methods
.method static constructor <clinit>()V
    .registers 1
    const/4 v0, 0x0
    .line 19
    invoke-static {v0}, Lcom/bumptech/glide/util/Util;->createQueue(I)Ljava/util/Queue;
    move-result-object v0
    sput-object v0, Lcom/bumptech/glide/util/ExceptionCatchingInputStream;->QUEUE:Ljava/util/Queue;
    return-void
.end method
.method constructor <init>()V
    .registers 1
    .line 44
    invoke-direct {p0}, Ljava/io/InputStream;-><init>()V
    return-void
.end method
.method static clearQueue()V
    .registers 2
    .line 39
    :goto_0
    sget-object v0, Lcom/bumptech/glide/util/ExceptionCatchingInputStream;->QUEUE:Ljava/util/Queue;
    invoke-interface {v0}, Ljava/util/Queue;->isEmpty()Z
    move-result v1
    if-nez v1, :cond_c
    .line 40
    invoke-interface {v0}, Ljava/util/Queue;->remove()Ljava/lang/Object;
    goto :goto_0
    :cond_c
    return-void
.end method
.method public static obtain(Ljava/io/InputStream;)Lcom/bumptech/glide/util/ExceptionCatchingInputStream;
    .registers 3
    .line 27
    sget-object v0, Lcom/bumptech/glide/util/ExceptionCatchingInputStream;->QUEUE:Ljava/util/Queue;
    monitor-enter v0
    .line 28
    :try_start_3
    invoke-interface {v0}, Ljava/util/Queue;->poll()Ljava/lang/Object;
    move-result-object v1
    check-cast v1, Lcom/bumptech/glide/util/ExceptionCatchingInputStream;
    .line 29
    monitor-exit v0
    :try_end_a
    .catchall {:try_start_3 .. :try_end_a} :catchall_15
    if-nez v1, :cond_11
    .line 31
    new-instance v1, Lcom/bumptech/glide/util/ExceptionCatchingInputStream;
    invoke-direct {v1}, Lcom/bumptech/glide/util/ExceptionCatchingInputStream;-><init>()V
    .line 33
    :cond_11
    invoke-virtual {v1, p0}, Lcom/bumptech/glide/util/ExceptionCatchingInputStream;->setInputStream(Ljava/io/InputStream;)V
    return-object v1
    :catchall_15
    move-exception p0
    .line 29
    :try_start_16
    monitor-exit v0
    :try_end_17
    .catchall {:try_start_16 .. :try_end_17} :catchall_15
    throw p0
.end method
# virtual methods
.method public available()I
    .registers 2
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;
        }
    .end annotation
    .line 54
    iget-object v0, p0, Lcom/bumptech/glide/util/ExceptionCatchingInputStream;->wrapped:Ljava/io/InputStream;
    invoke-virtual {v0}, Ljava/io/InputStream;->available()I
    move-result v0
    return v0
.end method
.method public close()V
    .registers 2
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;
        }
    .end annotation
    .line 59
    iget-object v0, p0, Lcom/bumptech/glide/util/ExceptionCatchingInputStream;->wrapped:Ljava/io/InputStream;
    invoke-virtual {v0}, Ljava/io/InputStream;->close()V
    return-void
.end method
.method public getException()Ljava/io/IOException;
    .registers 2
    .line 127
    iget-object v0, p0, Lcom/bumptech/glide/util/ExceptionCatchingInputStream;->exception:Ljava/io/IOException;
    return-object v0
.end method
.method public mark(I)V
    .registers 3
    .line 64
    iget-object v0, p0, Lcom/bumptech/glide/util/ExceptionCatchingInputStream;->wrapped:Ljava/io/InputStream;
    invoke-virtual {v0, p1}, Ljava/io/InputStream;->mark(I)V
    return-void
.end method
.method public markSupported()Z
    .registers 2
    .line 69
    iget-object v0, p0, Lcom/bumptech/glide/util/ExceptionCatchingInputStream;->wrapped:Ljava/io/InputStream;
    invoke-virtual {v0}, Ljava/io/InputStream;->markSupported()Z
    move-result v0
    return v0
.end method
.method public read()I
    .registers 2
    .line 117
    :try_start_0
    iget-object v0, p0, Lcom/bumptech/glide/util/ExceptionCatchingInputStream;->wrapped:Ljava/io/InputStream;
    invoke-virtual {v0}, Ljava/io/InputStream;->read()I
    move-result v0
    :try_end_6
    .catch Ljava/io/IOException; {:try_start_0 .. :try_end_6} :catch_7
    goto :goto_b
    :catch_7
    move-exception v0
    .line 119
    iput-object v0, p0, Lcom/bumptech/glide/util/ExceptionCatchingInputStream;->exception:Ljava/io/IOException;
    const/4 v0, -0x1
    :goto_b
    return v0
.end method
.method public read([B)I
    .registers 3
    .line 76
    :try_start_0
    iget-object v0, p0, Lcom/bumptech/glide/util/ExceptionCatchingInputStream;->wrapped:Ljava/io/InputStream;
    invoke-virtual {v0, p1}, Ljava/io/InputStream;->read([B)I
    move-result p1
    :try_end_6
    .catch Ljava/io/IOException; {:try_start_0 .. :try_end_6} :catch_7
    goto :goto_b
    :catch_7
    move-exception p1
    .line 78
    iput-object p1, p0, Lcom/bumptech/glide/util/ExceptionCatchingInputStream;->exception:Ljava/io/IOException;
    const/4 p1, -0x1
    :goto_b
    return p1
.end method
.method public read([BII)I
    .registers 5
    .line 88
    :try_start_0
    iget-object v0, p0, Lcom/bumptech/glide/util/ExceptionCatchingInputStream;->wrapped:Ljava/io/InputStream;
    invoke-virtual {v0, p1, p2, p3}, Ljava/io/InputStream;->read([BII)I
    move-result p1
    :try_end_6
    .catch Ljava/io/IOException; {:try_start_0 .. :try_end_6} :catch_7
    goto :goto_b
    :catch_7
    move-exception p1
    .line 90
    iput-object p1, p0, Lcom/bumptech/glide/util/ExceptionCatchingInputStream;->exception:Ljava/io/IOException;
    const/4 p1, -0x1
    :goto_b
    return p1
.end method
.method public release()V
    .registers 3
    const/4 v0, 0x0
    .line 131
    iput-object v0, p0, Lcom/bumptech/glide/util/ExceptionCatchingInputStream;->exception:Ljava/io/IOException;
    .line 132
    iput-object v0, p0, Lcom/bumptech/glide/util/ExceptionCatchingInputStream;->wrapped:Ljava/io/InputStream;
    .line 133
    sget-object v0, Lcom/bumptech/glide/util/ExceptionCatchingInputStream;->QUEUE:Ljava/util/Queue;
    monitor-enter v0
    .line 134
    :try_start_8
    invoke-interface {v0, p0}, Ljava/util/Queue;->offer(Ljava/lang/Object;)Z
    .line 135
    monitor-exit v0
    return-void
    :catchall_d
    move-exception v1
    monitor-exit v0
    :try_end_f
    .catchall {:try_start_8 .. :try_end_f} :catchall_d
    throw v1
.end method
.method public declared-synchronized reset()V
    .registers 2
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;
        }
    .end annotation
    monitor-enter p0
    .line 98
    :try_start_1
    iget-object v0, p0, Lcom/bumptech/glide/util/ExceptionCatchingInputStream;->wrapped:Ljava/io/InputStream;
    invoke-virtual {v0}, Ljava/io/InputStream;->reset()V
    :try_end_6
    .catchall {:try_start_1 .. :try_end_6} :catchall_8
    .line 99
    monitor-exit p0
    return-void
    :catchall_8
    move-exception v0
    monitor-exit p0
    throw v0
.end method
.method setInputStream(Ljava/io/InputStream;)V
    .registers 2
    .line 49
    iput-object p1, p0, Lcom/bumptech/glide/util/ExceptionCatchingInputStream;->wrapped:Ljava/io/InputStream;
    return-void
.end method
.method public skip(J)J
    .registers 4
    .line 105
    :try_start_0
    iget-object v0, p0, Lcom/bumptech/glide/util/ExceptionCatchingInputStream;->wrapped:Ljava/io/InputStream;
    invoke-virtual {v0, p1, p2}, Ljava/io/InputStream;->skip(J)J
    move-result-wide p1
    :try_end_6
    .catch Ljava/io/IOException; {:try_start_0 .. :try_end_6} :catch_7
    goto :goto_c
    :catch_7
    move-exception p1
    .line 107
    iput-object p1, p0, Lcom/bumptech/glide/util/ExceptionCatchingInputStream;->exception:Ljava/io/IOException;
    const-wide/16 p1, 0x0
    :goto_c
    return-wide p1
.end method