LightHttpResponse.smali
.class public Lcom/facebook/stetho/server/http/LightHttpResponse;
.super Lcom/facebook/stetho/server/http/LightHttpMessage;
.source "SourceFile"
# instance fields
.field public body:Lcom/facebook/stetho/server/http/LightHttpBody;
.field public code:I
.field public reasonPhrase:Ljava/lang/String;
# direct methods
.method public constructor <init>()V
.registers 1
invoke-direct {p0}, Lcom/facebook/stetho/server/http/LightHttpMessage;-><init>()V
return-void
.end method
# virtual methods
.method public prepare()V
.registers 3
.line 1
iget-object v0, p0, Lcom/facebook/stetho/server/http/LightHttpResponse;->body:Lcom/facebook/stetho/server/http/LightHttpBody;
if-eqz v0, :cond_1c
.line 2
invoke-virtual {v0}, Lcom/facebook/stetho/server/http/LightHttpBody;->contentType()Ljava/lang/String;
move-result-object v0
const-string v1, "Content-Type"
invoke-virtual {p0, v1, v0}, Lcom/facebook/stetho/server/http/LightHttpMessage;->addHeader(Ljava/lang/String;Ljava/lang/String;)V
.line 3
iget-object v0, p0, Lcom/facebook/stetho/server/http/LightHttpResponse;->body:Lcom/facebook/stetho/server/http/LightHttpBody;
invoke-virtual {v0}, Lcom/facebook/stetho/server/http/LightHttpBody;->contentLength()I
move-result v0
invoke-static {v0}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;
move-result-object v0
const-string v1, "Content-Length"
invoke-virtual {p0, v1, v0}, Lcom/facebook/stetho/server/http/LightHttpMessage;->addHeader(Ljava/lang/String;Ljava/lang/String;)V
:cond_1c
return-void
.end method
.method public reset()V
.registers 2
.line 1
invoke-super {p0}, Lcom/facebook/stetho/server/http/LightHttpMessage;->reset()V
const/4 v0, -0x1
.line 2
iput v0, p0, Lcom/facebook/stetho/server/http/LightHttpResponse;->code:I
const/4 v0, 0x0
.line 3
iput-object v0, p0, Lcom/facebook/stetho/server/http/LightHttpResponse;->reasonPhrase:Ljava/lang/String;
.line 4
iput-object v0, p0, Lcom/facebook/stetho/server/http/LightHttpResponse;->body:Lcom/facebook/stetho/server/http/LightHttpBody;
return-void
.end method