155 lines
4.1 KiB
Smali
155 lines
4.1 KiB
Smali
.class public Lorg/apache/http/conn/BasicEofSensorWatcher;
|
|
.super Ljava/lang/Object;
|
|
.source "BasicEofSensorWatcher.java"
|
|
|
|
# interfaces
|
|
.implements Lorg/apache/http/conn/EofSensorWatcher;
|
|
|
|
|
|
# annotations
|
|
.annotation build Lorg/apache/http/annotation/NotThreadSafe;
|
|
.end annotation
|
|
|
|
|
|
# instance fields
|
|
.field public final attemptReuse:Z
|
|
|
|
.field public final managedConn:Lorg/apache/http/conn/ManagedClientConnection;
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(Lorg/apache/http/conn/ManagedClientConnection;Z)V
|
|
.locals 0
|
|
|
|
.line 1
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
.line 2
|
|
iput-object p1, p0, Lorg/apache/http/conn/BasicEofSensorWatcher;->managedConn:Lorg/apache/http/conn/ManagedClientConnection;
|
|
|
|
.line 3
|
|
iput-boolean p2, p0, Lorg/apache/http/conn/BasicEofSensorWatcher;->attemptReuse:Z
|
|
|
|
return-void
|
|
|
|
.line 4
|
|
:cond_0
|
|
new-instance p1, Ljava/lang/IllegalArgumentException;
|
|
|
|
const-string p2, "Connection may not be null."
|
|
|
|
invoke-direct {p1, p2}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public eofDetected(Ljava/io/InputStream;)Z
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
.line 1
|
|
:try_start_0
|
|
iget-boolean v0, p0, Lorg/apache/http/conn/BasicEofSensorWatcher;->attemptReuse:Z
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
.line 2
|
|
invoke-virtual {p1}, Ljava/io/InputStream;->close()V
|
|
|
|
.line 3
|
|
iget-object p1, p0, Lorg/apache/http/conn/BasicEofSensorWatcher;->managedConn:Lorg/apache/http/conn/ManagedClientConnection;
|
|
|
|
invoke-interface {p1}, Lorg/apache/http/conn/ManagedClientConnection;->markReusable()V
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
.line 4
|
|
:cond_0
|
|
iget-object p1, p0, Lorg/apache/http/conn/BasicEofSensorWatcher;->managedConn:Lorg/apache/http/conn/ManagedClientConnection;
|
|
|
|
invoke-interface {p1}, Lorg/apache/http/conn/ConnectionReleaseTrigger;->releaseConnection()V
|
|
|
|
const/4 p1, 0x0
|
|
|
|
return p1
|
|
|
|
:catchall_0
|
|
move-exception p1
|
|
|
|
iget-object v0, p0, Lorg/apache/http/conn/BasicEofSensorWatcher;->managedConn:Lorg/apache/http/conn/ManagedClientConnection;
|
|
|
|
invoke-interface {v0}, Lorg/apache/http/conn/ConnectionReleaseTrigger;->releaseConnection()V
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method public streamAbort(Ljava/io/InputStream;)Z
|
|
.locals 0
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
.line 1
|
|
iget-object p1, p0, Lorg/apache/http/conn/BasicEofSensorWatcher;->managedConn:Lorg/apache/http/conn/ManagedClientConnection;
|
|
|
|
invoke-interface {p1}, Lorg/apache/http/conn/ConnectionReleaseTrigger;->abortConnection()V
|
|
|
|
const/4 p1, 0x0
|
|
|
|
return p1
|
|
.end method
|
|
|
|
.method public streamClosed(Ljava/io/InputStream;)Z
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
.line 1
|
|
:try_start_0
|
|
iget-boolean v0, p0, Lorg/apache/http/conn/BasicEofSensorWatcher;->attemptReuse:Z
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
.line 2
|
|
invoke-virtual {p1}, Ljava/io/InputStream;->close()V
|
|
|
|
.line 3
|
|
iget-object p1, p0, Lorg/apache/http/conn/BasicEofSensorWatcher;->managedConn:Lorg/apache/http/conn/ManagedClientConnection;
|
|
|
|
invoke-interface {p1}, Lorg/apache/http/conn/ManagedClientConnection;->markReusable()V
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
.line 4
|
|
:cond_0
|
|
iget-object p1, p0, Lorg/apache/http/conn/BasicEofSensorWatcher;->managedConn:Lorg/apache/http/conn/ManagedClientConnection;
|
|
|
|
invoke-interface {p1}, Lorg/apache/http/conn/ConnectionReleaseTrigger;->releaseConnection()V
|
|
|
|
const/4 p1, 0x0
|
|
|
|
return p1
|
|
|
|
:catchall_0
|
|
move-exception p1
|
|
|
|
iget-object v0, p0, Lorg/apache/http/conn/BasicEofSensorWatcher;->managedConn:Lorg/apache/http/conn/ManagedClientConnection;
|
|
|
|
invoke-interface {v0}, Lorg/apache/http/conn/ConnectionReleaseTrigger;->releaseConnection()V
|
|
|
|
throw p1
|
|
.end method
|