148 lines
3.1 KiB
Smali
148 lines
3.1 KiB
Smali
.class public Lorg/apache/http/impl/io/IdentityInputStream;
|
|
.super Ljava/io/InputStream;
|
|
.source "IdentityInputStream.java"
|
|
|
|
|
|
# instance fields
|
|
.field private closed:Z
|
|
|
|
.field private final in:Lorg/apache/http/io/SessionInputBuffer;
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(Lorg/apache/http/io/SessionInputBuffer;)V
|
|
.locals 1
|
|
|
|
.line 1
|
|
invoke-direct {p0}, Ljava/io/InputStream;-><init>()V
|
|
|
|
const/4 v0, 0x0
|
|
|
|
.line 2
|
|
iput-boolean v0, p0, Lorg/apache/http/impl/io/IdentityInputStream;->closed:Z
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
.line 3
|
|
iput-object p1, p0, Lorg/apache/http/impl/io/IdentityInputStream;->in:Lorg/apache/http/io/SessionInputBuffer;
|
|
|
|
return-void
|
|
|
|
.line 4
|
|
:cond_0
|
|
new-instance p1, Ljava/lang/IllegalArgumentException;
|
|
|
|
const-string v0, "Session input buffer may not be null"
|
|
|
|
invoke-direct {p1, v0}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public available()I
|
|
.locals 2
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
.line 1
|
|
iget-boolean v0, p0, Lorg/apache/http/impl/io/IdentityInputStream;->closed:Z
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
iget-object v0, p0, Lorg/apache/http/impl/io/IdentityInputStream;->in:Lorg/apache/http/io/SessionInputBuffer;
|
|
|
|
const/16 v1, 0xa
|
|
|
|
invoke-interface {v0, v1}, Lorg/apache/http/io/SessionInputBuffer;->isDataAvailable(I)Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
const/4 v0, 0x1
|
|
|
|
return v0
|
|
|
|
:cond_0
|
|
const/4 v0, 0x0
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public close()V
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
const/4 v0, 0x1
|
|
|
|
.line 1
|
|
iput-boolean v0, p0, Lorg/apache/http/impl/io/IdentityInputStream;->closed:Z
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public read()I
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
.line 1
|
|
iget-boolean v0, p0, Lorg/apache/http/impl/io/IdentityInputStream;->closed:Z
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
const/4 v0, -0x1
|
|
|
|
return v0
|
|
|
|
.line 2
|
|
:cond_0
|
|
iget-object v0, p0, Lorg/apache/http/impl/io/IdentityInputStream;->in:Lorg/apache/http/io/SessionInputBuffer;
|
|
|
|
invoke-interface {v0}, Lorg/apache/http/io/SessionInputBuffer;->read()I
|
|
|
|
move-result v0
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public read([BII)I
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
.line 3
|
|
iget-boolean v0, p0, Lorg/apache/http/impl/io/IdentityInputStream;->closed:Z
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
const/4 p1, -0x1
|
|
|
|
return p1
|
|
|
|
.line 4
|
|
:cond_0
|
|
iget-object v0, p0, Lorg/apache/http/impl/io/IdentityInputStream;->in:Lorg/apache/http/io/SessionInputBuffer;
|
|
|
|
invoke-interface {v0, p1, p2, p3}, Lorg/apache/http/io/SessionInputBuffer;->read([BII)I
|
|
|
|
move-result p1
|
|
|
|
return p1
|
|
.end method
|