TextHttpResponseHandler.smali
.class public Lcom/loopj/android/http/TextHttpResponseHandler;
.super Lcom/loopj/android/http/AsyncHttpResponseHandler;
.source "TextHttpResponseHandler.java"
# static fields
.field private static final LOG_TAG:Ljava/lang/String; = "TextHttpResponseHandler"
# direct methods
.method public constructor <init>()V
.registers 2
const-string v0, "UTF-8"
.line 48
invoke-direct {p0, v0}, Lcom/loopj/android/http/TextHttpResponseHandler;-><init>(Ljava/lang/String;)V
return-void
.end method
.method public constructor <init>(Ljava/lang/String;)V
.registers 2
.line 52
invoke-direct {p0}, Lcom/loopj/android/http/AsyncHttpResponseHandler;-><init>()V
.line 53
invoke-virtual {p0, p1}, Lcom/loopj/android/http/TextHttpResponseHandler;->setCharset(Ljava/lang/String;)V
return-void
.end method
# virtual methods
.method public onFailure(I[Lorg/apache/http/Header;Ljava/lang/String;Ljava/lang/Throwable;)V
.registers 5
.line 78
invoke-virtual {p0, p3, p4}, Lcom/loopj/android/http/TextHttpResponseHandler;->onFailure(Ljava/lang/String;Ljava/lang/Throwable;)V
return-void
.end method
.method public onFailure(I[Lorg/apache/http/Header;[BLjava/lang/Throwable;)V
.registers 8
const/4 v0, 0x0
if-nez p3, :cond_5
move-object v1, v0
goto :goto_e
.line 107
:cond_5
:try_start_5
new-instance v1, Ljava/lang/String;
invoke-virtual {p0}, Lcom/loopj/android/http/TextHttpResponseHandler;->getCharset()Ljava/lang/String;
move-result-object v2
invoke-direct {v1, p3, v2}, Ljava/lang/String;-><init>([BLjava/lang/String;)V
.line 108
:goto_e
invoke-virtual {p0, p1, p2, v1, p4}, Lcom/loopj/android/http/TextHttpResponseHandler;->onFailure(I[Lorg/apache/http/Header;Ljava/lang/String;Ljava/lang/Throwable;)V
:try_end_11
.catch Ljava/io/UnsupportedEncodingException; {:try_start_5 .. :try_end_11} :catch_12
goto :goto_20
:catch_12
move-exception p1
const-string p3, "TextHttpResponseHandler"
const-string p4, "String encoding failed, calling onFailure(int, Header[], String, Throwable)"
.line 110
invoke-static {p3, p4}, Landroid/util/Log;->v(Ljava/lang/String;Ljava/lang/String;)I
const/4 p3, 0x0
.line 111
check-cast v0, Ljava/lang/String;
invoke-virtual {p0, p3, p2, v0, p1}, Lcom/loopj/android/http/TextHttpResponseHandler;->onFailure(I[Lorg/apache/http/Header;Ljava/lang/String;Ljava/lang/Throwable;)V
:goto_20
return-void
.end method
.method public onFailure(Ljava/lang/String;Ljava/lang/Throwable;)V
.registers 3
return-void
.end method
.method public onSuccess(I[Lorg/apache/http/Header;Ljava/lang/String;)V
.registers 4
.line 90
invoke-virtual {p0, p1, p3}, Lcom/loopj/android/http/TextHttpResponseHandler;->onSuccess(ILjava/lang/String;)V
return-void
.end method
.method public onSuccess(I[Lorg/apache/http/Header;[B)V
.registers 7
const/4 v0, 0x0
if-nez p3, :cond_5
move-object v1, v0
goto :goto_e
.line 96
:cond_5
:try_start_5
new-instance v1, Ljava/lang/String;
invoke-virtual {p0}, Lcom/loopj/android/http/TextHttpResponseHandler;->getCharset()Ljava/lang/String;
move-result-object v2
invoke-direct {v1, p3, v2}, Ljava/lang/String;-><init>([BLjava/lang/String;)V
.line 97
:goto_e
invoke-virtual {p0, p1, p2, v1}, Lcom/loopj/android/http/TextHttpResponseHandler;->onSuccess(I[Lorg/apache/http/Header;Ljava/lang/String;)V
:try_end_11
.catch Ljava/io/UnsupportedEncodingException; {:try_start_5 .. :try_end_11} :catch_12
goto :goto_20
:catch_12
move-exception p1
const-string p3, "TextHttpResponseHandler"
const-string v1, "String encoding failed, calling onFailure(int, Header[], String, Throwable)"
.line 99
invoke-static {p3, v1}, Landroid/util/Log;->v(Ljava/lang/String;Ljava/lang/String;)I
const/4 p3, 0x0
.line 100
check-cast v0, Ljava/lang/String;
invoke-virtual {p0, p3, p2, v0, p1}, Lcom/loopj/android/http/TextHttpResponseHandler;->onFailure(I[Lorg/apache/http/Header;Ljava/lang/String;Ljava/lang/Throwable;)V
:goto_20
return-void
.end method