.class public final Lokhttp3/Cache$Companion; .super Ljava/lang/Object; .source "Cache.kt" # annotations .annotation system Ldalvik/annotation/EnclosingClass; value = Lokhttp3/Cache; .end annotation .annotation system Ldalvik/annotation/InnerClass; accessFlags = 0x19 name = "Companion" .end annotation .annotation system Ldalvik/annotation/SourceDebugExtension; value = "SMAP\nCache.kt\nKotlin\n*S Kotlin\n*F\n+ 1 Cache.kt\nokhttp3/Cache$Companion\n+ 2 _Collections.kt\nkotlin/collections/CollectionsKt___CollectionsKt\n*L\n1#1,783:1\n2418#2,3:784\n*E\n*S KotlinDebug\n*F\n+ 1 Cache.kt\nokhttp3/Cache$Companion\n*L\n724#1,3:784\n*E\n" .end annotation .annotation runtime Lkotlin/Metadata; bv = { 0x1, 0x0, 0x3 } d1 = { "\u0000N\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\u0008\u0002\n\u0002\u0010\u0008\n\u0002\u0008\u0004\n\u0002\u0010\u000e\n\u0000\n\u0002\u0018\u0002\n\u0002\u0008\u0002\n\u0002\u0018\u0002\n\u0002\u0008\u0002\n\u0002\u0018\u0002\n\u0002\u0008\u0003\n\u0002\u0010\u000b\n\u0000\n\u0002\u0018\u0002\n\u0002\u0008\u0002\n\u0002\u0018\u0002\n\u0002\u0008\u0002\n\u0002\u0010\"\n\u0000\u0008\u0086\u0003\u0018\u00002\u00020\u0001B\u0007\u0008\u0002\u00a2\u0006\u0002\u0010\u0002J\u0010\u0010\u0008\u001a\u00020\t2\u0006\u0010\n\u001a\u00020\u000bH\u0007J\u0015\u0010\u000c\u001a\u00020\u00042\u0006\u0010\r\u001a\u00020\u000eH\u0000\u00a2\u0006\u0002\u0008\u000fJ\u0018\u0010\u0010\u001a\u00020\u00112\u0006\u0010\u0012\u001a\u00020\u00112\u0006\u0010\u0013\u001a\u00020\u0011H\u0002J\u001e\u0010\u0014\u001a\u00020\u00152\u0006\u0010\u0016\u001a\u00020\u00172\u0006\u0010\u0018\u001a\u00020\u00112\u0006\u0010\u0019\u001a\u00020\u001aJ\n\u0010\u001b\u001a\u00020\u0015*\u00020\u0017J\u0012\u0010\u001c\u001a\u0008\u0012\u0004\u0012\u00020\t0\u001d*\u00020\u0011H\u0002J\n\u0010\u0010\u001a\u00020\u0011*\u00020\u0017R\u000e\u0010\u0003\u001a\u00020\u0004X\u0082T\u00a2\u0006\u0002\n\u0000R\u000e\u0010\u0005\u001a\u00020\u0004X\u0082T\u00a2\u0006\u0002\n\u0000R\u000e\u0010\u0006\u001a\u00020\u0004X\u0082T\u00a2\u0006\u0002\n\u0000R\u000e\u0010\u0007\u001a\u00020\u0004X\u0082T\u00a2\u0006\u0002\n\u0000\u00a8\u0006\u001e" } d2 = { "Lokhttp3/Cache$Companion;", "", "()V", "ENTRY_BODY", "", "ENTRY_COUNT", "ENTRY_METADATA", "VERSION", "key", "", "url", "Lokhttp3/HttpUrl;", "readInt", "source", "Lokio/BufferedSource;", "readInt$okhttp", "varyHeaders", "Lokhttp3/Headers;", "requestHeaders", "responseHeaders", "varyMatches", "", "cachedResponse", "Lokhttp3/Response;", "cachedRequest", "newRequest", "Lokhttp3/Request;", "hasVaryAll", "varyFields", "", "okhttp" } k = 0x1 mv = { 0x1, 0x4, 0x0 } .end annotation # direct methods .method private constructor ()V .locals 0 .line 692 invoke-direct {p0}, Ljava/lang/Object;->()V return-void .end method .method public synthetic constructor (Lkotlin/jvm/internal/DefaultConstructorMarker;)V .locals 0 .line 692 invoke-direct {p0}, Lokhttp3/Cache$Companion;->()V return-void .end method .method private final varyFields(Lokhttp3/Headers;)Ljava/util/Set; .locals 12 .annotation system Ldalvik/annotation/Signature; value = { "(", "Lokhttp3/Headers;", ")", "Ljava/util/Set<", "Ljava/lang/String;", ">;" } .end annotation const/4 p0, 0x0 .line 736 move-object v0, p0 check-cast v0, Ljava/util/Set; .line 737 invoke-virtual {p1}, Lokhttp3/Headers;->size()I move-result v0 const/4 v1, 0x0 move v2, v1 :goto_0 if-ge v2, v0, :cond_4 const-string v3, "Vary" .line 738 invoke-virtual {p1, v2}, Lokhttp3/Headers;->name(I)Ljava/lang/String; move-result-object v4 const/4 v5, 0x1 invoke-static {v3, v4, v5}, Lkotlin/text/StringsKt;->equals(Ljava/lang/String;Ljava/lang/String;Z)Z move-result v3 if-nez v3, :cond_0 goto :goto_2 .line 742 :cond_0 invoke-virtual {p1, v2}, Lokhttp3/Headers;->value(I)Ljava/lang/String; move-result-object v3 if-nez p0, :cond_1 .line 744 new-instance p0, Ljava/util/TreeSet; sget-object v4, Lkotlin/jvm/internal/StringCompanionObject;->INSTANCE:Lkotlin/jvm/internal/StringCompanionObject; invoke-static {v4}, Lkotlin/text/StringsKt;->getCASE_INSENSITIVE_ORDER(Lkotlin/jvm/internal/StringCompanionObject;)Ljava/util/Comparator; move-result-object v4 invoke-direct {p0, v4}, Ljava/util/TreeSet;->(Ljava/util/Comparator;)V check-cast p0, Ljava/util/Set; .line 746 :cond_1 move-object v6, v3 check-cast v6, Ljava/lang/CharSequence; new-array v7, v5, [C const/16 v3, 0x2c aput-char v3, v7, v1 const/4 v8, 0x0 const/4 v9, 0x0 const/4 v10, 0x6 const/4 v11, 0x0 invoke-static/range {v6 .. v11}, Lkotlin/text/StringsKt;->split$default(Ljava/lang/CharSequence;[CZIILjava/lang/Object;)Ljava/util/List; move-result-object v3 invoke-interface {v3}, Ljava/util/List;->iterator()Ljava/util/Iterator; move-result-object v3 :goto_1 invoke-interface {v3}, Ljava/util/Iterator;->hasNext()Z move-result v4 if-eqz v4, :cond_3 invoke-interface {v3}, Ljava/util/Iterator;->next()Ljava/lang/Object; move-result-object v4 check-cast v4, Ljava/lang/String; if-eqz v4, :cond_2 .line 747 check-cast v4, Ljava/lang/CharSequence; invoke-static {v4}, Lkotlin/text/StringsKt;->trim(Ljava/lang/CharSequence;)Ljava/lang/CharSequence; move-result-object v4 invoke-virtual {v4}, Ljava/lang/Object;->toString()Ljava/lang/String; move-result-object v4 invoke-interface {p0, v4}, Ljava/util/Set;->add(Ljava/lang/Object;)Z goto :goto_1 :cond_2 new-instance p0, Ljava/lang/NullPointerException; const-string p1, "null cannot be cast to non-null type kotlin.CharSequence" invoke-direct {p0, p1}, Ljava/lang/NullPointerException;->(Ljava/lang/String;)V throw p0 :cond_3 :goto_2 add-int/lit8 v2, v2, 0x1 goto :goto_0 :cond_4 if-eqz p0, :cond_5 goto :goto_3 .line 750 :cond_5 invoke-static {}, Lkotlin/collections/SetsKt;->emptySet()Ljava/util/Set; move-result-object p0 :goto_3 return-object p0 .end method .method private final varyHeaders(Lokhttp3/Headers;Lokhttp3/Headers;)Lokhttp3/Headers; .locals 4 .line 769 move-object v0, p0 check-cast v0, Lokhttp3/Cache$Companion; invoke-direct {p0, p2}, Lokhttp3/Cache$Companion;->varyFields(Lokhttp3/Headers;)Ljava/util/Set; move-result-object p0 .line 770 invoke-interface {p0}, Ljava/util/Set;->isEmpty()Z move-result p2 if-eqz p2, :cond_0 sget-object p0, Lokhttp3/internal/Util;->EMPTY_HEADERS:Lokhttp3/Headers; return-object p0 .line 772 :cond_0 new-instance p2, Lokhttp3/Headers$Builder; invoke-direct {p2}, Lokhttp3/Headers$Builder;->()V .line 773 invoke-virtual {p1}, Lokhttp3/Headers;->size()I move-result v0 const/4 v1, 0x0 :goto_0 if-ge v1, v0, :cond_2 .line 774 invoke-virtual {p1, v1}, Lokhttp3/Headers;->name(I)Ljava/lang/String; move-result-object v2 .line 775 invoke-interface {p0, v2}, Ljava/util/Set;->contains(Ljava/lang/Object;)Z move-result v3 if-eqz v3, :cond_1 .line 776 invoke-virtual {p1, v1}, Lokhttp3/Headers;->value(I)Ljava/lang/String; move-result-object v3 invoke-virtual {p2, v2, v3}, Lokhttp3/Headers$Builder;->add(Ljava/lang/String;Ljava/lang/String;)Lokhttp3/Headers$Builder; :cond_1 add-int/lit8 v1, v1, 0x1 goto :goto_0 .line 779 :cond_2 invoke-virtual {p2}, Lokhttp3/Headers$Builder;->build()Lokhttp3/Headers; move-result-object p0 return-object p0 .end method # virtual methods .method public final hasVaryAll(Lokhttp3/Response;)Z .locals 1 const-string v0, "$this$hasVaryAll" invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V .line 730 move-object v0, p0 check-cast v0, Lokhttp3/Cache$Companion; invoke-virtual {p1}, Lokhttp3/Response;->headers()Lokhttp3/Headers; move-result-object p1 invoke-direct {p0, p1}, Lokhttp3/Cache$Companion;->varyFields(Lokhttp3/Headers;)Ljava/util/Set; move-result-object p0 const-string p1, "*" invoke-interface {p0, p1}, Ljava/util/Set;->contains(Ljava/lang/Object;)Z move-result p0 return p0 .end method .method public final key(Lokhttp3/HttpUrl;)Ljava/lang/String; .locals 0 .annotation runtime Lkotlin/jvm/JvmStatic; .end annotation const-string p0, "url" invoke-static {p1, p0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V .line 699 sget-object p0, Lokio/ByteString;->Companion:Lokio/ByteString$Companion; invoke-virtual {p1}, Lokhttp3/HttpUrl;->toString()Ljava/lang/String; move-result-object p1 invoke-virtual {p0, p1}, Lokio/ByteString$Companion;->encodeUtf8(Ljava/lang/String;)Lokio/ByteString; move-result-object p0 invoke-virtual {p0}, Lokio/ByteString;->md5()Lokio/ByteString; move-result-object p0 invoke-virtual {p0}, Lokio/ByteString;->hex()Ljava/lang/String; move-result-object p0 return-object p0 .end method .method public final readInt$okhttp(Lokio/BufferedSource;)I .locals 4 .annotation system Ldalvik/annotation/Throws; value = { Ljava/io/IOException; } .end annotation const-string p0, "expected an int but was \"" const-string v0, "source" invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V .line 704 :try_start_0 invoke-interface {p1}, Lokio/BufferedSource;->readDecimalLong()J move-result-wide v0 .line 705 invoke-interface {p1}, Lokio/BufferedSource;->readUtf8LineStrict()Ljava/lang/String; move-result-object p1 const-wide/16 v2, 0x0 cmp-long v2, v0, v2 if-ltz v2, :cond_0 const v2, 0x7fffffff int-to-long v2, v2 cmp-long v2, v0, v2 if-gtz v2, :cond_0 .line 706 move-object v2, p1 check-cast v2, Ljava/lang/CharSequence; invoke-interface {v2}, Ljava/lang/CharSequence;->length()I move-result v2 if-gtz v2, :cond_0 long-to-int p0, v0 return p0 .line 707 :cond_0 new-instance v2, Ljava/io/IOException; new-instance v3, Ljava/lang/StringBuilder; invoke-direct {v3, p0}, Ljava/lang/StringBuilder;->(Ljava/lang/String;)V invoke-virtual {v3, v0, v1}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder; move-result-object p0 invoke-virtual {p0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object p0 const/16 p1, 0x22 invoke-virtual {p0, p1}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder; move-result-object p0 invoke-virtual {p0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; move-result-object p0 invoke-direct {v2, p0}, Ljava/io/IOException;->(Ljava/lang/String;)V check-cast v2, Ljava/lang/Throwable; throw v2 :try_end_0 .catch Ljava/lang/NumberFormatException; {:try_start_0 .. :try_end_0} :catch_0 :catch_0 move-exception p0 .line 711 new-instance p1, Ljava/io/IOException; invoke-virtual {p0}, Ljava/lang/NumberFormatException;->getMessage()Ljava/lang/String; move-result-object p0 invoke-direct {p1, p0}, Ljava/io/IOException;->(Ljava/lang/String;)V check-cast p1, Ljava/lang/Throwable; throw p1 .end method .method public final varyHeaders(Lokhttp3/Response;)Lokhttp3/Headers; .locals 2 const-string v0, "$this$varyHeaders" invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V .line 759 invoke-virtual {p1}, Lokhttp3/Response;->networkResponse()Lokhttp3/Response; move-result-object v0 invoke-static {v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNull(Ljava/lang/Object;)V invoke-virtual {v0}, Lokhttp3/Response;->request()Lokhttp3/Request; move-result-object v0 invoke-virtual {v0}, Lokhttp3/Request;->headers()Lokhttp3/Headers; move-result-object v0 .line 760 invoke-virtual {p1}, Lokhttp3/Response;->headers()Lokhttp3/Headers; move-result-object p1 .line 761 move-object v1, p0 check-cast v1, Lokhttp3/Cache$Companion; invoke-direct {p0, v0, p1}, Lokhttp3/Cache$Companion;->varyHeaders(Lokhttp3/Headers;Lokhttp3/Headers;)Lokhttp3/Headers; move-result-object p0 return-object p0 .end method .method public final varyMatches(Lokhttp3/Response;Lokhttp3/Headers;Lokhttp3/Request;)Z .locals 2 const-string v0, "cachedResponse" invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V const-string v0, "cachedRequest" invoke-static {p2, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V const-string v0, "newRequest" invoke-static {p3, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V .line 724 move-object v0, p0 check-cast v0, Lokhttp3/Cache$Companion; invoke-virtual {p1}, Lokhttp3/Response;->headers()Lokhttp3/Headers; move-result-object p1 invoke-direct {p0, p1}, Lokhttp3/Cache$Companion;->varyFields(Lokhttp3/Headers;)Ljava/util/Set; move-result-object p0 check-cast p0, Ljava/lang/Iterable; .line 784 instance-of p1, p0, Ljava/util/Collection; const/4 v0, 0x1 if-eqz p1, :cond_0 move-object p1, p0 check-cast p1, Ljava/util/Collection; invoke-interface {p1}, Ljava/util/Collection;->isEmpty()Z move-result p1 if-eqz p1, :cond_0 goto :goto_0 .line 785 :cond_0 invoke-interface {p0}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator; move-result-object p0 :cond_1 invoke-interface {p0}, Ljava/util/Iterator;->hasNext()Z move-result p1 if-eqz p1, :cond_2 invoke-interface {p0}, Ljava/util/Iterator;->next()Ljava/lang/Object; move-result-object p1 check-cast p1, Ljava/lang/String; .line 725 invoke-virtual {p2, p1}, Lokhttp3/Headers;->values(Ljava/lang/String;)Ljava/util/List; move-result-object v1 invoke-virtual {p3, p1}, Lokhttp3/Request;->headers(Ljava/lang/String;)Ljava/util/List; move-result-object p1 invoke-static {v1, p1}, Lkotlin/jvm/internal/Intrinsics;->areEqual(Ljava/lang/Object;Ljava/lang/Object;)Z move-result p1 xor-int/2addr p1, v0 if-eqz p1, :cond_1 const/4 v0, 0x0 :cond_2 :goto_0 return v0 .end method