apkfuckery/com.discord/smali/okhttp3/internal/http/RealResponseBody.smali
2019-02-04 21:05:16 +01:00

78 lines
1.8 KiB
Smali

.class public final Lokhttp3/internal/http/RealResponseBody;
.super Lokhttp3/ResponseBody;
.source "RealResponseBody.java"
# instance fields
.field private final headers:Lokhttp3/Headers;
.field private final source:Lokio/BufferedSource;
# direct methods
.method public constructor <init>(Lokhttp3/Headers;Lokio/BufferedSource;)V
.locals 0
.param p1, "headers" # Lokhttp3/Headers;
.param p2, "source" # Lokio/BufferedSource;
.prologue
invoke-direct {p0}, Lokhttp3/ResponseBody;-><init>()V
iput-object p1, p0, Lokhttp3/internal/http/RealResponseBody;->headers:Lokhttp3/Headers;
iput-object p2, p0, Lokhttp3/internal/http/RealResponseBody;->source:Lokio/BufferedSource;
return-void
.end method
# virtual methods
.method public contentLength()J
.locals 2
.prologue
iget-object v0, p0, Lokhttp3/internal/http/RealResponseBody;->headers:Lokhttp3/Headers;
invoke-static {v0}, Lokhttp3/internal/http/OkHeaders;->contentLength(Lokhttp3/Headers;)J
move-result-wide v0
return-wide v0
.end method
.method public contentType()Lokhttp3/MediaType;
.locals 3
.prologue
iget-object v1, p0, Lokhttp3/internal/http/RealResponseBody;->headers:Lokhttp3/Headers;
const-string v2, "Content-Type"
invoke-virtual {v1, v2}, Lokhttp3/Headers;->get(Ljava/lang/String;)Ljava/lang/String;
move-result-object v0
.local v0, "contentType":Ljava/lang/String;
if-eqz v0, :cond_0
invoke-static {v0}, Lokhttp3/MediaType;->parse(Ljava/lang/String;)Lokhttp3/MediaType;
move-result-object v1
:goto_0
return-object v1
:cond_0
const/4 v1, 0x0
goto :goto_0
.end method
.method public source()Lokio/BufferedSource;
.locals 1
.prologue
iget-object v0, p0, Lokhttp3/internal/http/RealResponseBody;->source:Lokio/BufferedSource;
return-object v0
.end method