12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085 |
- .class final Lokhttp3/Cache$Entry;
- .super Ljava/lang/Object;
- .source ""
- # annotations
- .annotation system Ldalvik/annotation/EnclosingClass;
- value = Lokhttp3/Cache;
- .end annotation
- .annotation system Ldalvik/annotation/InnerClass;
- accessFlags = 0x1a
- name = "Entry"
- .end annotation
- # static fields
- .field private static final RECEIVED_MILLIS:Ljava/lang/String;
- .field private static final SENT_MILLIS:Ljava/lang/String;
- # instance fields
- .field private final code:I
- .field private final handshake:Lokhttp3/Handshake;
- .field private final message:Ljava/lang/String;
- .field private final protocol:Lokhttp3/Protocol;
- .field private final receivedResponseMillis:J
- .field private final requestMethod:Ljava/lang/String;
- .field private final responseHeaders:Lokhttp3/Headers;
- .field private final sentRequestMillis:J
- .field private final url:Ljava/lang/String;
- .field private final varyHeaders:Lokhttp3/Headers;
- # direct methods
- .method static constructor <clinit>()V
- .locals 2
- new-instance v0, Ljava/lang/StringBuilder;
- invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
- invoke-static {}, Lokhttp3/internal/platform/Platform;->get()Lokhttp3/internal/platform/Platform;
- move-result-object v1
- invoke-virtual {v1}, Lokhttp3/internal/platform/Platform;->getPrefix()Ljava/lang/String;
- move-result-object v1
- invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
- const-string v1, "-Sent-Millis"
- invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
- invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
- move-result-object v0
- sput-object v0, Lokhttp3/Cache$Entry;->SENT_MILLIS:Ljava/lang/String;
- new-instance v0, Ljava/lang/StringBuilder;
- invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
- invoke-static {}, Lokhttp3/internal/platform/Platform;->get()Lokhttp3/internal/platform/Platform;
- move-result-object v1
- invoke-virtual {v1}, Lokhttp3/internal/platform/Platform;->getPrefix()Ljava/lang/String;
- move-result-object v1
- invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
- const-string v1, "-Received-Millis"
- invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
- invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
- move-result-object v0
- sput-object v0, Lokhttp3/Cache$Entry;->RECEIVED_MILLIS:Ljava/lang/String;
- return-void
- .end method
- .method constructor <init>(Lokhttp3/Response;)V
- .locals 2
- invoke-direct {p0}, Ljava/lang/Object;-><init>()V
- invoke-virtual {p1}, Lokhttp3/Response;->request()Lokhttp3/Request;
- move-result-object v0
- invoke-virtual {v0}, Lokhttp3/Request;->url()Lokhttp3/HttpUrl;
- move-result-object v0
- invoke-virtual {v0}, Lokhttp3/HttpUrl;->toString()Ljava/lang/String;
- move-result-object v0
- iput-object v0, p0, Lokhttp3/Cache$Entry;->url:Ljava/lang/String;
- invoke-static {p1}, Lokhttp3/internal/http/HttpHeaders;->varyHeaders(Lokhttp3/Response;)Lokhttp3/Headers;
- move-result-object v0
- iput-object v0, p0, Lokhttp3/Cache$Entry;->varyHeaders:Lokhttp3/Headers;
- invoke-virtual {p1}, Lokhttp3/Response;->request()Lokhttp3/Request;
- move-result-object v0
- invoke-virtual {v0}, Lokhttp3/Request;->method()Ljava/lang/String;
- move-result-object v0
- iput-object v0, p0, Lokhttp3/Cache$Entry;->requestMethod:Ljava/lang/String;
- invoke-virtual {p1}, Lokhttp3/Response;->protocol()Lokhttp3/Protocol;
- move-result-object v0
- iput-object v0, p0, Lokhttp3/Cache$Entry;->protocol:Lokhttp3/Protocol;
- invoke-virtual {p1}, Lokhttp3/Response;->code()I
- move-result v0
- iput v0, p0, Lokhttp3/Cache$Entry;->code:I
- invoke-virtual {p1}, Lokhttp3/Response;->message()Ljava/lang/String;
- move-result-object v0
- iput-object v0, p0, Lokhttp3/Cache$Entry;->message:Ljava/lang/String;
- invoke-virtual {p1}, Lokhttp3/Response;->headers()Lokhttp3/Headers;
- move-result-object v0
- iput-object v0, p0, Lokhttp3/Cache$Entry;->responseHeaders:Lokhttp3/Headers;
- invoke-virtual {p1}, Lokhttp3/Response;->handshake()Lokhttp3/Handshake;
- move-result-object v0
- iput-object v0, p0, Lokhttp3/Cache$Entry;->handshake:Lokhttp3/Handshake;
- invoke-virtual {p1}, Lokhttp3/Response;->sentRequestAtMillis()J
- move-result-wide v0
- iput-wide v0, p0, Lokhttp3/Cache$Entry;->sentRequestMillis:J
- invoke-virtual {p1}, Lokhttp3/Response;->receivedResponseAtMillis()J
- move-result-wide v0
- iput-wide v0, p0, Lokhttp3/Cache$Entry;->receivedResponseMillis:J
- return-void
- .end method
- .method constructor <init>(Lokio/Source;)V
- .locals 8
- .annotation system Ldalvik/annotation/Throws;
- value = {
- Ljava/io/IOException;
- }
- .end annotation
- invoke-direct {p0}, Ljava/lang/Object;-><init>()V
- :try_start_0
- invoke-static {p1}, Lokio/Okio;->buffer(Lokio/Source;)Lokio/BufferedSource;
- move-result-object v0
- invoke-interface {v0}, Lokio/BufferedSource;->readUtf8LineStrict()Ljava/lang/String;
- move-result-object v1
- iput-object v1, p0, Lokhttp3/Cache$Entry;->url:Ljava/lang/String;
- invoke-interface {v0}, Lokio/BufferedSource;->readUtf8LineStrict()Ljava/lang/String;
- move-result-object v1
- iput-object v1, p0, Lokhttp3/Cache$Entry;->requestMethod:Ljava/lang/String;
- new-instance v1, Lokhttp3/Headers$Builder;
- invoke-direct {v1}, Lokhttp3/Headers$Builder;-><init>()V
- invoke-static {v0}, Lokhttp3/Cache;->readInt(Lokio/BufferedSource;)I
- move-result v2
- const/4 v3, 0x0
- const/4 v4, 0x0
- :goto_0
- if-ge v4, v2, :cond_0
- invoke-interface {v0}, Lokio/BufferedSource;->readUtf8LineStrict()Ljava/lang/String;
- move-result-object v5
- invoke-virtual {v1, v5}, Lokhttp3/Headers$Builder;->addLenient(Ljava/lang/String;)Lokhttp3/Headers$Builder;
- add-int/lit8 v4, v4, 0x1
- goto :goto_0
- :cond_0
- invoke-virtual {v1}, Lokhttp3/Headers$Builder;->build()Lokhttp3/Headers;
- move-result-object v1
- iput-object v1, p0, Lokhttp3/Cache$Entry;->varyHeaders:Lokhttp3/Headers;
- invoke-interface {v0}, Lokio/BufferedSource;->readUtf8LineStrict()Ljava/lang/String;
- move-result-object v1
- invoke-static {v1}, Lokhttp3/internal/http/StatusLine;->parse(Ljava/lang/String;)Lokhttp3/internal/http/StatusLine;
- move-result-object v1
- iget-object v2, v1, Lokhttp3/internal/http/StatusLine;->protocol:Lokhttp3/Protocol;
- iput-object v2, p0, Lokhttp3/Cache$Entry;->protocol:Lokhttp3/Protocol;
- iget v2, v1, Lokhttp3/internal/http/StatusLine;->code:I
- iput v2, p0, Lokhttp3/Cache$Entry;->code:I
- iget-object v1, v1, Lokhttp3/internal/http/StatusLine;->message:Ljava/lang/String;
- iput-object v1, p0, Lokhttp3/Cache$Entry;->message:Ljava/lang/String;
- new-instance v1, Lokhttp3/Headers$Builder;
- invoke-direct {v1}, Lokhttp3/Headers$Builder;-><init>()V
- invoke-static {v0}, Lokhttp3/Cache;->readInt(Lokio/BufferedSource;)I
- move-result v2
- :goto_1
- if-ge v3, v2, :cond_1
- invoke-interface {v0}, Lokio/BufferedSource;->readUtf8LineStrict()Ljava/lang/String;
- move-result-object v4
- invoke-virtual {v1, v4}, Lokhttp3/Headers$Builder;->addLenient(Ljava/lang/String;)Lokhttp3/Headers$Builder;
- add-int/lit8 v3, v3, 0x1
- goto :goto_1
- :cond_1
- sget-object v2, Lokhttp3/Cache$Entry;->SENT_MILLIS:Ljava/lang/String;
- invoke-virtual {v1, v2}, Lokhttp3/Headers$Builder;->get(Ljava/lang/String;)Ljava/lang/String;
- move-result-object v2
- sget-object v3, Lokhttp3/Cache$Entry;->RECEIVED_MILLIS:Ljava/lang/String;
- invoke-virtual {v1, v3}, Lokhttp3/Headers$Builder;->get(Ljava/lang/String;)Ljava/lang/String;
- move-result-object v3
- sget-object v4, Lokhttp3/Cache$Entry;->SENT_MILLIS:Ljava/lang/String;
- invoke-virtual {v1, v4}, Lokhttp3/Headers$Builder;->removeAll(Ljava/lang/String;)Lokhttp3/Headers$Builder;
- sget-object v4, Lokhttp3/Cache$Entry;->RECEIVED_MILLIS:Ljava/lang/String;
- invoke-virtual {v1, v4}, Lokhttp3/Headers$Builder;->removeAll(Ljava/lang/String;)Lokhttp3/Headers$Builder;
- const-wide/16 v4, 0x0
- if-eqz v2, :cond_2
- invoke-static {v2}, Ljava/lang/Long;->parseLong(Ljava/lang/String;)J
- move-result-wide v6
- goto :goto_2
- :cond_2
- move-wide v6, v4
- :goto_2
- iput-wide v6, p0, Lokhttp3/Cache$Entry;->sentRequestMillis:J
- if-eqz v3, :cond_3
- invoke-static {v3}, Ljava/lang/Long;->parseLong(Ljava/lang/String;)J
- move-result-wide v4
- :cond_3
- iput-wide v4, p0, Lokhttp3/Cache$Entry;->receivedResponseMillis:J
- invoke-virtual {v1}, Lokhttp3/Headers$Builder;->build()Lokhttp3/Headers;
- move-result-object v1
- iput-object v1, p0, Lokhttp3/Cache$Entry;->responseHeaders:Lokhttp3/Headers;
- invoke-direct {p0}, Lokhttp3/Cache$Entry;->isHttps()Z
- move-result v1
- if-eqz v1, :cond_6
- invoke-interface {v0}, Lokio/BufferedSource;->readUtf8LineStrict()Ljava/lang/String;
- move-result-object v1
- invoke-virtual {v1}, Ljava/lang/String;->length()I
- move-result v2
- if-gtz v2, :cond_5
- invoke-interface {v0}, Lokio/BufferedSource;->readUtf8LineStrict()Ljava/lang/String;
- move-result-object v1
- invoke-static {v1}, Lokhttp3/CipherSuite;->forJavaName(Ljava/lang/String;)Lokhttp3/CipherSuite;
- move-result-object v1
- invoke-direct {p0, v0}, Lokhttp3/Cache$Entry;->readCertificateList(Lokio/BufferedSource;)Ljava/util/List;
- move-result-object v2
- invoke-direct {p0, v0}, Lokhttp3/Cache$Entry;->readCertificateList(Lokio/BufferedSource;)Ljava/util/List;
- move-result-object v3
- invoke-interface {v0}, Lokio/BufferedSource;->exhausted()Z
- move-result v4
- if-nez v4, :cond_4
- invoke-interface {v0}, Lokio/BufferedSource;->readUtf8LineStrict()Ljava/lang/String;
- move-result-object v0
- invoke-static {v0}, Lokhttp3/TlsVersion;->forJavaName(Ljava/lang/String;)Lokhttp3/TlsVersion;
- move-result-object v0
- goto :goto_3
- :cond_4
- sget-object v0, Lokhttp3/TlsVersion;->SSL_3_0:Lokhttp3/TlsVersion;
- :goto_3
- invoke-static {v0, v1, v2, v3}, Lokhttp3/Handshake;->get(Lokhttp3/TlsVersion;Lokhttp3/CipherSuite;Ljava/util/List;Ljava/util/List;)Lokhttp3/Handshake;
- move-result-object v0
- iput-object v0, p0, Lokhttp3/Cache$Entry;->handshake:Lokhttp3/Handshake;
- goto :goto_4
- :cond_5
- new-instance v0, Ljava/io/IOException;
- new-instance v2, Ljava/lang/StringBuilder;
- invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V
- const-string v3, "expected \"\" but was \""
- invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
- invoke-virtual {v2, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
- const-string v1, "\""
- invoke-virtual {v2, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
- invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
- move-result-object v1
- invoke-direct {v0, v1}, Ljava/io/IOException;-><init>(Ljava/lang/String;)V
- throw v0
- :cond_6
- const/4 v0, 0x0
- iput-object v0, p0, Lokhttp3/Cache$Entry;->handshake:Lokhttp3/Handshake;
- :try_end_0
- .catchall {:try_start_0 .. :try_end_0} :catchall_0
- :goto_4
- invoke-interface {p1}, Lokio/Source;->close()V
- return-void
- :catchall_0
- move-exception v0
- invoke-interface {p1}, Lokio/Source;->close()V
- goto :goto_6
- :goto_5
- throw v0
- :goto_6
- goto :goto_5
- .end method
- .method private isHttps()Z
- .locals 2
- iget-object v0, p0, Lokhttp3/Cache$Entry;->url:Ljava/lang/String;
- const-string v1, "https://"
- invoke-virtual {v0, v1}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z
- move-result v0
- return v0
- .end method
- .method private readCertificateList(Lokio/BufferedSource;)Ljava/util/List;
- .locals 6
- .annotation system Ldalvik/annotation/Signature;
- value = {
- "(",
- "Lokio/BufferedSource;",
- ")",
- "Ljava/util/List<",
- "Ljava/security/cert/Certificate;",
- ">;"
- }
- .end annotation
- .annotation system Ldalvik/annotation/Throws;
- value = {
- Ljava/io/IOException;
- }
- .end annotation
- invoke-static {p1}, Lokhttp3/Cache;->readInt(Lokio/BufferedSource;)I
- move-result v0
- const/4 v1, -0x1
- if-ne v0, v1, :cond_0
- invoke-static {}, Ljava/util/Collections;->emptyList()Ljava/util/List;
- move-result-object p1
- return-object p1
- :cond_0
- :try_start_0
- const-string v1, "X.509"
- invoke-static {v1}, Ljava/security/cert/CertificateFactory;->getInstance(Ljava/lang/String;)Ljava/security/cert/CertificateFactory;
- move-result-object v1
- new-instance v2, Ljava/util/ArrayList;
- invoke-direct {v2, v0}, Ljava/util/ArrayList;-><init>(I)V
- const/4 v3, 0x0
- :goto_0
- if-ge v3, v0, :cond_1
- invoke-interface {p1}, Lokio/BufferedSource;->readUtf8LineStrict()Ljava/lang/String;
- move-result-object v4
- new-instance v5, Lokio/Buffer;
- invoke-direct {v5}, Lokio/Buffer;-><init>()V
- invoke-static {v4}, Lokio/ByteString;->decodeBase64(Ljava/lang/String;)Lokio/ByteString;
- move-result-object v4
- invoke-virtual {v5, v4}, Lokio/Buffer;->write(Lokio/ByteString;)Lokio/Buffer;
- invoke-virtual {v5}, Lokio/Buffer;->inputStream()Ljava/io/InputStream;
- move-result-object v4
- invoke-virtual {v1, v4}, Ljava/security/cert/CertificateFactory;->generateCertificate(Ljava/io/InputStream;)Ljava/security/cert/Certificate;
- move-result-object v4
- invoke-interface {v2, v4}, Ljava/util/List;->add(Ljava/lang/Object;)Z
- :try_end_0
- .catch Ljava/security/cert/CertificateException; {:try_start_0 .. :try_end_0} :catch_0
- add-int/lit8 v3, v3, 0x1
- goto :goto_0
- :cond_1
- return-object v2
- :catch_0
- move-exception p1
- new-instance v0, Ljava/io/IOException;
- invoke-virtual {p1}, Ljava/security/cert/CertificateException;->getMessage()Ljava/lang/String;
- move-result-object p1
- invoke-direct {v0, p1}, Ljava/io/IOException;-><init>(Ljava/lang/String;)V
- goto :goto_2
- :goto_1
- throw v0
- :goto_2
- goto :goto_1
- .end method
- .method private writeCertList(Lokio/BufferedSink;Ljava/util/List;)V
- .locals 4
- .annotation system Ldalvik/annotation/Signature;
- value = {
- "(",
- "Lokio/BufferedSink;",
- "Ljava/util/List<",
- "Ljava/security/cert/Certificate;",
- ">;)V"
- }
- .end annotation
- .annotation system Ldalvik/annotation/Throws;
- value = {
- Ljava/io/IOException;
- }
- .end annotation
- :try_start_0
- invoke-interface {p2}, Ljava/util/List;->size()I
- move-result v0
- int-to-long v0, v0
- invoke-interface {p1, v0, v1}, Lokio/BufferedSink;->writeDecimalLong(J)Lokio/BufferedSink;
- move-result-object v0
- const/16 v1, 0xa
- invoke-interface {v0, v1}, Lokio/BufferedSink;->writeByte(I)Lokio/BufferedSink;
- const/4 v0, 0x0
- invoke-interface {p2}, Ljava/util/List;->size()I
- move-result v2
- :goto_0
- if-ge v0, v2, :cond_0
- invoke-interface {p2, v0}, Ljava/util/List;->get(I)Ljava/lang/Object;
- move-result-object v3
- check-cast v3, Ljava/security/cert/Certificate;
- invoke-virtual {v3}, Ljava/security/cert/Certificate;->getEncoded()[B
- move-result-object v3
- invoke-static {v3}, Lokio/ByteString;->of([B)Lokio/ByteString;
- move-result-object v3
- invoke-virtual {v3}, Lokio/ByteString;->base64()Ljava/lang/String;
- move-result-object v3
- invoke-interface {p1, v3}, Lokio/BufferedSink;->writeUtf8(Ljava/lang/String;)Lokio/BufferedSink;
- move-result-object v3
- invoke-interface {v3, v1}, Lokio/BufferedSink;->writeByte(I)Lokio/BufferedSink;
- :try_end_0
- .catch Ljava/security/cert/CertificateEncodingException; {:try_start_0 .. :try_end_0} :catch_0
- add-int/lit8 v0, v0, 0x1
- goto :goto_0
- :cond_0
- return-void
- :catch_0
- move-exception p1
- new-instance p2, Ljava/io/IOException;
- invoke-virtual {p1}, Ljava/security/cert/CertificateEncodingException;->getMessage()Ljava/lang/String;
- move-result-object p1
- invoke-direct {p2, p1}, Ljava/io/IOException;-><init>(Ljava/lang/String;)V
- goto :goto_2
- :goto_1
- throw p2
- :goto_2
- goto :goto_1
- .end method
- # virtual methods
- .method public matches(Lokhttp3/Request;Lokhttp3/Response;)Z
- .locals 2
- iget-object v0, p0, Lokhttp3/Cache$Entry;->url:Ljava/lang/String;
- invoke-virtual {p1}, Lokhttp3/Request;->url()Lokhttp3/HttpUrl;
- move-result-object v1
- invoke-virtual {v1}, Lokhttp3/HttpUrl;->toString()Ljava/lang/String;
- move-result-object v1
- invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
- move-result v0
- if-eqz v0, :cond_0
- iget-object v0, p0, Lokhttp3/Cache$Entry;->requestMethod:Ljava/lang/String;
- invoke-virtual {p1}, Lokhttp3/Request;->method()Ljava/lang/String;
- move-result-object v1
- invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
- move-result v0
- if-eqz v0, :cond_0
- iget-object v0, p0, Lokhttp3/Cache$Entry;->varyHeaders:Lokhttp3/Headers;
- invoke-static {p2, v0, p1}, Lokhttp3/internal/http/HttpHeaders;->varyMatches(Lokhttp3/Response;Lokhttp3/Headers;Lokhttp3/Request;)Z
- move-result p1
- if-eqz p1, :cond_0
- const/4 p1, 0x1
- goto :goto_0
- :cond_0
- const/4 p1, 0x0
- :goto_0
- return p1
- .end method
- .method public response(Lokhttp3/internal/cache/DiskLruCache$Snapshot;)Lokhttp3/Response;
- .locals 5
- iget-object v0, p0, Lokhttp3/Cache$Entry;->responseHeaders:Lokhttp3/Headers;
- const-string v1, "Content-Type"
- invoke-virtual {v0, v1}, Lokhttp3/Headers;->get(Ljava/lang/String;)Ljava/lang/String;
- move-result-object v0
- iget-object v1, p0, Lokhttp3/Cache$Entry;->responseHeaders:Lokhttp3/Headers;
- const-string v2, "Content-Length"
- invoke-virtual {v1, v2}, Lokhttp3/Headers;->get(Ljava/lang/String;)Ljava/lang/String;
- move-result-object v1
- new-instance v2, Lokhttp3/Request$Builder;
- invoke-direct {v2}, Lokhttp3/Request$Builder;-><init>()V
- iget-object v3, p0, Lokhttp3/Cache$Entry;->url:Ljava/lang/String;
- invoke-virtual {v2, v3}, Lokhttp3/Request$Builder;->url(Ljava/lang/String;)Lokhttp3/Request$Builder;
- move-result-object v2
- iget-object v3, p0, Lokhttp3/Cache$Entry;->requestMethod:Ljava/lang/String;
- const/4 v4, 0x0
- invoke-virtual {v2, v3, v4}, Lokhttp3/Request$Builder;->method(Ljava/lang/String;Lokhttp3/RequestBody;)Lokhttp3/Request$Builder;
- move-result-object v2
- iget-object v3, p0, Lokhttp3/Cache$Entry;->varyHeaders:Lokhttp3/Headers;
- invoke-virtual {v2, v3}, Lokhttp3/Request$Builder;->headers(Lokhttp3/Headers;)Lokhttp3/Request$Builder;
- move-result-object v2
- invoke-virtual {v2}, Lokhttp3/Request$Builder;->build()Lokhttp3/Request;
- move-result-object v2
- new-instance v3, Lokhttp3/Response$Builder;
- invoke-direct {v3}, Lokhttp3/Response$Builder;-><init>()V
- invoke-virtual {v3, v2}, Lokhttp3/Response$Builder;->request(Lokhttp3/Request;)Lokhttp3/Response$Builder;
- move-result-object v2
- iget-object v3, p0, Lokhttp3/Cache$Entry;->protocol:Lokhttp3/Protocol;
- invoke-virtual {v2, v3}, Lokhttp3/Response$Builder;->protocol(Lokhttp3/Protocol;)Lokhttp3/Response$Builder;
- move-result-object v2
- iget v3, p0, Lokhttp3/Cache$Entry;->code:I
- invoke-virtual {v2, v3}, Lokhttp3/Response$Builder;->code(I)Lokhttp3/Response$Builder;
- move-result-object v2
- iget-object v3, p0, Lokhttp3/Cache$Entry;->message:Ljava/lang/String;
- invoke-virtual {v2, v3}, Lokhttp3/Response$Builder;->message(Ljava/lang/String;)Lokhttp3/Response$Builder;
- move-result-object v2
- iget-object v3, p0, Lokhttp3/Cache$Entry;->responseHeaders:Lokhttp3/Headers;
- invoke-virtual {v2, v3}, Lokhttp3/Response$Builder;->headers(Lokhttp3/Headers;)Lokhttp3/Response$Builder;
- move-result-object v2
- new-instance v3, Lokhttp3/Cache$CacheResponseBody;
- invoke-direct {v3, p1, v0, v1}, Lokhttp3/Cache$CacheResponseBody;-><init>(Lokhttp3/internal/cache/DiskLruCache$Snapshot;Ljava/lang/String;Ljava/lang/String;)V
- invoke-virtual {v2, v3}, Lokhttp3/Response$Builder;->body(Lokhttp3/ResponseBody;)Lokhttp3/Response$Builder;
- move-result-object p1
- iget-object v0, p0, Lokhttp3/Cache$Entry;->handshake:Lokhttp3/Handshake;
- invoke-virtual {p1, v0}, Lokhttp3/Response$Builder;->handshake(Lokhttp3/Handshake;)Lokhttp3/Response$Builder;
- move-result-object p1
- iget-wide v0, p0, Lokhttp3/Cache$Entry;->sentRequestMillis:J
- invoke-virtual {p1, v0, v1}, Lokhttp3/Response$Builder;->sentRequestAtMillis(J)Lokhttp3/Response$Builder;
- move-result-object p1
- iget-wide v0, p0, Lokhttp3/Cache$Entry;->receivedResponseMillis:J
- invoke-virtual {p1, v0, v1}, Lokhttp3/Response$Builder;->receivedResponseAtMillis(J)Lokhttp3/Response$Builder;
- move-result-object p1
- invoke-virtual {p1}, Lokhttp3/Response$Builder;->build()Lokhttp3/Response;
- move-result-object p1
- return-object p1
- .end method
- .method public writeTo(Lokhttp3/internal/cache/DiskLruCache$Editor;)V
- .locals 7
- .annotation system Ldalvik/annotation/Throws;
- value = {
- Ljava/io/IOException;
- }
- .end annotation
- const/4 v0, 0x0
- invoke-virtual {p1, v0}, Lokhttp3/internal/cache/DiskLruCache$Editor;->newSink(I)Lokio/Sink;
- move-result-object p1
- invoke-static {p1}, Lokio/Okio;->buffer(Lokio/Sink;)Lokio/BufferedSink;
- move-result-object p1
- iget-object v1, p0, Lokhttp3/Cache$Entry;->url:Ljava/lang/String;
- invoke-interface {p1, v1}, Lokio/BufferedSink;->writeUtf8(Ljava/lang/String;)Lokio/BufferedSink;
- move-result-object v1
- const/16 v2, 0xa
- invoke-interface {v1, v2}, Lokio/BufferedSink;->writeByte(I)Lokio/BufferedSink;
- iget-object v1, p0, Lokhttp3/Cache$Entry;->requestMethod:Ljava/lang/String;
- invoke-interface {p1, v1}, Lokio/BufferedSink;->writeUtf8(Ljava/lang/String;)Lokio/BufferedSink;
- move-result-object v1
- invoke-interface {v1, v2}, Lokio/BufferedSink;->writeByte(I)Lokio/BufferedSink;
- iget-object v1, p0, Lokhttp3/Cache$Entry;->varyHeaders:Lokhttp3/Headers;
- invoke-virtual {v1}, Lokhttp3/Headers;->size()I
- move-result v1
- int-to-long v3, v1
- invoke-interface {p1, v3, v4}, Lokio/BufferedSink;->writeDecimalLong(J)Lokio/BufferedSink;
- move-result-object v1
- invoke-interface {v1, v2}, Lokio/BufferedSink;->writeByte(I)Lokio/BufferedSink;
- iget-object v1, p0, Lokhttp3/Cache$Entry;->varyHeaders:Lokhttp3/Headers;
- invoke-virtual {v1}, Lokhttp3/Headers;->size()I
- move-result v1
- const/4 v3, 0x0
- :goto_0
- const-string v4, ": "
- if-ge v3, v1, :cond_0
- iget-object v5, p0, Lokhttp3/Cache$Entry;->varyHeaders:Lokhttp3/Headers;
- invoke-virtual {v5, v3}, Lokhttp3/Headers;->name(I)Ljava/lang/String;
- move-result-object v5
- invoke-interface {p1, v5}, Lokio/BufferedSink;->writeUtf8(Ljava/lang/String;)Lokio/BufferedSink;
- move-result-object v5
- invoke-interface {v5, v4}, Lokio/BufferedSink;->writeUtf8(Ljava/lang/String;)Lokio/BufferedSink;
- move-result-object v4
- iget-object v5, p0, Lokhttp3/Cache$Entry;->varyHeaders:Lokhttp3/Headers;
- invoke-virtual {v5, v3}, Lokhttp3/Headers;->value(I)Ljava/lang/String;
- move-result-object v5
- invoke-interface {v4, v5}, Lokio/BufferedSink;->writeUtf8(Ljava/lang/String;)Lokio/BufferedSink;
- move-result-object v4
- invoke-interface {v4, v2}, Lokio/BufferedSink;->writeByte(I)Lokio/BufferedSink;
- add-int/lit8 v3, v3, 0x1
- goto :goto_0
- :cond_0
- new-instance v1, Lokhttp3/internal/http/StatusLine;
- iget-object v3, p0, Lokhttp3/Cache$Entry;->protocol:Lokhttp3/Protocol;
- iget v5, p0, Lokhttp3/Cache$Entry;->code:I
- iget-object v6, p0, Lokhttp3/Cache$Entry;->message:Ljava/lang/String;
- invoke-direct {v1, v3, v5, v6}, Lokhttp3/internal/http/StatusLine;-><init>(Lokhttp3/Protocol;ILjava/lang/String;)V
- invoke-virtual {v1}, Lokhttp3/internal/http/StatusLine;->toString()Ljava/lang/String;
- move-result-object v1
- invoke-interface {p1, v1}, Lokio/BufferedSink;->writeUtf8(Ljava/lang/String;)Lokio/BufferedSink;
- move-result-object v1
- invoke-interface {v1, v2}, Lokio/BufferedSink;->writeByte(I)Lokio/BufferedSink;
- iget-object v1, p0, Lokhttp3/Cache$Entry;->responseHeaders:Lokhttp3/Headers;
- invoke-virtual {v1}, Lokhttp3/Headers;->size()I
- move-result v1
- add-int/lit8 v1, v1, 0x2
- int-to-long v5, v1
- invoke-interface {p1, v5, v6}, Lokio/BufferedSink;->writeDecimalLong(J)Lokio/BufferedSink;
- move-result-object v1
- invoke-interface {v1, v2}, Lokio/BufferedSink;->writeByte(I)Lokio/BufferedSink;
- iget-object v1, p0, Lokhttp3/Cache$Entry;->responseHeaders:Lokhttp3/Headers;
- invoke-virtual {v1}, Lokhttp3/Headers;->size()I
- move-result v1
- :goto_1
- if-ge v0, v1, :cond_1
- iget-object v3, p0, Lokhttp3/Cache$Entry;->responseHeaders:Lokhttp3/Headers;
- invoke-virtual {v3, v0}, Lokhttp3/Headers;->name(I)Ljava/lang/String;
- move-result-object v3
- invoke-interface {p1, v3}, Lokio/BufferedSink;->writeUtf8(Ljava/lang/String;)Lokio/BufferedSink;
- move-result-object v3
- invoke-interface {v3, v4}, Lokio/BufferedSink;->writeUtf8(Ljava/lang/String;)Lokio/BufferedSink;
- move-result-object v3
- iget-object v5, p0, Lokhttp3/Cache$Entry;->responseHeaders:Lokhttp3/Headers;
- invoke-virtual {v5, v0}, Lokhttp3/Headers;->value(I)Ljava/lang/String;
- move-result-object v5
- invoke-interface {v3, v5}, Lokio/BufferedSink;->writeUtf8(Ljava/lang/String;)Lokio/BufferedSink;
- move-result-object v3
- invoke-interface {v3, v2}, Lokio/BufferedSink;->writeByte(I)Lokio/BufferedSink;
- add-int/lit8 v0, v0, 0x1
- goto :goto_1
- :cond_1
- sget-object v0, Lokhttp3/Cache$Entry;->SENT_MILLIS:Ljava/lang/String;
- invoke-interface {p1, v0}, Lokio/BufferedSink;->writeUtf8(Ljava/lang/String;)Lokio/BufferedSink;
- move-result-object v0
- invoke-interface {v0, v4}, Lokio/BufferedSink;->writeUtf8(Ljava/lang/String;)Lokio/BufferedSink;
- move-result-object v0
- iget-wide v5, p0, Lokhttp3/Cache$Entry;->sentRequestMillis:J
- invoke-interface {v0, v5, v6}, Lokio/BufferedSink;->writeDecimalLong(J)Lokio/BufferedSink;
- move-result-object v0
- invoke-interface {v0, v2}, Lokio/BufferedSink;->writeByte(I)Lokio/BufferedSink;
- sget-object v0, Lokhttp3/Cache$Entry;->RECEIVED_MILLIS:Ljava/lang/String;
- invoke-interface {p1, v0}, Lokio/BufferedSink;->writeUtf8(Ljava/lang/String;)Lokio/BufferedSink;
- move-result-object v0
- invoke-interface {v0, v4}, Lokio/BufferedSink;->writeUtf8(Ljava/lang/String;)Lokio/BufferedSink;
- move-result-object v0
- iget-wide v3, p0, Lokhttp3/Cache$Entry;->receivedResponseMillis:J
- invoke-interface {v0, v3, v4}, Lokio/BufferedSink;->writeDecimalLong(J)Lokio/BufferedSink;
- move-result-object v0
- invoke-interface {v0, v2}, Lokio/BufferedSink;->writeByte(I)Lokio/BufferedSink;
- invoke-direct {p0}, Lokhttp3/Cache$Entry;->isHttps()Z
- move-result v0
- if-eqz v0, :cond_2
- invoke-interface {p1, v2}, Lokio/BufferedSink;->writeByte(I)Lokio/BufferedSink;
- iget-object v0, p0, Lokhttp3/Cache$Entry;->handshake:Lokhttp3/Handshake;
- invoke-virtual {v0}, Lokhttp3/Handshake;->cipherSuite()Lokhttp3/CipherSuite;
- move-result-object v0
- invoke-virtual {v0}, Lokhttp3/CipherSuite;->javaName()Ljava/lang/String;
- move-result-object v0
- invoke-interface {p1, v0}, Lokio/BufferedSink;->writeUtf8(Ljava/lang/String;)Lokio/BufferedSink;
- move-result-object v0
- invoke-interface {v0, v2}, Lokio/BufferedSink;->writeByte(I)Lokio/BufferedSink;
- iget-object v0, p0, Lokhttp3/Cache$Entry;->handshake:Lokhttp3/Handshake;
- invoke-virtual {v0}, Lokhttp3/Handshake;->peerCertificates()Ljava/util/List;
- move-result-object v0
- invoke-direct {p0, p1, v0}, Lokhttp3/Cache$Entry;->writeCertList(Lokio/BufferedSink;Ljava/util/List;)V
- iget-object v0, p0, Lokhttp3/Cache$Entry;->handshake:Lokhttp3/Handshake;
- invoke-virtual {v0}, Lokhttp3/Handshake;->localCertificates()Ljava/util/List;
- move-result-object v0
- invoke-direct {p0, p1, v0}, Lokhttp3/Cache$Entry;->writeCertList(Lokio/BufferedSink;Ljava/util/List;)V
- iget-object v0, p0, Lokhttp3/Cache$Entry;->handshake:Lokhttp3/Handshake;
- invoke-virtual {v0}, Lokhttp3/Handshake;->tlsVersion()Lokhttp3/TlsVersion;
- move-result-object v0
- invoke-virtual {v0}, Lokhttp3/TlsVersion;->javaName()Ljava/lang/String;
- move-result-object v0
- invoke-interface {p1, v0}, Lokio/BufferedSink;->writeUtf8(Ljava/lang/String;)Lokio/BufferedSink;
- move-result-object v0
- invoke-interface {v0, v2}, Lokio/BufferedSink;->writeByte(I)Lokio/BufferedSink;
- :cond_2
- invoke-interface {p1}, Lokio/Sink;->close()V
- return-void
- .end method
|