URLConnectionNetwork.smali
.class public Lcom/h/r/URLConnectionNetwork;
.super Ljava/lang/Object;
# interfaces
.implements Lcom/h/r/Network;
# instance fields
.field private mUrlConnection:Ljava/net/HttpURLConnection;
# direct methods
.method public constructor <init>(Ljava/net/HttpURLConnection;)V
.registers 2
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
iput-object p1, p0, Lcom/h/r/URLConnectionNetwork;->mUrlConnection:Ljava/net/HttpURLConnection;
return-void
.end method
# virtual methods
.method public close()V
.registers 2
iget-object v0, p0, Lcom/h/r/URLConnectionNetwork;->mUrlConnection:Ljava/net/HttpURLConnection;
invoke-static {v0}, Lcom/h/q/IOUtils;->closeQuietly(Ljava/net/HttpURLConnection;)V
return-void
.end method
.method public getOutputStream()Ljava/io/OutputStream;
.registers 2
iget-object v0, p0, Lcom/h/r/URLConnectionNetwork;->mUrlConnection:Ljava/net/HttpURLConnection;
invoke-virtual {v0}, Ljava/net/HttpURLConnection;->getOutputStream()Ljava/io/OutputStream;
move-result-object v0
return-object v0
.end method
.method public getResponseCode()I
.registers 2
iget-object v0, p0, Lcom/h/r/URLConnectionNetwork;->mUrlConnection:Ljava/net/HttpURLConnection;
invoke-virtual {v0}, Ljava/net/HttpURLConnection;->getResponseCode()I
move-result v0
return v0
.end method
.method public getResponseHeaders()Ljava/util/Map;
.registers 2
.annotation system Ldalvik/annotation/Signature;
value = {
"()",
"Ljava/util/Map",
"<",
"Ljava/lang/String;",
"Ljava/util/List",
"<",
"Ljava/lang/String;",
">;>;"
}
.end annotation
iget-object v0, p0, Lcom/h/r/URLConnectionNetwork;->mUrlConnection:Ljava/net/HttpURLConnection;
invoke-virtual {v0}, Ljava/net/HttpURLConnection;->getHeaderFields()Ljava/util/Map;
move-result-object v0
return-object v0
.end method
.method public getServerStream(ILcom/h/r/Headers;)Ljava/io/InputStream;
.registers 5
invoke-virtual {p2}, Lcom/h/r/Headers;->getContentEncoding()Ljava/lang/String;
move-result-object v0
iget-object v1, p0, Lcom/h/r/URLConnectionNetwork;->mUrlConnection:Ljava/net/HttpURLConnection;
invoke-static {p1, v0, v1}, Lcom/h/r/URLConnectionNetworkExecutor;->getServerStream(ILjava/lang/String;Ljava/net/HttpURLConnection;)Ljava/io/InputStream;
move-result-object v0
return-object v0
.end method