ExceptionPassthroughInputStream.smali
.class public final Lcom/bumptech/glide/util/ExceptionPassthroughInputStream;
.super Ljava/io/InputStream;
.source "ExceptionPassthroughInputStream.java"
# static fields
.field private static final POOL:Ljava/util/Queue;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/Queue<",
"Lcom/bumptech/glide/util/ExceptionPassthroughInputStream;",
">;"
}
.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 27
invoke-static {v0}, Lcom/bumptech/glide/util/Util;->createQueue(I)Ljava/util/Queue;
move-result-object v0
sput-object v0, Lcom/bumptech/glide/util/ExceptionPassthroughInputStream;->POOL:Ljava/util/Queue;
return-void
.end method
.method constructor <init>()V
.registers 1
.line 54
invoke-direct {p0}, Ljava/io/InputStream;-><init>()V
return-void
.end method
.method static clearQueue()V
.registers 3
.line 47
sget-object v0, Lcom/bumptech/glide/util/ExceptionPassthroughInputStream;->POOL:Ljava/util/Queue;
monitor-enter v0
.line 48
:goto_3
:try_start_3
sget-object v1, Lcom/bumptech/glide/util/ExceptionPassthroughInputStream;->POOL:Ljava/util/Queue;
invoke-interface {v1}, Ljava/util/Queue;->isEmpty()Z
move-result v2
if-nez v2, :cond_f
.line 49
invoke-interface {v1}, Ljava/util/Queue;->remove()Ljava/lang/Object;
goto :goto_3
.line 51
:cond_f
monitor-exit v0
return-void
:catchall_11
move-exception v1
monitor-exit v0
:try_end_13
.catchall {:try_start_3 .. :try_end_13} :catchall_11
throw v1
.end method
.method public static obtain(Ljava/io/InputStream;)Lcom/bumptech/glide/util/ExceptionPassthroughInputStream;
.registers 3
.line 35
sget-object v0, Lcom/bumptech/glide/util/ExceptionPassthroughInputStream;->POOL:Ljava/util/Queue;
monitor-enter v0
.line 36
:try_start_3
invoke-interface {v0}, Ljava/util/Queue;->poll()Ljava/lang/Object;
move-result-object v1
check-cast v1, Lcom/bumptech/glide/util/ExceptionPassthroughInputStream;
.line 37
monitor-exit v0
:try_end_a
.catchall {:try_start_3 .. :try_end_a} :catchall_15
if-nez v1, :cond_11
.line 39
new-instance v1, Lcom/bumptech/glide/util/ExceptionPassthroughInputStream;
invoke-direct {v1}, Lcom/bumptech/glide/util/ExceptionPassthroughInputStream;-><init>()V
.line 41
:cond_11
invoke-virtual {v1, p0}, Lcom/bumptech/glide/util/ExceptionPassthroughInputStream;->setInputStream(Ljava/io/InputStream;)V
return-object v1
:catchall_15
move-exception p0
.line 37
: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 64
iget-object v0, p0, Lcom/bumptech/glide/util/ExceptionPassthroughInputStream;->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 69
iget-object v0, p0, Lcom/bumptech/glide/util/ExceptionPassthroughInputStream;->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 129
iget-object v0, p0, Lcom/bumptech/glide/util/ExceptionPassthroughInputStream;->exception:Ljava/io/IOException;
return-object v0
.end method
.method public mark(I)V
.registers 3
.line 74
iget-object v0, p0, Lcom/bumptech/glide/util/ExceptionPassthroughInputStream;->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 79
iget-object v0, p0, Lcom/bumptech/glide/util/ExceptionPassthroughInputStream;->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
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 85
:try_start_0
iget-object v0, p0, Lcom/bumptech/glide/util/ExceptionPassthroughInputStream;->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
return v0
:catch_7
move-exception v0
.line 87
iput-object v0, p0, Lcom/bumptech/glide/util/ExceptionPassthroughInputStream;->exception:Ljava/io/IOException;
.line 88
throw v0
.end method
.method public read([B)I
.registers 3
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 95
:try_start_0
iget-object v0, p0, Lcom/bumptech/glide/util/ExceptionPassthroughInputStream;->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
return p1
:catch_7
move-exception p1
.line 97
iput-object p1, p0, Lcom/bumptech/glide/util/ExceptionPassthroughInputStream;->exception:Ljava/io/IOException;
.line 98
throw p1
.end method
.method public read([BII)I
.registers 5
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 105
:try_start_0
iget-object v0, p0, Lcom/bumptech/glide/util/ExceptionPassthroughInputStream;->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
return p1
:catch_7
move-exception p1
.line 107
iput-object p1, p0, Lcom/bumptech/glide/util/ExceptionPassthroughInputStream;->exception:Ljava/io/IOException;
.line 108
throw p1
.end method
.method public release()V
.registers 3
const/4 v0, 0x0
.line 133
iput-object v0, p0, Lcom/bumptech/glide/util/ExceptionPassthroughInputStream;->exception:Ljava/io/IOException;
.line 134
iput-object v0, p0, Lcom/bumptech/glide/util/ExceptionPassthroughInputStream;->wrapped:Ljava/io/InputStream;
.line 135
sget-object v0, Lcom/bumptech/glide/util/ExceptionPassthroughInputStream;->POOL:Ljava/util/Queue;
monitor-enter v0
.line 136
:try_start_8
invoke-interface {v0, p0}, Ljava/util/Queue;->offer(Ljava/lang/Object;)Z
.line 137
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 114
:try_start_1
iget-object v0, p0, Lcom/bumptech/glide/util/ExceptionPassthroughInputStream;->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 115
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 59
iput-object p1, p0, Lcom/bumptech/glide/util/ExceptionPassthroughInputStream;->wrapped:Ljava/io/InputStream;
return-void
.end method
.method public skip(J)J
.registers 4
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 120
:try_start_0
iget-object v0, p0, Lcom/bumptech/glide/util/ExceptionPassthroughInputStream;->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
return-wide p1
:catch_7
move-exception p1
.line 122
iput-object p1, p0, Lcom/bumptech/glide/util/ExceptionPassthroughInputStream;->exception:Ljava/io/IOException;
.line 123
throw p1
.end method