111 lines
2.6 KiB
Smali
111 lines
2.6 KiB
Smali
.class public Lorg/apache/http/impl/client/BasicResponseHandler;
|
|
.super Ljava/lang/Object;
|
|
.source "BasicResponseHandler.java"
|
|
|
|
# interfaces
|
|
.implements Lorg/apache/http/client/ResponseHandler;
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Ljava/lang/Object;",
|
|
"Lorg/apache/http/client/ResponseHandler<",
|
|
"Ljava/lang/String;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
|
|
.annotation build Lorg/apache/http/annotation/Immutable;
|
|
.end annotation
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>()V
|
|
.locals 0
|
|
|
|
.line 1
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public bridge synthetic handleResponse(Lorg/apache/http/HttpResponse;)Ljava/lang/Object;
|
|
.locals 0
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Lorg/apache/http/client/ClientProtocolException;,
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
.line 1
|
|
invoke-virtual {p0, p1}, Lorg/apache/http/impl/client/BasicResponseHandler;->handleResponse(Lorg/apache/http/HttpResponse;)Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
return-object p1
|
|
.end method
|
|
|
|
.method public handleResponse(Lorg/apache/http/HttpResponse;)Ljava/lang/String;
|
|
.locals 3
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Lorg/apache/http/client/HttpResponseException;,
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
.line 2
|
|
invoke-interface {p1}, Lorg/apache/http/HttpResponse;->getStatusLine()Lorg/apache/http/StatusLine;
|
|
|
|
move-result-object v0
|
|
|
|
.line 3
|
|
invoke-interface {v0}, Lorg/apache/http/StatusLine;->getStatusCode()I
|
|
|
|
move-result v1
|
|
|
|
const/16 v2, 0x12c
|
|
|
|
if-ge v1, v2, :cond_1
|
|
|
|
.line 4
|
|
invoke-interface {p1}, Lorg/apache/http/HttpResponse;->getEntity()Lorg/apache/http/HttpEntity;
|
|
|
|
move-result-object p1
|
|
|
|
if-nez p1, :cond_0
|
|
|
|
const/4 p1, 0x0
|
|
|
|
goto :goto_0
|
|
|
|
.line 5
|
|
:cond_0
|
|
invoke-static {p1}, Lorg/apache/http/util/EntityUtils;->toString(Lorg/apache/http/HttpEntity;)Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
:goto_0
|
|
return-object p1
|
|
|
|
.line 6
|
|
:cond_1
|
|
new-instance p1, Lorg/apache/http/client/HttpResponseException;
|
|
|
|
invoke-interface {v0}, Lorg/apache/http/StatusLine;->getStatusCode()I
|
|
|
|
move-result v1
|
|
|
|
invoke-interface {v0}, Lorg/apache/http/StatusLine;->getReasonPhrase()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-direct {p1, v1, v0}, Lorg/apache/http/client/HttpResponseException;-><init>(ILjava/lang/String;)V
|
|
|
|
throw p1
|
|
.end method
|