.class public final Lokhttp3/d; .super Ljava/lang/Object; .source "Cache.kt" # interfaces .implements Ljava/io/Closeable; .implements Ljava/io/Flushable; # annotations .annotation system Ldalvik/annotation/MemberClasses; value = { Lokhttp3/d$d;, Lokhttp3/d$c;, Lokhttp3/d$a;, Lokhttp3/d$b; } .end annotation # static fields .field public static final cjT:Lokhttp3/d$b; # instance fields .field private final cjO:Lokhttp3/internal/a/d; .field cjP:I .field cjQ:I .field private cjR:I .field private cjS:I .field private hitCount:I # direct methods .method static constructor ()V .locals 2 new-instance v0, Lokhttp3/d$b; const/4 v1, 0x0 invoke-direct {v0, v1}, Lokhttp3/d$b;->(B)V sput-object v0, Lokhttp3/d;->cjT:Lokhttp3/d$b; return-void .end method .method public static a(Lokhttp3/Response;Lokhttp3/Response;)V .locals 5 const-string v0, "cached" invoke-static {p0, v0}, Lkotlin/jvm/internal/l;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V const-string v0, "network" invoke-static {p1, v0}, Lkotlin/jvm/internal/l;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V new-instance v0, Lokhttp3/d$c; invoke-direct {v0, p1}, Lokhttp3/d$c;->(Lokhttp3/Response;)V iget-object p0, p0, Lokhttp3/Response;->cpQ:Lokhttp3/aa; if-eqz p0, :cond_1 check-cast p0, Lokhttp3/d$a; iget-object p0, p0, Lokhttp3/d$a;->cjV:Lokhttp3/internal/a/d$d; const/4 p1, 0x0 :try_start_0 iget-object v1, p0, Lokhttp3/internal/a/d$d;->this$0:Lokhttp3/internal/a/d; iget-object v2, p0, Lokhttp3/internal/a/d$d;->key:Ljava/lang/String; iget-wide v3, p0, Lokhttp3/internal/a/d$d;->crs:J invoke-virtual {v1, v2, v3, v4}, Lokhttp3/internal/a/d;->j(Ljava/lang/String;J)Lokhttp3/internal/a/d$b; move-result-object p1 if-eqz p1, :cond_0 invoke-virtual {v0, p1}, Lokhttp3/d$c;->b(Lokhttp3/internal/a/d$b;)V invoke-virtual {p1}, Lokhttp3/internal/a/d$b;->Rm()V :try_end_0 .catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0 return-void :catch_0 invoke-static {p1}, Lokhttp3/d;->a(Lokhttp3/internal/a/d$b;)V :cond_0 return-void :cond_1 new-instance p0, Lkotlin/r; const-string p1, "null cannot be cast to non-null type okhttp3.Cache.CacheResponseBody" invoke-direct {p0, p1}, Lkotlin/r;->(Ljava/lang/String;)V throw p0 .end method .method private static a(Lokhttp3/internal/a/d$b;)V .locals 0 if-eqz p0, :cond_0 :try_start_0 invoke-virtual {p0}, Lokhttp3/internal/a/d$b;->abort()V :try_end_0 .catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0 :catch_0 :cond_0 return-void .end method # virtual methods .method public final declared-synchronized PD()V .locals 1 monitor-enter p0 :try_start_0 iget v0, p0, Lokhttp3/d;->hitCount:I add-int/lit8 v0, v0, 0x1 iput v0, p0, Lokhttp3/d;->hitCount:I :try_end_0 .catchall {:try_start_0 .. :try_end_0} :catchall_0 monitor-exit p0 return-void :catchall_0 move-exception v0 monitor-exit p0 throw v0 .end method .method public final a(Lokhttp3/z;)Lokhttp3/Response; .locals 9 const-string v0, "request" invoke-static {p1, v0}, Lkotlin/jvm/internal/l;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V iget-object v1, p1, Lokhttp3/z;->cjD:Lokhttp3/v; invoke-static {v1}, Lokhttp3/d$b;->b(Lokhttp3/v;)Ljava/lang/String; move-result-object v1 const/4 v2, 0x0 :try_start_0 iget-object v3, p0, Lokhttp3/d;->cjO:Lokhttp3/internal/a/d; invoke-virtual {v3, v1}, Lokhttp3/internal/a/d;->fB(Ljava/lang/String;)Lokhttp3/internal/a/d$d; move-result-object v1 :try_end_0 .catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_1 if-nez v1, :cond_0 return-object v2 :cond_0 :try_start_1 new-instance v3, Lokhttp3/d$c; const/4 v4, 0x0 invoke-virtual {v1, v4}, Lokhttp3/internal/a/d$d;->fV(I)Lokio/x; move-result-object v5 invoke-direct {v3, v5}, Lokhttp3/d$c;->(Lokio/x;)V :try_end_1 .catch Ljava/io/IOException; {:try_start_1 .. :try_end_1} :catch_0 const-string v5, "snapshot" invoke-static {v1, v5}, Lkotlin/jvm/internal/l;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V iget-object v5, v3, Lokhttp3/d$c;->ckc:Lokhttp3/Headers; const-string v6, "Content-Type" invoke-virtual {v5, v6}, Lokhttp3/Headers;->eW(Ljava/lang/String;)Ljava/lang/String; move-result-object v5 iget-object v6, v3, Lokhttp3/d$c;->ckc:Lokhttp3/Headers; const-string v7, "Content-Length" invoke-virtual {v6, v7}, Lokhttp3/Headers;->eW(Ljava/lang/String;)Ljava/lang/String; move-result-object v6 new-instance v7, Lokhttp3/z$a; invoke-direct {v7}, Lokhttp3/z$a;->()V iget-object v8, v3, Lokhttp3/d$c;->url:Ljava/lang/String; invoke-virtual {v7, v8}, Lokhttp3/z$a;->fo(Ljava/lang/String;)Lokhttp3/z$a; move-result-object v7 iget-object v8, v3, Lokhttp3/d$c;->caP:Ljava/lang/String; invoke-virtual {v7, v8, v2}, Lokhttp3/z$a;->a(Ljava/lang/String;Lokhttp3/RequestBody;)Lokhttp3/z$a; move-result-object v7 iget-object v8, v3, Lokhttp3/d$c;->cka:Lokhttp3/Headers; invoke-virtual {v7, v8}, Lokhttp3/z$a;->c(Lokhttp3/Headers;)Lokhttp3/z$a; move-result-object v7 invoke-virtual {v7}, Lokhttp3/z$a;->QV()Lokhttp3/z; move-result-object v7 new-instance v8, Lokhttp3/Response$a; invoke-direct {v8}, Lokhttp3/Response$a;->()V invoke-virtual {v8, v7}, Lokhttp3/Response$a;->e(Lokhttp3/z;)Lokhttp3/Response$a; move-result-object v7 iget-object v8, v3, Lokhttp3/d$c;->ckb:Lokhttp3/x; invoke-virtual {v7, v8}, Lokhttp3/Response$a;->b(Lokhttp3/x;)Lokhttp3/Response$a; move-result-object v7 iget v8, v3, Lokhttp3/d$c;->code:I invoke-virtual {v7, v8}, Lokhttp3/Response$a;->fR(I)Lokhttp3/Response$a; move-result-object v7 iget-object v8, v3, Lokhttp3/d$c;->message:Ljava/lang/String; invoke-virtual {v7, v8}, Lokhttp3/Response$a;->fq(Ljava/lang/String;)Lokhttp3/Response$a; move-result-object v7 iget-object v8, v3, Lokhttp3/d$c;->ckc:Lokhttp3/Headers; invoke-virtual {v7, v8}, Lokhttp3/Response$a;->d(Lokhttp3/Headers;)Lokhttp3/Response$a; move-result-object v7 new-instance v8, Lokhttp3/d$a; invoke-direct {v8, v1, v5, v6}, Lokhttp3/d$a;->(Lokhttp3/internal/a/d$d;Ljava/lang/String;Ljava/lang/String;)V check-cast v8, Lokhttp3/aa; invoke-virtual {v7, v8}, Lokhttp3/Response$a;->a(Lokhttp3/aa;)Lokhttp3/Response$a; move-result-object v1 iget-object v5, v3, Lokhttp3/d$c;->ckd:Lokhttp3/u; invoke-virtual {v1, v5}, Lokhttp3/Response$a;->a(Lokhttp3/u;)Lokhttp3/Response$a; move-result-object v1 iget-wide v5, v3, Lokhttp3/d$c;->cke:J invoke-virtual {v1, v5, v6}, Lokhttp3/Response$a;->bi(J)Lokhttp3/Response$a; move-result-object v1 iget-wide v5, v3, Lokhttp3/d$c;->ckf:J invoke-virtual {v1, v5, v6}, Lokhttp3/Response$a;->bj(J)Lokhttp3/Response$a; move-result-object v1 invoke-virtual {v1}, Lokhttp3/Response$a;->QZ()Lokhttp3/Response; move-result-object v1 invoke-static {p1, v0}, Lkotlin/jvm/internal/l;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V const-string v0, "response" invoke-static {v1, v0}, Lkotlin/jvm/internal/l;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V iget-object v0, v3, Lokhttp3/d$c;->url:Ljava/lang/String; iget-object v5, p1, Lokhttp3/z;->cjD:Lokhttp3/v; invoke-virtual {v5}, Lokhttp3/v;->toString()Ljava/lang/String; move-result-object v5 invoke-static {v0, v5}, Lkotlin/jvm/internal/l;->areEqual(Ljava/lang/Object;Ljava/lang/Object;)Z move-result v0 const/4 v5, 0x1 if-eqz v0, :cond_4 iget-object v0, v3, Lokhttp3/d$c;->caP:Ljava/lang/String; iget-object v6, p1, Lokhttp3/z;->cpG:Ljava/lang/String; invoke-static {v0, v6}, Lkotlin/jvm/internal/l;->areEqual(Ljava/lang/Object;Ljava/lang/Object;)Z move-result v0 if-eqz v0, :cond_4 iget-object v0, v3, Lokhttp3/d$c;->cka:Lokhttp3/Headers; const-string v3, "cachedResponse" invoke-static {v1, v3}, Lkotlin/jvm/internal/l;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V const-string v3, "cachedRequest" invoke-static {v0, v3}, Lkotlin/jvm/internal/l;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V const-string v3, "newRequest" invoke-static {p1, v3}, Lkotlin/jvm/internal/l;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V iget-object v3, v1, Lokhttp3/Response;->coL:Lokhttp3/Headers; invoke-static {v3}, Lokhttp3/d$b;->a(Lokhttp3/Headers;)Ljava/util/Set; move-result-object v3 check-cast v3, Ljava/lang/Iterable; instance-of v6, v3, Ljava/util/Collection; if-eqz v6, :cond_1 move-object v6, v3 check-cast v6, Ljava/util/Collection; invoke-interface {v6}, Ljava/util/Collection;->isEmpty()Z move-result v6 if-nez v6, :cond_3 :cond_1 invoke-interface {v3}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator; move-result-object v3 :cond_2 invoke-interface {v3}, Ljava/util/Iterator;->hasNext()Z move-result v6 if-eqz v6, :cond_3 invoke-interface {v3}, Ljava/util/Iterator;->next()Ljava/lang/Object; move-result-object v6 check-cast v6, Ljava/lang/String; invoke-virtual {v0, v6}, Lokhttp3/Headers;->eX(Ljava/lang/String;)Ljava/util/List; move-result-object v7 const-string v8, "name" invoke-static {v6, v8}, Lkotlin/jvm/internal/l;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V iget-object v8, p1, Lokhttp3/z;->coL:Lokhttp3/Headers; invoke-virtual {v8, v6}, Lokhttp3/Headers;->eX(Ljava/lang/String;)Ljava/util/List; move-result-object v6 invoke-static {v7, v6}, Lkotlin/jvm/internal/l;->areEqual(Ljava/lang/Object;Ljava/lang/Object;)Z move-result v6 xor-int/2addr v6, v5 if-eqz v6, :cond_2 const/4 p1, 0x0 goto :goto_0 :cond_3 const/4 p1, 0x1 :goto_0 if-eqz p1, :cond_4 const/4 v4, 0x1 :cond_4 if-nez v4, :cond_6 iget-object p1, v1, Lokhttp3/Response;->cpQ:Lokhttp3/aa; if-eqz p1, :cond_5 check-cast p1, Ljava/io/Closeable; invoke-static {p1}, Lokhttp3/internal/b;->closeQuietly(Ljava/io/Closeable;)V :cond_5 return-object v2 :cond_6 return-object v1 :catch_0 check-cast v1, Ljava/io/Closeable; invoke-static {v1}, Lokhttp3/internal/b;->closeQuietly(Ljava/io/Closeable;)V :catch_1 return-object v2 .end method .method public final declared-synchronized a(Lokhttp3/internal/a/c;)V .locals 1 monitor-enter p0 :try_start_0 const-string v0, "cacheStrategy" invoke-static {p1, v0}, Lkotlin/jvm/internal/l;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V iget v0, p0, Lokhttp3/d;->cjS:I add-int/lit8 v0, v0, 0x1 iput v0, p0, Lokhttp3/d;->cjS:I iget-object v0, p1, Lokhttp3/internal/a/c;->cqy:Lokhttp3/z; if-eqz v0, :cond_0 iget p1, p0, Lokhttp3/d;->cjR:I add-int/lit8 p1, p1, 0x1 iput p1, p0, Lokhttp3/d;->cjR:I :try_end_0 .catchall {:try_start_0 .. :try_end_0} :catchall_0 monitor-exit p0 return-void :cond_0 :try_start_1 iget-object p1, p1, Lokhttp3/internal/a/c;->cpS:Lokhttp3/Response; if-eqz p1, :cond_1 iget p1, p0, Lokhttp3/d;->hitCount:I add-int/lit8 p1, p1, 0x1 iput p1, p0, Lokhttp3/d;->hitCount:I :try_end_1 .catchall {:try_start_1 .. :try_end_1} :catchall_0 :cond_1 monitor-exit p0 return-void :catchall_0 move-exception p1 monitor-exit p0 throw p1 .end method .method public final b(Lokhttp3/z;)V .locals 1 .annotation system Ldalvik/annotation/Throws; value = { Ljava/io/IOException; } .end annotation const-string v0, "request" invoke-static {p1, v0}, Lkotlin/jvm/internal/l;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V iget-object v0, p0, Lokhttp3/d;->cjO:Lokhttp3/internal/a/d; iget-object p1, p1, Lokhttp3/z;->cjD:Lokhttp3/v; invoke-static {p1}, Lokhttp3/d$b;->b(Lokhttp3/v;)Ljava/lang/String; move-result-object p1 invoke-virtual {v0, p1}, Lokhttp3/internal/a/d;->fC(Ljava/lang/String;)Z return-void .end method .method public final c(Lokhttp3/Response;)Lokhttp3/internal/a/b; .locals 3 const-string v0, "response" invoke-static {p1, v0}, Lkotlin/jvm/internal/l;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V iget-object v0, p1, Lokhttp3/Response;->cpP:Lokhttp3/z; iget-object v0, v0, Lokhttp3/z;->cpG:Ljava/lang/String; sget-object v1, Lokhttp3/internal/c/f;->csL:Lokhttp3/internal/c/f; iget-object v1, p1, Lokhttp3/Response;->cpP:Lokhttp3/z; iget-object v1, v1, Lokhttp3/z;->cpG:Ljava/lang/String; invoke-static {v1}, Lokhttp3/internal/c/f;->fF(Ljava/lang/String;)Z move-result v1 const/4 v2, 0x0 if-eqz v1, :cond_0 :try_start_0 iget-object p1, p1, Lokhttp3/Response;->cpP:Lokhttp3/z; invoke-virtual {p0, p1}, Lokhttp3/d;->b(Lokhttp3/z;)V :try_end_0 .catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0 :catch_0 return-object v2 :cond_0 const-string v1, "GET" invoke-static {v0, v1}, Lkotlin/jvm/internal/l;->areEqual(Ljava/lang/Object;Ljava/lang/Object;)Z move-result v0 xor-int/lit8 v0, v0, 0x1 if-eqz v0, :cond_1 return-object v2 :cond_1 const-string v0, "$this$hasVaryAll" invoke-static {p1, v0}, Lkotlin/jvm/internal/l;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V iget-object v0, p1, Lokhttp3/Response;->coL:Lokhttp3/Headers; invoke-static {v0}, Lokhttp3/d$b;->a(Lokhttp3/Headers;)Ljava/util/Set; move-result-object v0 const-string v1, "*" invoke-interface {v0, v1}, Ljava/util/Set;->contains(Ljava/lang/Object;)Z move-result v0 if-eqz v0, :cond_2 return-object v2 :cond_2 new-instance v0, Lokhttp3/d$c; invoke-direct {v0, p1}, Lokhttp3/d$c;->(Lokhttp3/Response;)V :try_start_1 iget-object v1, p0, Lokhttp3/d;->cjO:Lokhttp3/internal/a/d; iget-object p1, p1, Lokhttp3/Response;->cpP:Lokhttp3/z; iget-object p1, p1, Lokhttp3/z;->cjD:Lokhttp3/v; invoke-static {p1}, Lokhttp3/d$b;->b(Lokhttp3/v;)Ljava/lang/String; move-result-object p1 invoke-static {v1, p1}, Lokhttp3/internal/a/d;->a(Lokhttp3/internal/a/d;Ljava/lang/String;)Lokhttp3/internal/a/d$b; move-result-object p1 :try_end_1 .catch Ljava/io/IOException; {:try_start_1 .. :try_end_1} :catch_1 if-nez p1, :cond_3 return-object v2 :cond_3 :try_start_2 invoke-virtual {v0, p1}, Lokhttp3/d$c;->b(Lokhttp3/internal/a/d$b;)V new-instance v0, Lokhttp3/d$d; invoke-direct {v0, p0, p1}, Lokhttp3/d$d;->(Lokhttp3/d;Lokhttp3/internal/a/d$b;)V check-cast v0, Lokhttp3/internal/a/b; :try_end_2 .catch Ljava/io/IOException; {:try_start_2 .. :try_end_2} :catch_2 return-object v0 :catch_1 move-object p1, v2 :catch_2 invoke-static {p1}, Lokhttp3/d;->a(Lokhttp3/internal/a/d$b;)V return-object v2 .end method .method public final close()V .locals 1 .annotation system Ldalvik/annotation/Throws; value = { Ljava/io/IOException; } .end annotation iget-object v0, p0, Lokhttp3/d;->cjO:Lokhttp3/internal/a/d; invoke-virtual {v0}, Lokhttp3/internal/a/d;->close()V return-void .end method .method public final flush()V .locals 1 .annotation system Ldalvik/annotation/Throws; value = { Ljava/io/IOException; } .end annotation iget-object v0, p0, Lokhttp3/d;->cjO:Lokhttp3/internal/a/d; invoke-virtual {v0}, Lokhttp3/internal/a/d;->flush()V return-void .end method