123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530 |
- .class public final Lokhttp3/Response;
- .super Ljava/lang/Object;
- .source ""
- # interfaces
- .implements Ljava/io/Closeable;
- # annotations
- .annotation system Ldalvik/annotation/MemberClasses;
- value = {
- Lokhttp3/Response$Builder;
- }
- .end annotation
- # instance fields
- .field final body:Lokhttp3/ResponseBody;
- .field private volatile cacheControl:Lokhttp3/CacheControl;
- .field final cacheResponse:Lokhttp3/Response;
- .field final code:I
- .field final handshake:Lokhttp3/Handshake;
- .field final headers:Lokhttp3/Headers;
- .field final message:Ljava/lang/String;
- .field final networkResponse:Lokhttp3/Response;
- .field final priorResponse:Lokhttp3/Response;
- .field final protocol:Lokhttp3/Protocol;
- .field final receivedResponseAtMillis:J
- .field final request:Lokhttp3/Request;
- .field final sentRequestAtMillis:J
- # direct methods
- .method constructor <init>(Lokhttp3/Response$Builder;)V
- .locals 2
- invoke-direct {p0}, Ljava/lang/Object;-><init>()V
- iget-object v0, p1, Lokhttp3/Response$Builder;->request:Lokhttp3/Request;
- iput-object v0, p0, Lokhttp3/Response;->request:Lokhttp3/Request;
- iget-object v0, p1, Lokhttp3/Response$Builder;->protocol:Lokhttp3/Protocol;
- iput-object v0, p0, Lokhttp3/Response;->protocol:Lokhttp3/Protocol;
- iget v0, p1, Lokhttp3/Response$Builder;->code:I
- iput v0, p0, Lokhttp3/Response;->code:I
- iget-object v0, p1, Lokhttp3/Response$Builder;->message:Ljava/lang/String;
- iput-object v0, p0, Lokhttp3/Response;->message:Ljava/lang/String;
- iget-object v0, p1, Lokhttp3/Response$Builder;->handshake:Lokhttp3/Handshake;
- iput-object v0, p0, Lokhttp3/Response;->handshake:Lokhttp3/Handshake;
- iget-object v0, p1, Lokhttp3/Response$Builder;->headers:Lokhttp3/Headers$Builder;
- invoke-virtual {v0}, Lokhttp3/Headers$Builder;->build()Lokhttp3/Headers;
- move-result-object v0
- iput-object v0, p0, Lokhttp3/Response;->headers:Lokhttp3/Headers;
- iget-object v0, p1, Lokhttp3/Response$Builder;->body:Lokhttp3/ResponseBody;
- iput-object v0, p0, Lokhttp3/Response;->body:Lokhttp3/ResponseBody;
- iget-object v0, p1, Lokhttp3/Response$Builder;->networkResponse:Lokhttp3/Response;
- iput-object v0, p0, Lokhttp3/Response;->networkResponse:Lokhttp3/Response;
- iget-object v0, p1, Lokhttp3/Response$Builder;->cacheResponse:Lokhttp3/Response;
- iput-object v0, p0, Lokhttp3/Response;->cacheResponse:Lokhttp3/Response;
- iget-object v0, p1, Lokhttp3/Response$Builder;->priorResponse:Lokhttp3/Response;
- iput-object v0, p0, Lokhttp3/Response;->priorResponse:Lokhttp3/Response;
- iget-wide v0, p1, Lokhttp3/Response$Builder;->sentRequestAtMillis:J
- iput-wide v0, p0, Lokhttp3/Response;->sentRequestAtMillis:J
- iget-wide v0, p1, Lokhttp3/Response$Builder;->receivedResponseAtMillis:J
- iput-wide v0, p0, Lokhttp3/Response;->receivedResponseAtMillis:J
- return-void
- .end method
- # virtual methods
- .method public body()Lokhttp3/ResponseBody;
- .locals 1
- iget-object v0, p0, Lokhttp3/Response;->body:Lokhttp3/ResponseBody;
- return-object v0
- .end method
- .method public cacheControl()Lokhttp3/CacheControl;
- .locals 1
- iget-object v0, p0, Lokhttp3/Response;->cacheControl:Lokhttp3/CacheControl;
- if-eqz v0, :cond_0
- goto :goto_0
- :cond_0
- iget-object v0, p0, Lokhttp3/Response;->headers:Lokhttp3/Headers;
- invoke-static {v0}, Lokhttp3/CacheControl;->parse(Lokhttp3/Headers;)Lokhttp3/CacheControl;
- move-result-object v0
- iput-object v0, p0, Lokhttp3/Response;->cacheControl:Lokhttp3/CacheControl;
- :goto_0
- return-object v0
- .end method
- .method public cacheResponse()Lokhttp3/Response;
- .locals 1
- iget-object v0, p0, Lokhttp3/Response;->cacheResponse:Lokhttp3/Response;
- return-object v0
- .end method
- .method public challenges()Ljava/util/List;
- .locals 2
- .annotation system Ldalvik/annotation/Signature;
- value = {
- "()",
- "Ljava/util/List<",
- "Lokhttp3/Challenge;",
- ">;"
- }
- .end annotation
- iget v0, p0, Lokhttp3/Response;->code:I
- const/16 v1, 0x191
- if-ne v0, v1, :cond_0
- const-string v0, "WWW-Authenticate"
- goto :goto_0
- :cond_0
- const/16 v1, 0x197
- if-ne v0, v1, :cond_1
- const-string v0, "Proxy-Authenticate"
- :goto_0
- invoke-virtual {p0}, Lokhttp3/Response;->headers()Lokhttp3/Headers;
- move-result-object v1
- invoke-static {v1, v0}, Lokhttp3/internal/http/HttpHeaders;->parseChallenges(Lokhttp3/Headers;Ljava/lang/String;)Ljava/util/List;
- move-result-object v0
- return-object v0
- :cond_1
- invoke-static {}, Ljava/util/Collections;->emptyList()Ljava/util/List;
- move-result-object v0
- return-object v0
- .end method
- .method public close()V
- .locals 2
- iget-object v0, p0, Lokhttp3/Response;->body:Lokhttp3/ResponseBody;
- if-eqz v0, :cond_0
- invoke-virtual {v0}, Lokhttp3/ResponseBody;->close()V
- return-void
- :cond_0
- new-instance v0, Ljava/lang/IllegalStateException;
- const-string v1, "response is not eligible for a body and must not be closed"
- invoke-direct {v0, v1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
- throw v0
- .end method
- .method public code()I
- .locals 1
- iget v0, p0, Lokhttp3/Response;->code:I
- return v0
- .end method
- .method public handshake()Lokhttp3/Handshake;
- .locals 1
- iget-object v0, p0, Lokhttp3/Response;->handshake:Lokhttp3/Handshake;
- return-object v0
- .end method
- .method public header(Ljava/lang/String;)Ljava/lang/String;
- .locals 1
- const/4 v0, 0x0
- invoke-virtual {p0, p1, v0}, Lokhttp3/Response;->header(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
- move-result-object p1
- return-object p1
- .end method
- .method public header(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
- .locals 1
- iget-object v0, p0, Lokhttp3/Response;->headers:Lokhttp3/Headers;
- invoke-virtual {v0, p1}, Lokhttp3/Headers;->get(Ljava/lang/String;)Ljava/lang/String;
- move-result-object p1
- if-eqz p1, :cond_0
- goto :goto_0
- :cond_0
- move-object p1, p2
- :goto_0
- return-object p1
- .end method
- .method public headers(Ljava/lang/String;)Ljava/util/List;
- .locals 1
- .annotation system Ldalvik/annotation/Signature;
- value = {
- "(",
- "Ljava/lang/String;",
- ")",
- "Ljava/util/List<",
- "Ljava/lang/String;",
- ">;"
- }
- .end annotation
- iget-object v0, p0, Lokhttp3/Response;->headers:Lokhttp3/Headers;
- invoke-virtual {v0, p1}, Lokhttp3/Headers;->values(Ljava/lang/String;)Ljava/util/List;
- move-result-object p1
- return-object p1
- .end method
- .method public headers()Lokhttp3/Headers;
- .locals 1
- iget-object v0, p0, Lokhttp3/Response;->headers:Lokhttp3/Headers;
- return-object v0
- .end method
- .method public isRedirect()Z
- .locals 2
- iget v0, p0, Lokhttp3/Response;->code:I
- const/16 v1, 0x133
- if-eq v0, v1, :cond_0
- const/16 v1, 0x134
- if-eq v0, v1, :cond_0
- packed-switch v0, :pswitch_data_0
- const/4 v0, 0x0
- return v0
- :cond_0
- :pswitch_0
- const/4 v0, 0x1
- return v0
- nop
- :pswitch_data_0
- .packed-switch 0x12c
- :pswitch_0
- :pswitch_0
- :pswitch_0
- :pswitch_0
- .end packed-switch
- .end method
- .method public isSuccessful()Z
- .locals 2
- iget v0, p0, Lokhttp3/Response;->code:I
- const/16 v1, 0xc8
- if-lt v0, v1, :cond_0
- const/16 v1, 0x12c
- if-ge v0, v1, :cond_0
- const/4 v0, 0x1
- goto :goto_0
- :cond_0
- const/4 v0, 0x0
- :goto_0
- return v0
- .end method
- .method public message()Ljava/lang/String;
- .locals 1
- iget-object v0, p0, Lokhttp3/Response;->message:Ljava/lang/String;
- return-object v0
- .end method
- .method public networkResponse()Lokhttp3/Response;
- .locals 1
- iget-object v0, p0, Lokhttp3/Response;->networkResponse:Lokhttp3/Response;
- return-object v0
- .end method
- .method public newBuilder()Lokhttp3/Response$Builder;
- .locals 1
- new-instance v0, Lokhttp3/Response$Builder;
- invoke-direct {v0, p0}, Lokhttp3/Response$Builder;-><init>(Lokhttp3/Response;)V
- return-object v0
- .end method
- .method public peekBody(J)Lokhttp3/ResponseBody;
- .locals 4
- .annotation system Ldalvik/annotation/Throws;
- value = {
- Ljava/io/IOException;
- }
- .end annotation
- iget-object v0, p0, Lokhttp3/Response;->body:Lokhttp3/ResponseBody;
- invoke-virtual {v0}, Lokhttp3/ResponseBody;->source()Lokio/BufferedSource;
- move-result-object v0
- invoke-interface {v0, p1, p2}, Lokio/BufferedSource;->request(J)Z
- invoke-interface {v0}, Lokio/BufferedSource;->buffer()Lokio/Buffer;
- move-result-object v0
- invoke-virtual {v0}, Lokio/Buffer;->clone()Lokio/Buffer;
- move-result-object v0
- invoke-virtual {v0}, Lokio/Buffer;->size()J
- move-result-wide v1
- cmp-long v3, v1, p1
- if-lez v3, :cond_0
- new-instance v1, Lokio/Buffer;
- invoke-direct {v1}, Lokio/Buffer;-><init>()V
- invoke-virtual {v1, v0, p1, p2}, Lokio/Buffer;->write(Lokio/Buffer;J)V
- invoke-virtual {v0}, Lokio/Buffer;->clear()V
- move-object v0, v1
- :cond_0
- iget-object p1, p0, Lokhttp3/Response;->body:Lokhttp3/ResponseBody;
- invoke-virtual {p1}, Lokhttp3/ResponseBody;->contentType()Lokhttp3/MediaType;
- move-result-object p1
- invoke-virtual {v0}, Lokio/Buffer;->size()J
- move-result-wide v1
- invoke-static {p1, v1, v2, v0}, Lokhttp3/ResponseBody;->create(Lokhttp3/MediaType;JLokio/BufferedSource;)Lokhttp3/ResponseBody;
- move-result-object p1
- return-object p1
- .end method
- .method public priorResponse()Lokhttp3/Response;
- .locals 1
- iget-object v0, p0, Lokhttp3/Response;->priorResponse:Lokhttp3/Response;
- return-object v0
- .end method
- .method public protocol()Lokhttp3/Protocol;
- .locals 1
- iget-object v0, p0, Lokhttp3/Response;->protocol:Lokhttp3/Protocol;
- return-object v0
- .end method
- .method public receivedResponseAtMillis()J
- .locals 2
- iget-wide v0, p0, Lokhttp3/Response;->receivedResponseAtMillis:J
- return-wide v0
- .end method
- .method public request()Lokhttp3/Request;
- .locals 1
- iget-object v0, p0, Lokhttp3/Response;->request:Lokhttp3/Request;
- return-object v0
- .end method
- .method public sentRequestAtMillis()J
- .locals 2
- iget-wide v0, p0, Lokhttp3/Response;->sentRequestAtMillis:J
- return-wide v0
- .end method
- .method public toString()Ljava/lang/String;
- .locals 2
- new-instance v0, Ljava/lang/StringBuilder;
- invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
- const-string v1, "Response{protocol="
- invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
- iget-object v1, p0, Lokhttp3/Response;->protocol:Lokhttp3/Protocol;
- invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
- const-string v1, ", code="
- invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
- iget v1, p0, Lokhttp3/Response;->code:I
- invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
- const-string v1, ", message="
- invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
- iget-object v1, p0, Lokhttp3/Response;->message:Ljava/lang/String;
- invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
- const-string v1, ", url="
- invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
- iget-object v1, p0, Lokhttp3/Response;->request:Lokhttp3/Request;
- invoke-virtual {v1}, Lokhttp3/Request;->url()Lokhttp3/HttpUrl;
- move-result-object v1
- invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
- const/16 v1, 0x7d
- invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;
- invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
- move-result-object v0
- return-object v0
- .end method
|