Rabbit-R1/original r1/smali/smali_classes3/okhttp3/internal/cache/DiskLruCache.smali
2024-05-21 17:08:36 -04:00

3719 lines
99 KiB
Smali

.class public final Lokhttp3/internal/cache/DiskLruCache;
.super Ljava/lang/Object;
.source "DiskLruCache.kt"
# interfaces
.implements Ljava/io/Closeable;
.implements Ljava/io/Flushable;
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Lokhttp3/internal/cache/DiskLruCache$Snapshot;,
Lokhttp3/internal/cache/DiskLruCache$Editor;,
Lokhttp3/internal/cache/DiskLruCache$Entry;,
Lokhttp3/internal/cache/DiskLruCache$Companion;
}
.end annotation
.annotation system Ldalvik/annotation/SourceDebugExtension;
value = "SMAP\nDiskLruCache.kt\nKotlin\n*S Kotlin\n*F\n+ 1 DiskLruCache.kt\nokhttp3/internal/cache/DiskLruCache\n+ 2 Util.kt\nokhttp3/internal/Util\n+ 3 fake.kt\nkotlin/jvm/internal/FakeKt\n+ 4 ArraysJVM.kt\nkotlin/collections/ArraysKt__ArraysJVMKt\n*L\n1#1,1065:1\n601#2,4:1066\n1#3:1070\n37#4,2:1071\n37#4,2:1073\n*E\n*S KotlinDebug\n*F\n+ 1 DiskLruCache.kt\nokhttp3/internal/cache/DiskLruCache\n*L\n215#1,4:1066\n672#1,2:1071\n721#1,2:1073\n*E\n"
.end annotation
.annotation runtime Lkotlin/Metadata;
bv = {
0x1,
0x0,
0x3
}
d1 = {
"\u0000y\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0008\n\u0002\u0008\u0002\n\u0002\u0010\t\n\u0000\n\u0002\u0018\u0002\n\u0002\u0008\u0002\n\u0002\u0010\u000b\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0008\u0011\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0010\u000e\n\u0002\u0018\u0002\n\u0002\u0008\u000f\n\u0002\u0010\u0002\n\u0002\u0008\u0003\n\u0002\u0018\u0002\n\u0002\u0008\t\n\u0002\u0018\u0002\n\u0002\u0008\u0010\n\u0002\u0010)\n\u0002\u0008\u0007*\u0001\u0014\u0018\u0000 [2\u00020\u00012\u00020\u0002:\u0004[\\]^B7\u0008\u0000\u0012\u0006\u0010\u0003\u001a\u00020\u0004\u0012\u0006\u0010\u0005\u001a\u00020\u0006\u0012\u0006\u0010\u0007\u001a\u00020\u0008\u0012\u0006\u0010\t\u001a\u00020\u0008\u0012\u0006\u0010\n\u001a\u00020\u000b\u0012\u0006\u0010\u000c\u001a\u00020\r\u00a2\u0006\u0002\u0010\u000eJ\u0008\u00108\u001a\u000209H\u0002J\u0008\u0010:\u001a\u000209H\u0016J!\u0010;\u001a\u0002092\n\u0010<\u001a\u00060=R\u00020\u00002\u0006\u0010>\u001a\u00020\u0010H\u0000\u00a2\u0006\u0002\u0008?J\u0006\u0010@\u001a\u000209J \u0010A\u001a\u0008\u0018\u00010=R\u00020\u00002\u0006\u0010B\u001a\u00020(2\u0008\u0008\u0002\u0010C\u001a\u00020\u000bH\u0007J\u0006\u0010D\u001a\u000209J\u0008\u0010E\u001a\u000209H\u0016J\u0017\u0010F\u001a\u0008\u0018\u00010GR\u00020\u00002\u0006\u0010B\u001a\u00020(H\u0086\u0002J\u0006\u0010H\u001a\u000209J\u0006\u0010I\u001a\u00020\u0010J\u0008\u0010J\u001a\u00020\u0010H\u0002J\u0008\u0010K\u001a\u00020%H\u0002J\u0008\u0010L\u001a\u000209H\u0002J\u0008\u0010M\u001a\u000209H\u0002J\u0010\u0010N\u001a\u0002092\u0006\u0010O\u001a\u00020(H\u0002J\r\u0010P\u001a\u000209H\u0000\u00a2\u0006\u0002\u0008QJ\u000e\u0010R\u001a\u00020\u00102\u0006\u0010B\u001a\u00020(J\u0019\u0010S\u001a\u00020\u00102\n\u0010T\u001a\u00060)R\u00020\u0000H\u0000\u00a2\u0006\u0002\u0008UJ\u0008\u0010V\u001a\u00020\u0010H\u0002J\u0006\u00105\u001a\u00020\u000bJ\u0010\u0010W\u001a\u000c\u0012\u0008\u0012\u00060GR\u00020\u00000XJ\u0006\u0010Y\u001a\u000209J\u0010\u0010Z\u001a\u0002092\u0006\u0010B\u001a\u00020(H\u0002R\u000e\u0010\u0007\u001a\u00020\u0008X\u0082\u0004\u00a2\u0006\u0002\n\u0000R\u000e\u0010\u000f\u001a\u00020\u0010X\u0082\u000e\u00a2\u0006\u0002\n\u0000R\u000e\u0010\u0011\u001a\u00020\u0012X\u0082\u0004\u00a2\u0006\u0002\n\u0000R\u0010\u0010\u0013\u001a\u00020\u0014X\u0082\u0004\u00a2\u0006\u0004\n\u0002\u0010\u0015R\u001a\u0010\u0016\u001a\u00020\u0010X\u0080\u000e\u00a2\u0006\u000e\n\u0000\u001a\u0004\u0008\u0017\u0010\u0018\"\u0004\u0008\u0019\u0010\u001aR\u0011\u0010\u0005\u001a\u00020\u0006\u00a2\u0006\u0008\n\u0000\u001a\u0004\u0008\u001b\u0010\u001cR\u0014\u0010\u0003\u001a\u00020\u0004X\u0080\u0004\u00a2\u0006\u0008\n\u0000\u001a\u0004\u0008\u001d\u0010\u001eR\u000e\u0010\u001f\u001a\u00020\u0010X\u0082\u000e\u00a2\u0006\u0002\n\u0000R\u000e\u0010 \u001a\u00020\u0010X\u0082\u000e\u00a2\u0006\u0002\n\u0000R\u000e\u0010!\u001a\u00020\u0006X\u0082\u0004\u00a2\u0006\u0002\n\u0000R\u000e\u0010\"\u001a\u00020\u0006X\u0082\u0004\u00a2\u0006\u0002\n\u0000R\u000e\u0010#\u001a\u00020\u0006X\u0082\u0004\u00a2\u0006\u0002\n\u0000R\u0010\u0010$\u001a\u0004\u0018\u00010%X\u0082\u000e\u00a2\u0006\u0002\n\u0000R$\u0010&\u001a\u0012\u0012\u0004\u0012\u00020(\u0012\u0008\u0012\u00060)R\u00020\u00000\'X\u0080\u0004\u00a2\u0006\u0008\n\u0000\u001a\u0004\u0008*\u0010+R&\u0010\n\u001a\u00020\u000b2\u0006\u0010,\u001a\u00020\u000b8F@FX\u0086\u000e\u00a2\u0006\u000e\n\u0000\u001a\u0004\u0008-\u0010.\"\u0004\u0008/\u00100R\u000e\u00101\u001a\u00020\u0010X\u0082\u000e\u00a2\u0006\u0002\n\u0000R\u000e\u00102\u001a\u00020\u0010X\u0082\u000e\u00a2\u0006\u0002\n\u0000R\u000e\u00103\u001a\u00020\u000bX\u0082\u000e\u00a2\u0006\u0002\n\u0000R\u000e\u00104\u001a\u00020\u0008X\u0082\u000e\u00a2\u0006\u0002\n\u0000R\u000e\u00105\u001a\u00020\u000bX\u0082\u000e\u00a2\u0006\u0002\n\u0000R\u0014\u0010\t\u001a\u00020\u0008X\u0080\u0004\u00a2\u0006\u0008\n\u0000\u001a\u0004\u00086\u00107\u00a8\u0006_"
}
d2 = {
"Lokhttp3/internal/cache/DiskLruCache;",
"Ljava/io/Closeable;",
"Ljava/io/Flushable;",
"fileSystem",
"Lokhttp3/internal/io/FileSystem;",
"directory",
"Ljava/io/File;",
"appVersion",
"",
"valueCount",
"maxSize",
"",
"taskRunner",
"Lokhttp3/internal/concurrent/TaskRunner;",
"(Lokhttp3/internal/io/FileSystem;Ljava/io/File;IIJLokhttp3/internal/concurrent/TaskRunner;)V",
"civilizedFileSystem",
"",
"cleanupQueue",
"Lokhttp3/internal/concurrent/TaskQueue;",
"cleanupTask",
"okhttp3/internal/cache/DiskLruCache$cleanupTask$1",
"Lokhttp3/internal/cache/DiskLruCache$cleanupTask$1;",
"closed",
"getClosed$okhttp",
"()Z",
"setClosed$okhttp",
"(Z)V",
"getDirectory",
"()Ljava/io/File;",
"getFileSystem$okhttp",
"()Lokhttp3/internal/io/FileSystem;",
"hasJournalErrors",
"initialized",
"journalFile",
"journalFileBackup",
"journalFileTmp",
"journalWriter",
"Lokio/BufferedSink;",
"lruEntries",
"Ljava/util/LinkedHashMap;",
"",
"Lokhttp3/internal/cache/DiskLruCache$Entry;",
"getLruEntries$okhttp",
"()Ljava/util/LinkedHashMap;",
"value",
"getMaxSize",
"()J",
"setMaxSize",
"(J)V",
"mostRecentRebuildFailed",
"mostRecentTrimFailed",
"nextSequenceNumber",
"redundantOpCount",
"size",
"getValueCount$okhttp",
"()I",
"checkNotClosed",
"",
"close",
"completeEdit",
"editor",
"Lokhttp3/internal/cache/DiskLruCache$Editor;",
"success",
"completeEdit$okhttp",
"delete",
"edit",
"key",
"expectedSequenceNumber",
"evictAll",
"flush",
"get",
"Lokhttp3/internal/cache/DiskLruCache$Snapshot;",
"initialize",
"isClosed",
"journalRebuildRequired",
"newJournalWriter",
"processJournal",
"readJournal",
"readJournalLine",
"line",
"rebuildJournal",
"rebuildJournal$okhttp",
"remove",
"removeEntry",
"entry",
"removeEntry$okhttp",
"removeOldestEntry",
"snapshots",
"",
"trimToSize",
"validateKey",
"Companion",
"Editor",
"Entry",
"Snapshot",
"okhttp"
}
k = 0x1
mv = {
0x1,
0x4,
0x0
}
.end annotation
# static fields
.field public static final ANY_SEQUENCE_NUMBER:J
.field public static final CLEAN:Ljava/lang/String;
.field public static final Companion:Lokhttp3/internal/cache/DiskLruCache$Companion;
.field public static final DIRTY:Ljava/lang/String;
.field public static final JOURNAL_FILE:Ljava/lang/String;
.field public static final JOURNAL_FILE_BACKUP:Ljava/lang/String;
.field public static final JOURNAL_FILE_TEMP:Ljava/lang/String;
.field public static final LEGAL_KEY_PATTERN:Lkotlin/text/Regex;
.field public static final MAGIC:Ljava/lang/String;
.field public static final READ:Ljava/lang/String;
.field public static final REMOVE:Ljava/lang/String;
.field public static final VERSION_1:Ljava/lang/String;
# instance fields
.field private final appVersion:I
.field private civilizedFileSystem:Z
.field private final cleanupQueue:Lokhttp3/internal/concurrent/TaskQueue;
.field private final cleanupTask:Lokhttp3/internal/cache/DiskLruCache$cleanupTask$1;
.field private closed:Z
.field private final directory:Ljava/io/File;
.field private final fileSystem:Lokhttp3/internal/io/FileSystem;
.field private hasJournalErrors:Z
.field private initialized:Z
.field private final journalFile:Ljava/io/File;
.field private final journalFileBackup:Ljava/io/File;
.field private final journalFileTmp:Ljava/io/File;
.field private journalWriter:Lokio/BufferedSink;
.field private final lruEntries:Ljava/util/LinkedHashMap;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/LinkedHashMap<",
"Ljava/lang/String;",
"Lokhttp3/internal/cache/DiskLruCache$Entry;",
">;"
}
.end annotation
.end field
.field private maxSize:J
.field private mostRecentRebuildFailed:Z
.field private mostRecentTrimFailed:Z
.field private nextSequenceNumber:J
.field private redundantOpCount:I
.field private size:J
.field private final valueCount:I
# direct methods
.method static constructor <clinit>()V
.locals 2
new-instance v0, Lokhttp3/internal/cache/DiskLruCache$Companion;
const/4 v1, 0x0
invoke-direct {v0, v1}, Lokhttp3/internal/cache/DiskLruCache$Companion;-><init>(Lkotlin/jvm/internal/DefaultConstructorMarker;)V
sput-object v0, Lokhttp3/internal/cache/DiskLruCache;->Companion:Lokhttp3/internal/cache/DiskLruCache$Companion;
const-string v0, "journal"
sput-object v0, Lokhttp3/internal/cache/DiskLruCache;->JOURNAL_FILE:Ljava/lang/String;
const-string v0, "journal.tmp"
sput-object v0, Lokhttp3/internal/cache/DiskLruCache;->JOURNAL_FILE_TEMP:Ljava/lang/String;
const-string v0, "journal.bkp"
sput-object v0, Lokhttp3/internal/cache/DiskLruCache;->JOURNAL_FILE_BACKUP:Ljava/lang/String;
const-string v0, "libcore.io.DiskLruCache"
sput-object v0, Lokhttp3/internal/cache/DiskLruCache;->MAGIC:Ljava/lang/String;
const-string v0, "1"
sput-object v0, Lokhttp3/internal/cache/DiskLruCache;->VERSION_1:Ljava/lang/String;
const-wide/16 v0, -0x1
sput-wide v0, Lokhttp3/internal/cache/DiskLruCache;->ANY_SEQUENCE_NUMBER:J
.line 1058
new-instance v0, Lkotlin/text/Regex;
const-string v1, "[a-z0-9_-]{1,120}"
invoke-direct {v0, v1}, Lkotlin/text/Regex;-><init>(Ljava/lang/String;)V
sput-object v0, Lokhttp3/internal/cache/DiskLruCache;->LEGAL_KEY_PATTERN:Lkotlin/text/Regex;
const-string v0, "CLEAN"
sput-object v0, Lokhttp3/internal/cache/DiskLruCache;->CLEAN:Ljava/lang/String;
const-string v0, "DIRTY"
sput-object v0, Lokhttp3/internal/cache/DiskLruCache;->DIRTY:Ljava/lang/String;
const-string v0, "REMOVE"
sput-object v0, Lokhttp3/internal/cache/DiskLruCache;->REMOVE:Ljava/lang/String;
const-string v0, "READ"
sput-object v0, Lokhttp3/internal/cache/DiskLruCache;->READ:Ljava/lang/String;
return-void
.end method
.method public constructor <init>(Lokhttp3/internal/io/FileSystem;Ljava/io/File;IIJLokhttp3/internal/concurrent/TaskRunner;)V
.locals 4
const-string v0, "fileSystem"
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
const-string v0, "directory"
invoke-static {p2, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
const-string v0, "taskRunner"
invoke-static {p7, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
.line 87
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
iput-object p1, p0, Lokhttp3/internal/cache/DiskLruCache;->fileSystem:Lokhttp3/internal/io/FileSystem;
iput-object p2, p0, Lokhttp3/internal/cache/DiskLruCache;->directory:Ljava/io/File;
iput p3, p0, Lokhttp3/internal/cache/DiskLruCache;->appVersion:I
iput p4, p0, Lokhttp3/internal/cache/DiskLruCache;->valueCount:I
iput-wide p5, p0, Lokhttp3/internal/cache/DiskLruCache;->maxSize:J
.line 157
new-instance p1, Ljava/util/LinkedHashMap;
const/4 p3, 0x0
const/high16 v0, 0x3f400000 # 0.75f
const/4 v1, 0x1
invoke-direct {p1, p3, v0, v1}, Ljava/util/LinkedHashMap;-><init>(IFZ)V
iput-object p1, p0, Lokhttp3/internal/cache/DiskLruCache;->lruEntries:Ljava/util/LinkedHashMap;
.line 175
invoke-virtual {p7}, Lokhttp3/internal/concurrent/TaskRunner;->newQueue()Lokhttp3/internal/concurrent/TaskQueue;
move-result-object p1
iput-object p1, p0, Lokhttp3/internal/cache/DiskLruCache;->cleanupQueue:Lokhttp3/internal/concurrent/TaskQueue;
.line 176
new-instance p1, Lokhttp3/internal/cache/DiskLruCache$cleanupTask$1;
new-instance p7, Ljava/lang/StringBuilder;
invoke-direct {p7}, Ljava/lang/StringBuilder;-><init>()V
sget-object v0, Lokhttp3/internal/Util;->okHttpName:Ljava/lang/String;
invoke-virtual {p7, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object p7
const-string v0, " Cache"
invoke-virtual {p7, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object p7
invoke-virtual {p7}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p7
invoke-direct {p1, p0, p7}, Lokhttp3/internal/cache/DiskLruCache$cleanupTask$1;-><init>(Lokhttp3/internal/cache/DiskLruCache;Ljava/lang/String;)V
iput-object p1, p0, Lokhttp3/internal/cache/DiskLruCache;->cleanupTask:Lokhttp3/internal/cache/DiskLruCache$cleanupTask$1;
const-wide/16 v2, 0x0
cmp-long p1, p5, v2
if-lez p1, :cond_0
move p1, v1
goto :goto_0
:cond_0
move p1, p3
:goto_0
if-eqz p1, :cond_3
if-lez p4, :cond_1
move p3, v1
:cond_1
if-eqz p3, :cond_2
.line 208
new-instance p1, Ljava/io/File;
sget-object p3, Lokhttp3/internal/cache/DiskLruCache;->JOURNAL_FILE:Ljava/lang/String;
invoke-direct {p1, p2, p3}, Ljava/io/File;-><init>(Ljava/io/File;Ljava/lang/String;)V
iput-object p1, p0, Lokhttp3/internal/cache/DiskLruCache;->journalFile:Ljava/io/File;
.line 209
new-instance p1, Ljava/io/File;
sget-object p3, Lokhttp3/internal/cache/DiskLruCache;->JOURNAL_FILE_TEMP:Ljava/lang/String;
invoke-direct {p1, p2, p3}, Ljava/io/File;-><init>(Ljava/io/File;Ljava/lang/String;)V
iput-object p1, p0, Lokhttp3/internal/cache/DiskLruCache;->journalFileTmp:Ljava/io/File;
.line 210
new-instance p1, Ljava/io/File;
sget-object p3, Lokhttp3/internal/cache/DiskLruCache;->JOURNAL_FILE_BACKUP:Ljava/lang/String;
invoke-direct {p1, p2, p3}, Ljava/io/File;-><init>(Ljava/io/File;Ljava/lang/String;)V
iput-object p1, p0, Lokhttp3/internal/cache/DiskLruCache;->journalFileBackup:Ljava/io/File;
return-void
.line 206
:cond_2
new-instance p0, Ljava/lang/IllegalArgumentException;
const-string p1, "valueCount <= 0"
invoke-virtual {p1}, Ljava/lang/Object;->toString()Ljava/lang/String;
move-result-object p1
invoke-direct {p0, p1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
check-cast p0, Ljava/lang/Throwable;
throw p0
.line 205
:cond_3
new-instance p0, Ljava/lang/IllegalArgumentException;
const-string p1, "maxSize <= 0"
invoke-virtual {p1}, Ljava/lang/Object;->toString()Ljava/lang/String;
move-result-object p1
invoke-direct {p0, p1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
check-cast p0, Ljava/lang/Throwable;
throw p0
.end method
.method public static final synthetic access$getCivilizedFileSystem$p(Lokhttp3/internal/cache/DiskLruCache;)Z
.locals 0
.line 87
iget-boolean p0, p0, Lokhttp3/internal/cache/DiskLruCache;->civilizedFileSystem:Z
return p0
.end method
.method public static final synthetic access$getHasJournalErrors$p(Lokhttp3/internal/cache/DiskLruCache;)Z
.locals 0
.line 87
iget-boolean p0, p0, Lokhttp3/internal/cache/DiskLruCache;->hasJournalErrors:Z
return p0
.end method
.method public static final synthetic access$getInitialized$p(Lokhttp3/internal/cache/DiskLruCache;)Z
.locals 0
.line 87
iget-boolean p0, p0, Lokhttp3/internal/cache/DiskLruCache;->initialized:Z
return p0
.end method
.method public static final synthetic access$getJournalWriter$p(Lokhttp3/internal/cache/DiskLruCache;)Lokio/BufferedSink;
.locals 0
.line 87
iget-object p0, p0, Lokhttp3/internal/cache/DiskLruCache;->journalWriter:Lokio/BufferedSink;
return-object p0
.end method
.method public static final synthetic access$getMostRecentRebuildFailed$p(Lokhttp3/internal/cache/DiskLruCache;)Z
.locals 0
.line 87
iget-boolean p0, p0, Lokhttp3/internal/cache/DiskLruCache;->mostRecentRebuildFailed:Z
return p0
.end method
.method public static final synthetic access$getMostRecentTrimFailed$p(Lokhttp3/internal/cache/DiskLruCache;)Z
.locals 0
.line 87
iget-boolean p0, p0, Lokhttp3/internal/cache/DiskLruCache;->mostRecentTrimFailed:Z
return p0
.end method
.method public static final synthetic access$getRedundantOpCount$p(Lokhttp3/internal/cache/DiskLruCache;)I
.locals 0
.line 87
iget p0, p0, Lokhttp3/internal/cache/DiskLruCache;->redundantOpCount:I
return p0
.end method
.method public static final synthetic access$journalRebuildRequired(Lokhttp3/internal/cache/DiskLruCache;)Z
.locals 0
.line 87
invoke-direct {p0}, Lokhttp3/internal/cache/DiskLruCache;->journalRebuildRequired()Z
move-result p0
return p0
.end method
.method public static final synthetic access$setCivilizedFileSystem$p(Lokhttp3/internal/cache/DiskLruCache;Z)V
.locals 0
.line 87
iput-boolean p1, p0, Lokhttp3/internal/cache/DiskLruCache;->civilizedFileSystem:Z
return-void
.end method
.method public static final synthetic access$setHasJournalErrors$p(Lokhttp3/internal/cache/DiskLruCache;Z)V
.locals 0
.line 87
iput-boolean p1, p0, Lokhttp3/internal/cache/DiskLruCache;->hasJournalErrors:Z
return-void
.end method
.method public static final synthetic access$setInitialized$p(Lokhttp3/internal/cache/DiskLruCache;Z)V
.locals 0
.line 87
iput-boolean p1, p0, Lokhttp3/internal/cache/DiskLruCache;->initialized:Z
return-void
.end method
.method public static final synthetic access$setJournalWriter$p(Lokhttp3/internal/cache/DiskLruCache;Lokio/BufferedSink;)V
.locals 0
.line 87
iput-object p1, p0, Lokhttp3/internal/cache/DiskLruCache;->journalWriter:Lokio/BufferedSink;
return-void
.end method
.method public static final synthetic access$setMostRecentRebuildFailed$p(Lokhttp3/internal/cache/DiskLruCache;Z)V
.locals 0
.line 87
iput-boolean p1, p0, Lokhttp3/internal/cache/DiskLruCache;->mostRecentRebuildFailed:Z
return-void
.end method
.method public static final synthetic access$setMostRecentTrimFailed$p(Lokhttp3/internal/cache/DiskLruCache;Z)V
.locals 0
.line 87
iput-boolean p1, p0, Lokhttp3/internal/cache/DiskLruCache;->mostRecentTrimFailed:Z
return-void
.end method
.method public static final synthetic access$setRedundantOpCount$p(Lokhttp3/internal/cache/DiskLruCache;I)V
.locals 0
.line 87
iput p1, p0, Lokhttp3/internal/cache/DiskLruCache;->redundantOpCount:I
return-void
.end method
.method private final declared-synchronized checkNotClosed()V
.locals 2
monitor-enter p0
:try_start_0
iget-boolean v0, p0, Lokhttp3/internal/cache/DiskLruCache;->closed:Z
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
xor-int/lit8 v0, v0, 0x1
if-eqz v0, :cond_0
.line 649
monitor-exit p0
return-void
:cond_0
:try_start_1
const-string v0, "cache is closed"
.line 648
new-instance v1, Ljava/lang/IllegalStateException;
invoke-virtual {v0}, Ljava/lang/Object;->toString()Ljava/lang/String;
move-result-object v0
invoke-direct {v1, v0}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
check-cast v1, Ljava/lang/Throwable;
throw v1
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
:catchall_0
move-exception v0
monitor-exit p0
throw v0
.end method
.method public static synthetic edit$default(Lokhttp3/internal/cache/DiskLruCache;Ljava/lang/String;JILjava/lang/Object;)Lokhttp3/internal/cache/DiskLruCache$Editor;
.locals 0
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
and-int/lit8 p4, p4, 0x2
if-eqz p4, :cond_0
sget-wide p2, Lokhttp3/internal/cache/DiskLruCache;->ANY_SEQUENCE_NUMBER:J
.line 448
:cond_0
invoke-virtual {p0, p1, p2, p3}, Lokhttp3/internal/cache/DiskLruCache;->edit(Ljava/lang/String;J)Lokhttp3/internal/cache/DiskLruCache$Editor;
move-result-object p0
return-object p0
.end method
.method private final journalRebuildRequired()Z
.locals 2
iget v0, p0, Lokhttp3/internal/cache/DiskLruCache;->redundantOpCount:I
const/16 v1, 0x7d0
if-lt v0, v1, :cond_0
iget-object p0, p0, Lokhttp3/internal/cache/DiskLruCache;->lruEntries:Ljava/util/LinkedHashMap;
.line 581
invoke-virtual {p0}, Ljava/util/LinkedHashMap;->size()I
move-result p0
if-lt v0, p0, :cond_0
const/4 p0, 0x1
goto :goto_0
:cond_0
const/4 p0, 0x0
:goto_0
return p0
.end method
.method private final newJournalWriter()Lokio/BufferedSink;
.locals 3
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/FileNotFoundException;
}
.end annotation
iget-object v0, p0, Lokhttp3/internal/cache/DiskLruCache;->fileSystem:Lokhttp3/internal/io/FileSystem;
iget-object v1, p0, Lokhttp3/internal/cache/DiskLruCache;->journalFile:Ljava/io/File;
.line 302
invoke-interface {v0, v1}, Lokhttp3/internal/io/FileSystem;->appendingSink(Ljava/io/File;)Lokio/Sink;
move-result-object v0
.line 303
new-instance v1, Lokhttp3/internal/cache/FaultHidingSink;
new-instance v2, Lokhttp3/internal/cache/DiskLruCache$newJournalWriter$faultHidingSink$1;
invoke-direct {v2, p0}, Lokhttp3/internal/cache/DiskLruCache$newJournalWriter$faultHidingSink$1;-><init>(Lokhttp3/internal/cache/DiskLruCache;)V
check-cast v2, Lkotlin/jvm/functions/Function1;
invoke-direct {v1, v0, v2}, Lokhttp3/internal/cache/FaultHidingSink;-><init>(Lokio/Sink;Lkotlin/jvm/functions/Function1;)V
.line 307
check-cast v1, Lokio/Sink;
invoke-static {v1}, Lokio/Okio;->buffer(Lokio/Sink;)Lokio/BufferedSink;
move-result-object p0
return-object p0
.end method
.method private final processJournal()V
.locals 8
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
iget-object v0, p0, Lokhttp3/internal/cache/DiskLruCache;->fileSystem:Lokhttp3/internal/io/FileSystem;
iget-object v1, p0, Lokhttp3/internal/cache/DiskLruCache;->journalFileTmp:Ljava/io/File;
.line 361
invoke-interface {v0, v1}, Lokhttp3/internal/io/FileSystem;->delete(Ljava/io/File;)V
iget-object v0, p0, Lokhttp3/internal/cache/DiskLruCache;->lruEntries:Ljava/util/LinkedHashMap;
.line 362
invoke-virtual {v0}, Ljava/util/LinkedHashMap;->values()Ljava/util/Collection;
move-result-object v0
invoke-interface {v0}, Ljava/util/Collection;->iterator()Ljava/util/Iterator;
move-result-object v0
.line 363
:cond_0
:goto_0
invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
move-result v1
if-eqz v1, :cond_3
.line 364
invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v1
const-string v2, "i.next()"
invoke-static {v1, v2}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
check-cast v1, Lokhttp3/internal/cache/DiskLruCache$Entry;
.line 365
invoke-virtual {v1}, Lokhttp3/internal/cache/DiskLruCache$Entry;->getCurrentEditor$okhttp()Lokhttp3/internal/cache/DiskLruCache$Editor;
move-result-object v2
const/4 v3, 0x0
if-nez v2, :cond_1
iget v2, p0, Lokhttp3/internal/cache/DiskLruCache;->valueCount:I
:goto_1
if-ge v3, v2, :cond_0
iget-wide v4, p0, Lokhttp3/internal/cache/DiskLruCache;->size:J
.line 367
invoke-virtual {v1}, Lokhttp3/internal/cache/DiskLruCache$Entry;->getLengths$okhttp()[J
move-result-object v6
aget-wide v6, v6, v3
add-long/2addr v4, v6
iput-wide v4, p0, Lokhttp3/internal/cache/DiskLruCache;->size:J
add-int/lit8 v3, v3, 0x1
goto :goto_1
:cond_1
const/4 v2, 0x0
.line 370
move-object v4, v2
check-cast v4, Lokhttp3/internal/cache/DiskLruCache$Editor;
invoke-virtual {v1, v2}, Lokhttp3/internal/cache/DiskLruCache$Entry;->setCurrentEditor$okhttp(Lokhttp3/internal/cache/DiskLruCache$Editor;)V
iget v2, p0, Lokhttp3/internal/cache/DiskLruCache;->valueCount:I
:goto_2
if-ge v3, v2, :cond_2
iget-object v4, p0, Lokhttp3/internal/cache/DiskLruCache;->fileSystem:Lokhttp3/internal/io/FileSystem;
.line 372
invoke-virtual {v1}, Lokhttp3/internal/cache/DiskLruCache$Entry;->getCleanFiles$okhttp()Ljava/util/List;
move-result-object v5
invoke-interface {v5, v3}, Ljava/util/List;->get(I)Ljava/lang/Object;
move-result-object v5
check-cast v5, Ljava/io/File;
invoke-interface {v4, v5}, Lokhttp3/internal/io/FileSystem;->delete(Ljava/io/File;)V
iget-object v4, p0, Lokhttp3/internal/cache/DiskLruCache;->fileSystem:Lokhttp3/internal/io/FileSystem;
.line 373
invoke-virtual {v1}, Lokhttp3/internal/cache/DiskLruCache$Entry;->getDirtyFiles$okhttp()Ljava/util/List;
move-result-object v5
invoke-interface {v5, v3}, Ljava/util/List;->get(I)Ljava/lang/Object;
move-result-object v5
check-cast v5, Ljava/io/File;
invoke-interface {v4, v5}, Lokhttp3/internal/io/FileSystem;->delete(Ljava/io/File;)V
add-int/lit8 v3, v3, 0x1
goto :goto_2
.line 375
:cond_2
invoke-interface {v0}, Ljava/util/Iterator;->remove()V
goto :goto_0
:cond_3
return-void
.end method
.method private final readJournal()V
.locals 11
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
const-string v0, ", "
const-string v1, "unexpected journal header: ["
iget-object v2, p0, Lokhttp3/internal/cache/DiskLruCache;->fileSystem:Lokhttp3/internal/io/FileSystem;
iget-object v3, p0, Lokhttp3/internal/cache/DiskLruCache;->journalFile:Ljava/io/File;
.line 263
invoke-interface {v2, v3}, Lokhttp3/internal/io/FileSystem;->source(Ljava/io/File;)Lokio/Source;
move-result-object v2
invoke-static {v2}, Lokio/Okio;->buffer(Lokio/Source;)Lokio/BufferedSource;
move-result-object v2
check-cast v2, Ljava/io/Closeable;
const/4 v3, 0x0
move-object v4, v3
check-cast v4, Ljava/lang/Throwable;
:try_start_0
move-object v4, v2
check-cast v4, Lokio/BufferedSource;
.line 264
invoke-interface {v4}, Lokio/BufferedSource;->readUtf8LineStrict()Ljava/lang/String;
move-result-object v5
.line 265
invoke-interface {v4}, Lokio/BufferedSource;->readUtf8LineStrict()Ljava/lang/String;
move-result-object v6
.line 266
invoke-interface {v4}, Lokio/BufferedSource;->readUtf8LineStrict()Ljava/lang/String;
move-result-object v7
.line 267
invoke-interface {v4}, Lokio/BufferedSource;->readUtf8LineStrict()Ljava/lang/String;
move-result-object v8
.line 268
invoke-interface {v4}, Lokio/BufferedSource;->readUtf8LineStrict()Ljava/lang/String;
move-result-object v9
sget-object v10, Lokhttp3/internal/cache/DiskLruCache;->MAGIC:Ljava/lang/String;
.line 274
invoke-static {v10, v5}, Lkotlin/jvm/internal/Intrinsics;->areEqual(Ljava/lang/Object;Ljava/lang/Object;)Z
move-result v10
xor-int/lit8 v10, v10, 0x1
if-nez v10, :cond_1
sget-object v10, Lokhttp3/internal/cache/DiskLruCache;->VERSION_1:Ljava/lang/String;
invoke-static {v10, v6}, Lkotlin/jvm/internal/Intrinsics;->areEqual(Ljava/lang/Object;Ljava/lang/Object;)Z
move-result v10
xor-int/lit8 v10, v10, 0x1
if-nez v10, :cond_1
iget v10, p0, Lokhttp3/internal/cache/DiskLruCache;->appVersion:I
.line 272
invoke-static {v10}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;
move-result-object v10
invoke-static {v10, v7}, Lkotlin/jvm/internal/Intrinsics;->areEqual(Ljava/lang/Object;Ljava/lang/Object;)Z
move-result v7
xor-int/lit8 v7, v7, 0x1
if-nez v7, :cond_1
iget v7, p0, Lokhttp3/internal/cache/DiskLruCache;->valueCount:I
.line 273
invoke-static {v7}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;
move-result-object v7
invoke-static {v7, v8}, Lkotlin/jvm/internal/Intrinsics;->areEqual(Ljava/lang/Object;Ljava/lang/Object;)Z
move-result v7
xor-int/lit8 v7, v7, 0x1
if-nez v7, :cond_1
.line 274
move-object v7, v9
check-cast v7, Ljava/lang/CharSequence;
invoke-interface {v7}, Ljava/lang/CharSequence;->length()I
move-result v7
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
if-gtz v7, :cond_1
const/4 v0, 0x0
.line 282
:goto_0
:try_start_1
invoke-interface {v4}, Lokio/BufferedSource;->readUtf8LineStrict()Ljava/lang/String;
move-result-object v1
invoke-direct {p0, v1}, Lokhttp3/internal/cache/DiskLruCache;->readJournalLine(Ljava/lang/String;)V
:try_end_1
.catch Ljava/io/EOFException; {:try_start_1 .. :try_end_1} :catch_0
.catchall {:try_start_1 .. :try_end_1} :catchall_0
add-int/lit8 v0, v0, 0x1
goto :goto_0
:catch_0
:try_start_2
iget-object v1, p0, Lokhttp3/internal/cache/DiskLruCache;->lruEntries:Ljava/util/LinkedHashMap;
.line 289
invoke-virtual {v1}, Ljava/util/LinkedHashMap;->size()I
move-result v1
sub-int/2addr v0, v1
iput v0, p0, Lokhttp3/internal/cache/DiskLruCache;->redundantOpCount:I
.line 292
invoke-interface {v4}, Lokio/BufferedSource;->exhausted()Z
move-result v0
if-nez v0, :cond_0
.line 293
invoke-virtual {p0}, Lokhttp3/internal/cache/DiskLruCache;->rebuildJournal$okhttp()V
goto :goto_1
.line 295
:cond_0
invoke-direct {p0}, Lokhttp3/internal/cache/DiskLruCache;->newJournalWriter()Lokio/BufferedSink;
move-result-object v0
iput-object v0, p0, Lokhttp3/internal/cache/DiskLruCache;->journalWriter:Lokio/BufferedSink;
.line 297
:goto_1
sget-object p0, Lkotlin/Unit;->INSTANCE:Lkotlin/Unit;
:try_end_2
.catchall {:try_start_2 .. :try_end_2} :catchall_0
.line 263
invoke-static {v2, v3}, Lkotlin/io/CloseableKt;->closeFinally(Ljava/io/Closeable;Ljava/lang/Throwable;)V
return-void
.line 275
:cond_1
:try_start_3
new-instance p0, Ljava/io/IOException;
.line 276
new-instance v3, Ljava/lang/StringBuilder;
invoke-direct {v3, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
invoke-virtual {v3, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v1
invoke-virtual {v1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v1
invoke-virtual {v1, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v1
invoke-virtual {v1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v1
invoke-virtual {v1, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v1
invoke-virtual {v1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v0
invoke-virtual {v0, v9}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v0
const/16 v1, 0x5d
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;
move-result-object v0
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v0
.line 275
invoke-direct {p0, v0}, Ljava/io/IOException;-><init>(Ljava/lang/String;)V
check-cast p0, Ljava/lang/Throwable;
throw p0
:try_end_3
.catchall {:try_start_3 .. :try_end_3} :catchall_0
:catchall_0
move-exception p0
.line 263
:try_start_4
throw p0
:try_end_4
.catchall {:try_start_4 .. :try_end_4} :catchall_1
:catchall_1
move-exception v0
invoke-static {v2, p0}, Lkotlin/io/CloseableKt;->closeFinally(Ljava/io/Closeable;Ljava/lang/Throwable;)V
throw v0
.end method
.method private final readJournalLine(Ljava/lang/String;)V
.locals 19
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
move-object/from16 v0, p0
move-object/from16 v1, p1
.line 312
move-object v8, v1
check-cast v8, Ljava/lang/CharSequence;
const/16 v3, 0x20
const/4 v4, 0x0
const/4 v5, 0x0
const/4 v6, 0x6
const/4 v7, 0x0
move-object v2, v8
invoke-static/range {v2 .. v7}, Lkotlin/text/StringsKt;->indexOf$default(Ljava/lang/CharSequence;CIZILjava/lang/Object;)I
move-result v9
const-string v10, "unexpected journal line: "
const/4 v11, -0x1
if-eq v9, v11, :cond_9
add-int/lit8 v12, v9, 0x1
const/16 v3, 0x20
const/4 v5, 0x0
const/4 v6, 0x4
const/4 v7, 0x0
move-object v2, v8
move v4, v12
.line 316
invoke-static/range {v2 .. v7}, Lkotlin/text/StringsKt;->indexOf$default(Ljava/lang/CharSequence;CIZILjava/lang/Object;)I
move-result v2
const-string v3, "(this as java.lang.String).substring(startIndex)"
const-string v4, "null cannot be cast to non-null type java.lang.String"
const/4 v5, 0x2
const/4 v6, 0x0
const/4 v7, 0x0
if-ne v2, v11, :cond_1
if-eqz v1, :cond_0
.line 319
invoke-virtual {v1, v12}, Ljava/lang/String;->substring(I)Ljava/lang/String;
move-result-object v8
invoke-static {v8, v3}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
sget-object v12, Lokhttp3/internal/cache/DiskLruCache;->REMOVE:Ljava/lang/String;
.line 320
invoke-virtual {v12}, Ljava/lang/String;->length()I
move-result v13
if-ne v9, v13, :cond_2
invoke-static {v1, v12, v7, v5, v6}, Lkotlin/text/StringsKt;->startsWith$default(Ljava/lang/String;Ljava/lang/String;ZILjava/lang/Object;)Z
move-result v12
if-eqz v12, :cond_2
iget-object v0, v0, Lokhttp3/internal/cache/DiskLruCache;->lruEntries:Ljava/util/LinkedHashMap;
.line 321
invoke-virtual {v0, v8}, Ljava/util/LinkedHashMap;->remove(Ljava/lang/Object;)Ljava/lang/Object;
return-void
.line 319
:cond_0
new-instance v0, Ljava/lang/NullPointerException;
invoke-direct {v0, v4}, Ljava/lang/NullPointerException;-><init>(Ljava/lang/String;)V
throw v0
:cond_1
if-eqz v1, :cond_8
.line 325
invoke-virtual {v1, v12, v2}, Ljava/lang/String;->substring(II)Ljava/lang/String;
move-result-object v8
const-string v12, "(this as java.lang.Strin\u2026ing(startIndex, endIndex)"
invoke-static {v8, v12}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
:cond_2
iget-object v12, v0, Lokhttp3/internal/cache/DiskLruCache;->lruEntries:Ljava/util/LinkedHashMap;
.line 328
invoke-virtual {v12, v8}, Ljava/util/LinkedHashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object v12
check-cast v12, Lokhttp3/internal/cache/DiskLruCache$Entry;
if-nez v12, :cond_3
.line 330
new-instance v12, Lokhttp3/internal/cache/DiskLruCache$Entry;
invoke-direct {v12, v0, v8}, Lokhttp3/internal/cache/DiskLruCache$Entry;-><init>(Lokhttp3/internal/cache/DiskLruCache;Ljava/lang/String;)V
iget-object v13, v0, Lokhttp3/internal/cache/DiskLruCache;->lruEntries:Ljava/util/LinkedHashMap;
.line 331
check-cast v13, Ljava/util/Map;
invoke-interface {v13, v8, v12}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
:cond_3
if-eq v2, v11, :cond_5
sget-object v8, Lokhttp3/internal/cache/DiskLruCache;->CLEAN:Ljava/lang/String;
.line 335
invoke-virtual {v8}, Ljava/lang/String;->length()I
move-result v13
if-ne v9, v13, :cond_5
invoke-static {v1, v8, v7, v5, v6}, Lkotlin/text/StringsKt;->startsWith$default(Ljava/lang/String;Ljava/lang/String;ZILjava/lang/Object;)Z
move-result v8
if-eqz v8, :cond_5
const/4 v0, 0x1
add-int/2addr v2, v0
if-eqz v1, :cond_4
.line 336
invoke-virtual {v1, v2}, Ljava/lang/String;->substring(I)Ljava/lang/String;
move-result-object v1
invoke-static {v1, v3}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
move-object v13, v1
check-cast v13, Ljava/lang/CharSequence;
new-array v14, v0, [C
const/16 v1, 0x20
aput-char v1, v14, v7
const/4 v15, 0x0
const/16 v16, 0x0
const/16 v17, 0x6
const/16 v18, 0x0
.line 337
invoke-static/range {v13 .. v18}, Lkotlin/text/StringsKt;->split$default(Ljava/lang/CharSequence;[CZIILjava/lang/Object;)Ljava/util/List;
move-result-object v1
.line 338
invoke-virtual {v12, v0}, Lokhttp3/internal/cache/DiskLruCache$Entry;->setReadable$okhttp(Z)V
.line 339
move-object v0, v6
check-cast v0, Lokhttp3/internal/cache/DiskLruCache$Editor;
invoke-virtual {v12, v6}, Lokhttp3/internal/cache/DiskLruCache$Entry;->setCurrentEditor$okhttp(Lokhttp3/internal/cache/DiskLruCache$Editor;)V
.line 340
invoke-virtual {v12, v1}, Lokhttp3/internal/cache/DiskLruCache$Entry;->setLengths$okhttp(Ljava/util/List;)V
goto :goto_0
.line 336
:cond_4
new-instance v0, Ljava/lang/NullPointerException;
invoke-direct {v0, v4}, Ljava/lang/NullPointerException;-><init>(Ljava/lang/String;)V
throw v0
:cond_5
if-ne v2, v11, :cond_6
sget-object v3, Lokhttp3/internal/cache/DiskLruCache;->DIRTY:Ljava/lang/String;
.line 343
invoke-virtual {v3}, Ljava/lang/String;->length()I
move-result v4
if-ne v9, v4, :cond_6
invoke-static {v1, v3, v7, v5, v6}, Lkotlin/text/StringsKt;->startsWith$default(Ljava/lang/String;Ljava/lang/String;ZILjava/lang/Object;)Z
move-result v3
if-eqz v3, :cond_6
.line 344
new-instance v1, Lokhttp3/internal/cache/DiskLruCache$Editor;
invoke-direct {v1, v0, v12}, Lokhttp3/internal/cache/DiskLruCache$Editor;-><init>(Lokhttp3/internal/cache/DiskLruCache;Lokhttp3/internal/cache/DiskLruCache$Entry;)V
invoke-virtual {v12, v1}, Lokhttp3/internal/cache/DiskLruCache$Entry;->setCurrentEditor$okhttp(Lokhttp3/internal/cache/DiskLruCache$Editor;)V
goto :goto_0
:cond_6
if-ne v2, v11, :cond_7
sget-object v0, Lokhttp3/internal/cache/DiskLruCache;->READ:Ljava/lang/String;
.line 347
invoke-virtual {v0}, Ljava/lang/String;->length()I
move-result v2
if-ne v9, v2, :cond_7
invoke-static {v1, v0, v7, v5, v6}, Lkotlin/text/StringsKt;->startsWith$default(Ljava/lang/String;Ljava/lang/String;ZILjava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_7
:goto_0
return-void
.line 351
:cond_7
new-instance v0, Ljava/io/IOException;
new-instance v2, Ljava/lang/StringBuilder;
invoke-direct {v2, v10}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
invoke-virtual {v2, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v1
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v1
invoke-direct {v0, v1}, Ljava/io/IOException;-><init>(Ljava/lang/String;)V
check-cast v0, Ljava/lang/Throwable;
throw v0
.line 325
:cond_8
new-instance v0, Ljava/lang/NullPointerException;
invoke-direct {v0, v4}, Ljava/lang/NullPointerException;-><init>(Ljava/lang/String;)V
throw v0
.line 313
:cond_9
new-instance v0, Ljava/io/IOException;
new-instance v2, Ljava/lang/StringBuilder;
invoke-direct {v2, v10}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
invoke-virtual {v2, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v1
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v1
invoke-direct {v0, v1}, Ljava/io/IOException;-><init>(Ljava/lang/String;)V
check-cast v0, Ljava/lang/Throwable;
throw v0
.end method
.method private final removeOldestEntry()Z
.locals 3
iget-object v0, p0, Lokhttp3/internal/cache/DiskLruCache;->lruEntries:Ljava/util/LinkedHashMap;
.line 694
invoke-virtual {v0}, Ljava/util/LinkedHashMap;->values()Ljava/util/Collection;
move-result-object v0
invoke-interface {v0}, Ljava/util/Collection;->iterator()Ljava/util/Iterator;
move-result-object v0
:cond_0
invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
move-result v1
if-eqz v1, :cond_1
invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v1
check-cast v1, Lokhttp3/internal/cache/DiskLruCache$Entry;
.line 695
invoke-virtual {v1}, Lokhttp3/internal/cache/DiskLruCache$Entry;->getZombie$okhttp()Z
move-result v2
if-nez v2, :cond_0
const-string v0, "toEvict"
.line 696
invoke-static {v1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
invoke-virtual {p0, v1}, Lokhttp3/internal/cache/DiskLruCache;->removeEntry$okhttp(Lokhttp3/internal/cache/DiskLruCache$Entry;)Z
const/4 p0, 0x1
return p0
:cond_1
const/4 p0, 0x0
return p0
.end method
.method private final validateKey(Ljava/lang/String;)V
.locals 1
sget-object p0, Lokhttp3/internal/cache/DiskLruCache;->LEGAL_KEY_PATTERN:Lkotlin/text/Regex;
.line 728
move-object v0, p1
check-cast v0, Ljava/lang/CharSequence;
invoke-virtual {p0, v0}, Lkotlin/text/Regex;->matches(Ljava/lang/CharSequence;)Z
move-result p0
if-eqz p0, :cond_0
return-void
:cond_0
new-instance p0, Ljava/lang/StringBuilder;
const-string v0, "keys must match regex [a-z0-9_-]{1,120}: \""
invoke-direct {p0, v0}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
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
new-instance p1, Ljava/lang/IllegalArgumentException;
invoke-virtual {p0}, Ljava/lang/Object;->toString()Ljava/lang/String;
move-result-object p0
invoke-direct {p1, p0}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
check-cast p1, Ljava/lang/Throwable;
throw p1
.end method
# virtual methods
.method public declared-synchronized close()V
.locals 6
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
monitor-enter p0
:try_start_0
iget-boolean v0, p0, Lokhttp3/internal/cache/DiskLruCache;->initialized:Z
const/4 v1, 0x1
if-eqz v0, :cond_4
iget-boolean v0, p0, Lokhttp3/internal/cache/DiskLruCache;->closed:Z
if-eqz v0, :cond_0
goto :goto_1
:cond_0
iget-object v0, p0, Lokhttp3/internal/cache/DiskLruCache;->lruEntries:Ljava/util/LinkedHashMap;
.line 672
invoke-virtual {v0}, Ljava/util/LinkedHashMap;->values()Ljava/util/Collection;
move-result-object v0
const-string v2, "lruEntries.values"
invoke-static {v0, v2}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
const/4 v2, 0x0
new-array v3, v2, [Lokhttp3/internal/cache/DiskLruCache$Entry;
.line 1072
invoke-interface {v0, v3}, Ljava/util/Collection;->toArray([Ljava/lang/Object;)[Ljava/lang/Object;
move-result-object v0
if-eqz v0, :cond_3
check-cast v0, [Lokhttp3/internal/cache/DiskLruCache$Entry;
array-length v3, v0
:goto_0
if-ge v2, v3, :cond_2
.line 672
aget-object v4, v0, v2
.line 673
invoke-virtual {v4}, Lokhttp3/internal/cache/DiskLruCache$Entry;->getCurrentEditor$okhttp()Lokhttp3/internal/cache/DiskLruCache$Editor;
move-result-object v5
if-eqz v5, :cond_1
.line 674
invoke-virtual {v4}, Lokhttp3/internal/cache/DiskLruCache$Entry;->getCurrentEditor$okhttp()Lokhttp3/internal/cache/DiskLruCache$Editor;
move-result-object v4
if-eqz v4, :cond_1
invoke-virtual {v4}, Lokhttp3/internal/cache/DiskLruCache$Editor;->detach$okhttp()V
:cond_1
add-int/lit8 v2, v2, 0x1
goto :goto_0
.line 678
:cond_2
invoke-virtual {p0}, Lokhttp3/internal/cache/DiskLruCache;->trimToSize()V
iget-object v0, p0, Lokhttp3/internal/cache/DiskLruCache;->journalWriter:Lokio/BufferedSink;
.line 679
invoke-static {v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNull(Ljava/lang/Object;)V
invoke-interface {v0}, Lokio/BufferedSink;->close()V
const/4 v0, 0x0
.line 680
move-object v2, v0
check-cast v2, Lokio/BufferedSink;
iput-object v0, p0, Lokhttp3/internal/cache/DiskLruCache;->journalWriter:Lokio/BufferedSink;
iput-boolean v1, p0, Lokhttp3/internal/cache/DiskLruCache;->closed:Z
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
.line 682
monitor-exit p0
return-void
.line 1072
:cond_3
:try_start_1
new-instance v0, Ljava/lang/NullPointerException;
const-string v1, "null cannot be cast to non-null type kotlin.Array<T>"
invoke-direct {v0, v1}, Ljava/lang/NullPointerException;-><init>(Ljava/lang/String;)V
throw v0
:cond_4
:goto_1
iput-boolean v1, p0, Lokhttp3/internal/cache/DiskLruCache;->closed:Z
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
.line 668
monitor-exit p0
return-void
:catchall_0
move-exception v0
monitor-exit p0
throw v0
.end method
.method public final declared-synchronized completeEdit$okhttp(Lokhttp3/internal/cache/DiskLruCache$Editor;Z)V
.locals 8
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
monitor-enter p0
:try_start_0
const-string v0, "editor"
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
.line 510
invoke-virtual {p1}, Lokhttp3/internal/cache/DiskLruCache$Editor;->getEntry$okhttp()Lokhttp3/internal/cache/DiskLruCache$Entry;
move-result-object v0
.line 511
invoke-virtual {v0}, Lokhttp3/internal/cache/DiskLruCache$Entry;->getCurrentEditor$okhttp()Lokhttp3/internal/cache/DiskLruCache$Editor;
move-result-object v1
invoke-static {v1, p1}, Lkotlin/jvm/internal/Intrinsics;->areEqual(Ljava/lang/Object;Ljava/lang/Object;)Z
move-result v1
if-eqz v1, :cond_c
const/4 v1, 0x0
if-eqz p2, :cond_2
.line 514
invoke-virtual {v0}, Lokhttp3/internal/cache/DiskLruCache$Entry;->getReadable$okhttp()Z
move-result v2
if-nez v2, :cond_2
iget v2, p0, Lokhttp3/internal/cache/DiskLruCache;->valueCount:I
move v3, v1
:goto_0
if-ge v3, v2, :cond_2
.line 516
invoke-virtual {p1}, Lokhttp3/internal/cache/DiskLruCache$Editor;->getWritten$okhttp()[Z
move-result-object v4
invoke-static {v4}, Lkotlin/jvm/internal/Intrinsics;->checkNotNull(Ljava/lang/Object;)V
aget-boolean v4, v4, v3
if-eqz v4, :cond_1
iget-object v4, p0, Lokhttp3/internal/cache/DiskLruCache;->fileSystem:Lokhttp3/internal/io/FileSystem;
.line 520
invoke-virtual {v0}, Lokhttp3/internal/cache/DiskLruCache$Entry;->getDirtyFiles$okhttp()Ljava/util/List;
move-result-object v5
invoke-interface {v5, v3}, Ljava/util/List;->get(I)Ljava/lang/Object;
move-result-object v5
check-cast v5, Ljava/io/File;
invoke-interface {v4, v5}, Lokhttp3/internal/io/FileSystem;->exists(Ljava/io/File;)Z
move-result v4
if-nez v4, :cond_0
.line 521
invoke-virtual {p1}, Lokhttp3/internal/cache/DiskLruCache$Editor;->abort()V
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
.line 522
monitor-exit p0
return-void
:cond_0
add-int/lit8 v3, v3, 0x1
goto :goto_0
.line 517
:cond_1
:try_start_1
invoke-virtual {p1}, Lokhttp3/internal/cache/DiskLruCache$Editor;->abort()V
.line 518
new-instance p1, Ljava/lang/IllegalStateException;
new-instance p2, Ljava/lang/StringBuilder;
invoke-direct {p2}, Ljava/lang/StringBuilder;-><init>()V
const-string v0, "Newly created entry didn\'t create value for index "
invoke-virtual {p2, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object p2
invoke-virtual {p2, v3}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
move-result-object p2
invoke-virtual {p2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p2
invoke-direct {p1, p2}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
check-cast p1, Ljava/lang/Throwable;
throw p1
:cond_2
iget p1, p0, Lokhttp3/internal/cache/DiskLruCache;->valueCount:I
:goto_1
if-ge v1, p1, :cond_5
.line 528
invoke-virtual {v0}, Lokhttp3/internal/cache/DiskLruCache$Entry;->getDirtyFiles$okhttp()Ljava/util/List;
move-result-object v2
invoke-interface {v2, v1}, Ljava/util/List;->get(I)Ljava/lang/Object;
move-result-object v2
check-cast v2, Ljava/io/File;
if-eqz p2, :cond_3
.line 529
invoke-virtual {v0}, Lokhttp3/internal/cache/DiskLruCache$Entry;->getZombie$okhttp()Z
move-result v3
if-nez v3, :cond_3
iget-object v3, p0, Lokhttp3/internal/cache/DiskLruCache;->fileSystem:Lokhttp3/internal/io/FileSystem;
.line 530
invoke-interface {v3, v2}, Lokhttp3/internal/io/FileSystem;->exists(Ljava/io/File;)Z
move-result v3
if-eqz v3, :cond_4
.line 531
invoke-virtual {v0}, Lokhttp3/internal/cache/DiskLruCache$Entry;->getCleanFiles$okhttp()Ljava/util/List;
move-result-object v3
invoke-interface {v3, v1}, Ljava/util/List;->get(I)Ljava/lang/Object;
move-result-object v3
check-cast v3, Ljava/io/File;
iget-object v4, p0, Lokhttp3/internal/cache/DiskLruCache;->fileSystem:Lokhttp3/internal/io/FileSystem;
.line 532
invoke-interface {v4, v2, v3}, Lokhttp3/internal/io/FileSystem;->rename(Ljava/io/File;Ljava/io/File;)V
.line 533
invoke-virtual {v0}, Lokhttp3/internal/cache/DiskLruCache$Entry;->getLengths$okhttp()[J
move-result-object v2
aget-wide v4, v2, v1
iget-object v2, p0, Lokhttp3/internal/cache/DiskLruCache;->fileSystem:Lokhttp3/internal/io/FileSystem;
.line 534
invoke-interface {v2, v3}, Lokhttp3/internal/io/FileSystem;->size(Ljava/io/File;)J
move-result-wide v2
.line 535
invoke-virtual {v0}, Lokhttp3/internal/cache/DiskLruCache$Entry;->getLengths$okhttp()[J
move-result-object v6
aput-wide v2, v6, v1
iget-wide v6, p0, Lokhttp3/internal/cache/DiskLruCache;->size:J
sub-long/2addr v6, v4
add-long/2addr v6, v2
iput-wide v6, p0, Lokhttp3/internal/cache/DiskLruCache;->size:J
goto :goto_2
:cond_3
iget-object v3, p0, Lokhttp3/internal/cache/DiskLruCache;->fileSystem:Lokhttp3/internal/io/FileSystem;
.line 539
invoke-interface {v3, v2}, Lokhttp3/internal/io/FileSystem;->delete(Ljava/io/File;)V
:cond_4
:goto_2
add-int/lit8 v1, v1, 0x1
goto :goto_1
:cond_5
const/4 p1, 0x0
.line 543
move-object v1, p1
check-cast v1, Lokhttp3/internal/cache/DiskLruCache$Editor;
invoke-virtual {v0, p1}, Lokhttp3/internal/cache/DiskLruCache$Entry;->setCurrentEditor$okhttp(Lokhttp3/internal/cache/DiskLruCache$Editor;)V
.line 544
invoke-virtual {v0}, Lokhttp3/internal/cache/DiskLruCache$Entry;->getZombie$okhttp()Z
move-result p1
if-eqz p1, :cond_6
.line 545
invoke-virtual {p0, v0}, Lokhttp3/internal/cache/DiskLruCache;->removeEntry$okhttp(Lokhttp3/internal/cache/DiskLruCache$Entry;)Z
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
.line 546
monitor-exit p0
return-void
:cond_6
:try_start_2
iget p1, p0, Lokhttp3/internal/cache/DiskLruCache;->redundantOpCount:I
const/4 v1, 0x1
add-int/2addr p1, v1
iput p1, p0, Lokhttp3/internal/cache/DiskLruCache;->redundantOpCount:I
iget-object p1, p0, Lokhttp3/internal/cache/DiskLruCache;->journalWriter:Lokio/BufferedSink;
.line 550
invoke-static {p1}, Lkotlin/jvm/internal/Intrinsics;->checkNotNull(Ljava/lang/Object;)V
.line 551
invoke-virtual {v0}, Lokhttp3/internal/cache/DiskLruCache$Entry;->getReadable$okhttp()Z
move-result v2
const/16 v3, 0xa
const/16 v4, 0x20
if-nez v2, :cond_8
if-eqz p2, :cond_7
goto :goto_3
:cond_7
iget-object p2, p0, Lokhttp3/internal/cache/DiskLruCache;->lruEntries:Ljava/util/LinkedHashMap;
.line 561
invoke-virtual {v0}, Lokhttp3/internal/cache/DiskLruCache$Entry;->getKey$okhttp()Ljava/lang/String;
move-result-object v1
invoke-virtual {p2, v1}, Ljava/util/LinkedHashMap;->remove(Ljava/lang/Object;)Ljava/lang/Object;
sget-object p2, Lokhttp3/internal/cache/DiskLruCache;->REMOVE:Ljava/lang/String;
.line 562
invoke-interface {p1, p2}, Lokio/BufferedSink;->writeUtf8(Ljava/lang/String;)Lokio/BufferedSink;
move-result-object p2
invoke-interface {p2, v4}, Lokio/BufferedSink;->writeByte(I)Lokio/BufferedSink;
.line 563
invoke-virtual {v0}, Lokhttp3/internal/cache/DiskLruCache$Entry;->getKey$okhttp()Ljava/lang/String;
move-result-object p2
invoke-interface {p1, p2}, Lokio/BufferedSink;->writeUtf8(Ljava/lang/String;)Lokio/BufferedSink;
.line 564
invoke-interface {p1, v3}, Lokio/BufferedSink;->writeByte(I)Lokio/BufferedSink;
goto :goto_4
.line 552
:cond_8
:goto_3
invoke-virtual {v0, v1}, Lokhttp3/internal/cache/DiskLruCache$Entry;->setReadable$okhttp(Z)V
sget-object v1, Lokhttp3/internal/cache/DiskLruCache;->CLEAN:Ljava/lang/String;
.line 553
invoke-interface {p1, v1}, Lokio/BufferedSink;->writeUtf8(Ljava/lang/String;)Lokio/BufferedSink;
move-result-object v1
invoke-interface {v1, v4}, Lokio/BufferedSink;->writeByte(I)Lokio/BufferedSink;
.line 554
invoke-virtual {v0}, Lokhttp3/internal/cache/DiskLruCache$Entry;->getKey$okhttp()Ljava/lang/String;
move-result-object v1
invoke-interface {p1, v1}, Lokio/BufferedSink;->writeUtf8(Ljava/lang/String;)Lokio/BufferedSink;
.line 555
invoke-virtual {v0, p1}, Lokhttp3/internal/cache/DiskLruCache$Entry;->writeLengths$okhttp(Lokio/BufferedSink;)V
.line 556
invoke-interface {p1, v3}, Lokio/BufferedSink;->writeByte(I)Lokio/BufferedSink;
if-eqz p2, :cond_9
iget-wide v1, p0, Lokhttp3/internal/cache/DiskLruCache;->nextSequenceNumber:J
const-wide/16 v3, 0x1
add-long/2addr v3, v1
iput-wide v3, p0, Lokhttp3/internal/cache/DiskLruCache;->nextSequenceNumber:J
.line 558
invoke-virtual {v0, v1, v2}, Lokhttp3/internal/cache/DiskLruCache$Entry;->setSequenceNumber$okhttp(J)V
.line 566
:cond_9
:goto_4
invoke-interface {p1}, Lokio/BufferedSink;->flush()V
iget-wide p1, p0, Lokhttp3/internal/cache/DiskLruCache;->size:J
iget-wide v0, p0, Lokhttp3/internal/cache/DiskLruCache;->maxSize:J
cmp-long p1, p1, v0
if-gtz p1, :cond_a
.line 569
invoke-direct {p0}, Lokhttp3/internal/cache/DiskLruCache;->journalRebuildRequired()Z
move-result p1
if-eqz p1, :cond_b
:cond_a
iget-object v0, p0, Lokhttp3/internal/cache/DiskLruCache;->cleanupQueue:Lokhttp3/internal/concurrent/TaskQueue;
iget-object p1, p0, Lokhttp3/internal/cache/DiskLruCache;->cleanupTask:Lokhttp3/internal/cache/DiskLruCache$cleanupTask$1;
.line 570
move-object v1, p1
check-cast v1, Lokhttp3/internal/concurrent/Task;
const-wide/16 v2, 0x0
const/4 v4, 0x2
const/4 v5, 0x0
invoke-static/range {v0 .. v5}, Lokhttp3/internal/concurrent/TaskQueue;->schedule$default(Lokhttp3/internal/concurrent/TaskQueue;Lokhttp3/internal/concurrent/Task;JILjava/lang/Object;)V
:try_end_2
.catchall {:try_start_2 .. :try_end_2} :catchall_0
.line 572
:cond_b
monitor-exit p0
return-void
:cond_c
:try_start_3
const-string p1, "Check failed."
.line 511
new-instance p2, Ljava/lang/IllegalStateException;
invoke-virtual {p1}, Ljava/lang/Object;->toString()Ljava/lang/String;
move-result-object p1
invoke-direct {p2, p1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
check-cast p2, Ljava/lang/Throwable;
throw p2
:try_end_3
.catchall {:try_start_3 .. :try_end_3} :catchall_0
:catchall_0
move-exception p1
monitor-exit p0
throw p1
.end method
.method public final delete()V
.locals 1
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 709
invoke-virtual {p0}, Lokhttp3/internal/cache/DiskLruCache;->close()V
iget-object v0, p0, Lokhttp3/internal/cache/DiskLruCache;->fileSystem:Lokhttp3/internal/io/FileSystem;
iget-object p0, p0, Lokhttp3/internal/cache/DiskLruCache;->directory:Ljava/io/File;
.line 710
invoke-interface {v0, p0}, Lokhttp3/internal/io/FileSystem;->deleteContents(Ljava/io/File;)V
return-void
.end method
.method public final edit(Ljava/lang/String;)Lokhttp3/internal/cache/DiskLruCache$Editor;
.locals 6
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
const-wide/16 v2, 0x0
const/4 v4, 0x2
const/4 v5, 0x0
move-object v0, p0
move-object v1, p1
invoke-static/range {v0 .. v5}, Lokhttp3/internal/cache/DiskLruCache;->edit$default(Lokhttp3/internal/cache/DiskLruCache;Ljava/lang/String;JILjava/lang/Object;)Lokhttp3/internal/cache/DiskLruCache$Editor;
move-result-object p0
return-object p0
.end method
.method public final declared-synchronized edit(Ljava/lang/String;J)Lokhttp3/internal/cache/DiskLruCache$Editor;
.locals 9
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
monitor-enter p0
:try_start_0
const-string v0, "key"
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
.line 449
invoke-virtual {p0}, Lokhttp3/internal/cache/DiskLruCache;->initialize()V
.line 451
invoke-direct {p0}, Lokhttp3/internal/cache/DiskLruCache;->checkNotClosed()V
.line 452
invoke-direct {p0, p1}, Lokhttp3/internal/cache/DiskLruCache;->validateKey(Ljava/lang/String;)V
iget-object v0, p0, Lokhttp3/internal/cache/DiskLruCache;->lruEntries:Ljava/util/LinkedHashMap;
.line 453
invoke-virtual {v0, p1}, Ljava/util/LinkedHashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object v0
check-cast v0, Lokhttp3/internal/cache/DiskLruCache$Entry;
sget-wide v1, Lokhttp3/internal/cache/DiskLruCache;->ANY_SEQUENCE_NUMBER:J
cmp-long v1, p2, v1
const/4 v2, 0x0
if-eqz v1, :cond_1
if-eqz v0, :cond_0
.line 455
invoke-virtual {v0}, Lokhttp3/internal/cache/DiskLruCache$Entry;->getSequenceNumber$okhttp()J
move-result-wide v3
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
cmp-long p2, v3, p2
if-eqz p2, :cond_1
.line 456
:cond_0
monitor-exit p0
return-object v2
:cond_1
if-eqz v0, :cond_2
.line 459
:try_start_1
invoke-virtual {v0}, Lokhttp3/internal/cache/DiskLruCache$Entry;->getCurrentEditor$okhttp()Lokhttp3/internal/cache/DiskLruCache$Editor;
move-result-object p2
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
goto :goto_0
:cond_2
move-object p2, v2
:goto_0
if-eqz p2, :cond_3
.line 460
monitor-exit p0
return-object v2
:cond_3
if-eqz v0, :cond_4
.line 463
:try_start_2
invoke-virtual {v0}, Lokhttp3/internal/cache/DiskLruCache$Entry;->getLockingSourceCount$okhttp()I
move-result p2
:try_end_2
.catchall {:try_start_2 .. :try_end_2} :catchall_0
if-eqz p2, :cond_4
.line 464
monitor-exit p0
return-object v2
:cond_4
:try_start_3
iget-boolean p2, p0, Lokhttp3/internal/cache/DiskLruCache;->mostRecentTrimFailed:Z
if-nez p2, :cond_8
iget-boolean p2, p0, Lokhttp3/internal/cache/DiskLruCache;->mostRecentRebuildFailed:Z
if-eqz p2, :cond_5
goto :goto_1
:cond_5
iget-object p2, p0, Lokhttp3/internal/cache/DiskLruCache;->journalWriter:Lokio/BufferedSink;
.line 478
invoke-static {p2}, Lkotlin/jvm/internal/Intrinsics;->checkNotNull(Ljava/lang/Object;)V
sget-object p3, Lokhttp3/internal/cache/DiskLruCache;->DIRTY:Ljava/lang/String;
.line 479
invoke-interface {p2, p3}, Lokio/BufferedSink;->writeUtf8(Ljava/lang/String;)Lokio/BufferedSink;
move-result-object p3
const/16 v1, 0x20
.line 480
invoke-interface {p3, v1}, Lokio/BufferedSink;->writeByte(I)Lokio/BufferedSink;
move-result-object p3
.line 481
invoke-interface {p3, p1}, Lokio/BufferedSink;->writeUtf8(Ljava/lang/String;)Lokio/BufferedSink;
move-result-object p3
const/16 v1, 0xa
.line 482
invoke-interface {p3, v1}, Lokio/BufferedSink;->writeByte(I)Lokio/BufferedSink;
.line 483
invoke-interface {p2}, Lokio/BufferedSink;->flush()V
iget-boolean p2, p0, Lokhttp3/internal/cache/DiskLruCache;->hasJournalErrors:Z
:try_end_3
.catchall {:try_start_3 .. :try_end_3} :catchall_0
if-eqz p2, :cond_6
.line 486
monitor-exit p0
return-object v2
:cond_6
if-nez v0, :cond_7
.line 490
:try_start_4
new-instance v0, Lokhttp3/internal/cache/DiskLruCache$Entry;
invoke-direct {v0, p0, p1}, Lokhttp3/internal/cache/DiskLruCache$Entry;-><init>(Lokhttp3/internal/cache/DiskLruCache;Ljava/lang/String;)V
iget-object p2, p0, Lokhttp3/internal/cache/DiskLruCache;->lruEntries:Ljava/util/LinkedHashMap;
.line 491
check-cast p2, Ljava/util/Map;
invoke-interface {p2, p1, v0}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
.line 493
:cond_7
new-instance p1, Lokhttp3/internal/cache/DiskLruCache$Editor;
invoke-direct {p1, p0, v0}, Lokhttp3/internal/cache/DiskLruCache$Editor;-><init>(Lokhttp3/internal/cache/DiskLruCache;Lokhttp3/internal/cache/DiskLruCache$Entry;)V
.line 494
invoke-virtual {v0, p1}, Lokhttp3/internal/cache/DiskLruCache$Entry;->setCurrentEditor$okhttp(Lokhttp3/internal/cache/DiskLruCache$Editor;)V
:try_end_4
.catchall {:try_start_4 .. :try_end_4} :catchall_0
.line 495
monitor-exit p0
return-object p1
:cond_8
:goto_1
:try_start_5
iget-object v3, p0, Lokhttp3/internal/cache/DiskLruCache;->cleanupQueue:Lokhttp3/internal/concurrent/TaskQueue;
iget-object p1, p0, Lokhttp3/internal/cache/DiskLruCache;->cleanupTask:Lokhttp3/internal/cache/DiskLruCache$cleanupTask$1;
.line 473
move-object v4, p1
check-cast v4, Lokhttp3/internal/concurrent/Task;
const-wide/16 v5, 0x0
const/4 v7, 0x2
const/4 v8, 0x0
invoke-static/range {v3 .. v8}, Lokhttp3/internal/concurrent/TaskQueue;->schedule$default(Lokhttp3/internal/concurrent/TaskQueue;Lokhttp3/internal/concurrent/Task;JILjava/lang/Object;)V
:try_end_5
.catchall {:try_start_5 .. :try_end_5} :catchall_0
.line 474
monitor-exit p0
return-object v2
:catchall_0
move-exception p1
monitor-exit p0
throw p1
.end method
.method public final declared-synchronized evictAll()V
.locals 6
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
monitor-enter p0
.line 719
:try_start_0
invoke-virtual {p0}, Lokhttp3/internal/cache/DiskLruCache;->initialize()V
iget-object v0, p0, Lokhttp3/internal/cache/DiskLruCache;->lruEntries:Ljava/util/LinkedHashMap;
.line 721
invoke-virtual {v0}, Ljava/util/LinkedHashMap;->values()Ljava/util/Collection;
move-result-object v0
const-string v1, "lruEntries.values"
invoke-static {v0, v1}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
const/4 v1, 0x0
new-array v2, v1, [Lokhttp3/internal/cache/DiskLruCache$Entry;
.line 1074
invoke-interface {v0, v2}, Ljava/util/Collection;->toArray([Ljava/lang/Object;)[Ljava/lang/Object;
move-result-object v0
if-eqz v0, :cond_1
check-cast v0, [Lokhttp3/internal/cache/DiskLruCache$Entry;
array-length v2, v0
move v3, v1
:goto_0
if-ge v3, v2, :cond_0
.line 721
aget-object v4, v0, v3
const-string v5, "entry"
.line 722
invoke-static {v4, v5}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
invoke-virtual {p0, v4}, Lokhttp3/internal/cache/DiskLruCache;->removeEntry$okhttp(Lokhttp3/internal/cache/DiskLruCache$Entry;)Z
add-int/lit8 v3, v3, 0x1
goto :goto_0
:cond_0
iput-boolean v1, p0, Lokhttp3/internal/cache/DiskLruCache;->mostRecentTrimFailed:Z
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
.line 725
monitor-exit p0
return-void
.line 1074
:cond_1
:try_start_1
new-instance v0, Ljava/lang/NullPointerException;
const-string v1, "null cannot be cast to non-null type kotlin.Array<T>"
invoke-direct {v0, v1}, Ljava/lang/NullPointerException;-><init>(Ljava/lang/String;)V
throw v0
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
:catchall_0
move-exception v0
monitor-exit p0
throw v0
.end method
.method public declared-synchronized flush()V
.locals 1
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
monitor-enter p0
:try_start_0
iget-boolean v0, p0, Lokhttp3/internal/cache/DiskLruCache;->initialized:Z
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
if-nez v0, :cond_0
.line 654
monitor-exit p0
return-void
.line 656
:cond_0
:try_start_1
invoke-direct {p0}, Lokhttp3/internal/cache/DiskLruCache;->checkNotClosed()V
.line 657
invoke-virtual {p0}, Lokhttp3/internal/cache/DiskLruCache;->trimToSize()V
iget-object v0, p0, Lokhttp3/internal/cache/DiskLruCache;->journalWriter:Lokio/BufferedSink;
.line 658
invoke-static {v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNull(Ljava/lang/Object;)V
invoke-interface {v0}, Lokio/BufferedSink;->flush()V
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
.line 659
monitor-exit p0
return-void
:catchall_0
move-exception v0
monitor-exit p0
throw v0
.end method
.method public final declared-synchronized get(Ljava/lang/String;)Lokhttp3/internal/cache/DiskLruCache$Snapshot;
.locals 7
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
monitor-enter p0
:try_start_0
const-string v0, "key"
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
.line 426
invoke-virtual {p0}, Lokhttp3/internal/cache/DiskLruCache;->initialize()V
.line 428
invoke-direct {p0}, Lokhttp3/internal/cache/DiskLruCache;->checkNotClosed()V
.line 429
invoke-direct {p0, p1}, Lokhttp3/internal/cache/DiskLruCache;->validateKey(Ljava/lang/String;)V
iget-object v0, p0, Lokhttp3/internal/cache/DiskLruCache;->lruEntries:Ljava/util/LinkedHashMap;
.line 430
invoke-virtual {v0, p1}, Ljava/util/LinkedHashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object v0
check-cast v0, Lokhttp3/internal/cache/DiskLruCache$Entry;
const/4 v1, 0x0
if-eqz v0, :cond_2
const-string v2, "lruEntries[key] ?: return null"
invoke-static {v0, v2}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
.line 431
invoke-virtual {v0}, Lokhttp3/internal/cache/DiskLruCache$Entry;->snapshot$okhttp()Lokhttp3/internal/cache/DiskLruCache$Snapshot;
move-result-object v0
if-eqz v0, :cond_1
iget v1, p0, Lokhttp3/internal/cache/DiskLruCache;->redundantOpCount:I
add-int/lit8 v1, v1, 0x1
iput v1, p0, Lokhttp3/internal/cache/DiskLruCache;->redundantOpCount:I
iget-object v1, p0, Lokhttp3/internal/cache/DiskLruCache;->journalWriter:Lokio/BufferedSink;
.line 434
invoke-static {v1}, Lkotlin/jvm/internal/Intrinsics;->checkNotNull(Ljava/lang/Object;)V
sget-object v2, Lokhttp3/internal/cache/DiskLruCache;->READ:Ljava/lang/String;
invoke-interface {v1, v2}, Lokio/BufferedSink;->writeUtf8(Ljava/lang/String;)Lokio/BufferedSink;
move-result-object v1
const/16 v2, 0x20
.line 435
invoke-interface {v1, v2}, Lokio/BufferedSink;->writeByte(I)Lokio/BufferedSink;
move-result-object v1
.line 436
invoke-interface {v1, p1}, Lokio/BufferedSink;->writeUtf8(Ljava/lang/String;)Lokio/BufferedSink;
move-result-object p1
const/16 v1, 0xa
.line 437
invoke-interface {p1, v1}, Lokio/BufferedSink;->writeByte(I)Lokio/BufferedSink;
.line 438
invoke-direct {p0}, Lokhttp3/internal/cache/DiskLruCache;->journalRebuildRequired()Z
move-result p1
if-eqz p1, :cond_0
iget-object v1, p0, Lokhttp3/internal/cache/DiskLruCache;->cleanupQueue:Lokhttp3/internal/concurrent/TaskQueue;
iget-object p1, p0, Lokhttp3/internal/cache/DiskLruCache;->cleanupTask:Lokhttp3/internal/cache/DiskLruCache$cleanupTask$1;
.line 439
move-object v2, p1
check-cast v2, Lokhttp3/internal/concurrent/Task;
const-wide/16 v3, 0x0
const/4 v5, 0x2
const/4 v6, 0x0
invoke-static/range {v1 .. v6}, Lokhttp3/internal/concurrent/TaskQueue;->schedule$default(Lokhttp3/internal/concurrent/TaskQueue;Lokhttp3/internal/concurrent/Task;JILjava/lang/Object;)V
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
.line 442
:cond_0
monitor-exit p0
return-object v0
.line 431
:cond_1
monitor-exit p0
return-object v1
.line 430
:cond_2
monitor-exit p0
return-object v1
:catchall_0
move-exception p1
monitor-exit p0
throw p1
.end method
.method public final getClosed$okhttp()Z
.locals 0
iget-boolean p0, p0, Lokhttp3/internal/cache/DiskLruCache;->closed:Z
return p0
.end method
.method public final getDirectory()Ljava/io/File;
.locals 0
iget-object p0, p0, Lokhttp3/internal/cache/DiskLruCache;->directory:Ljava/io/File;
return-object p0
.end method
.method public final getFileSystem$okhttp()Lokhttp3/internal/io/FileSystem;
.locals 0
iget-object p0, p0, Lokhttp3/internal/cache/DiskLruCache;->fileSystem:Lokhttp3/internal/io/FileSystem;
return-object p0
.end method
.method public final getLruEntries$okhttp()Ljava/util/LinkedHashMap;
.locals 0
.annotation system Ldalvik/annotation/Signature;
value = {
"()",
"Ljava/util/LinkedHashMap<",
"Ljava/lang/String;",
"Lokhttp3/internal/cache/DiskLruCache$Entry;",
">;"
}
.end annotation
iget-object p0, p0, Lokhttp3/internal/cache/DiskLruCache;->lruEntries:Ljava/util/LinkedHashMap;
return-object p0
.end method
.method public final declared-synchronized getMaxSize()J
.locals 2
monitor-enter p0
:try_start_0
iget-wide v0, p0, Lokhttp3/internal/cache/DiskLruCache;->maxSize:J
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
.line 104
monitor-exit p0
return-wide v0
:catchall_0
move-exception v0
monitor-exit p0
throw v0
.end method
.method public final getValueCount$okhttp()I
.locals 0
iget p0, p0, Lokhttp3/internal/cache/DiskLruCache;->valueCount:I
return p0
.end method
.method public final declared-synchronized initialize()V
.locals 5
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
const-string v0, "DiskLruCache "
const-string v1, "Thread "
monitor-enter p0
.line 1066
:try_start_0
sget-boolean v2, Lokhttp3/internal/Util;->assertionsEnabled:Z
if-eqz v2, :cond_1
invoke-static {p0}, Ljava/lang/Thread;->holdsLock(Ljava/lang/Object;)Z
move-result v2
if-eqz v2, :cond_0
goto :goto_0
.line 1067
:cond_0
new-instance v0, Ljava/lang/AssertionError;
new-instance v2, Ljava/lang/StringBuilder;
invoke-direct {v2, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
invoke-static {}, Ljava/lang/Thread;->currentThread()Ljava/lang/Thread;
move-result-object v1
const-string v3, "Thread.currentThread()"
invoke-static {v1, v3}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
invoke-virtual {v1}, Ljava/lang/Thread;->getName()Ljava/lang/String;
move-result-object v1
invoke-virtual {v2, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v1
const-string v2, " MUST hold lock on "
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v1
invoke-virtual {v1, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
move-result-object v1
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v1
invoke-direct {v0, v1}, Ljava/lang/AssertionError;-><init>(Ljava/lang/Object;)V
check-cast v0, Ljava/lang/Throwable;
throw v0
:cond_1
:goto_0
iget-boolean v1, p0, Lokhttp3/internal/cache/DiskLruCache;->initialized:Z
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_1
if-eqz v1, :cond_2
.line 218
monitor-exit p0
return-void
:cond_2
:try_start_1
iget-object v1, p0, Lokhttp3/internal/cache/DiskLruCache;->fileSystem:Lokhttp3/internal/io/FileSystem;
iget-object v2, p0, Lokhttp3/internal/cache/DiskLruCache;->journalFileBackup:Ljava/io/File;
.line 222
invoke-interface {v1, v2}, Lokhttp3/internal/io/FileSystem;->exists(Ljava/io/File;)Z
move-result v1
if-eqz v1, :cond_4
iget-object v1, p0, Lokhttp3/internal/cache/DiskLruCache;->fileSystem:Lokhttp3/internal/io/FileSystem;
iget-object v2, p0, Lokhttp3/internal/cache/DiskLruCache;->journalFile:Ljava/io/File;
.line 224
invoke-interface {v1, v2}, Lokhttp3/internal/io/FileSystem;->exists(Ljava/io/File;)Z
move-result v1
if-eqz v1, :cond_3
iget-object v1, p0, Lokhttp3/internal/cache/DiskLruCache;->fileSystem:Lokhttp3/internal/io/FileSystem;
iget-object v2, p0, Lokhttp3/internal/cache/DiskLruCache;->journalFileBackup:Ljava/io/File;
.line 225
invoke-interface {v1, v2}, Lokhttp3/internal/io/FileSystem;->delete(Ljava/io/File;)V
goto :goto_1
:cond_3
iget-object v1, p0, Lokhttp3/internal/cache/DiskLruCache;->fileSystem:Lokhttp3/internal/io/FileSystem;
iget-object v2, p0, Lokhttp3/internal/cache/DiskLruCache;->journalFileBackup:Ljava/io/File;
iget-object v3, p0, Lokhttp3/internal/cache/DiskLruCache;->journalFile:Ljava/io/File;
.line 227
invoke-interface {v1, v2, v3}, Lokhttp3/internal/io/FileSystem;->rename(Ljava/io/File;Ljava/io/File;)V
:cond_4
:goto_1
iget-object v1, p0, Lokhttp3/internal/cache/DiskLruCache;->fileSystem:Lokhttp3/internal/io/FileSystem;
iget-object v2, p0, Lokhttp3/internal/cache/DiskLruCache;->journalFileBackup:Ljava/io/File;
.line 231
invoke-static {v1, v2}, Lokhttp3/internal/Util;->isCivilized(Lokhttp3/internal/io/FileSystem;Ljava/io/File;)Z
move-result v1
iput-boolean v1, p0, Lokhttp3/internal/cache/DiskLruCache;->civilizedFileSystem:Z
iget-object v1, p0, Lokhttp3/internal/cache/DiskLruCache;->fileSystem:Lokhttp3/internal/io/FileSystem;
iget-object v2, p0, Lokhttp3/internal/cache/DiskLruCache;->journalFile:Ljava/io/File;
.line 234
invoke-interface {v1, v2}, Lokhttp3/internal/io/FileSystem;->exists(Ljava/io/File;)Z
move-result v1
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_1
const/4 v2, 0x1
if-eqz v1, :cond_5
.line 236
:try_start_2
invoke-direct {p0}, Lokhttp3/internal/cache/DiskLruCache;->readJournal()V
.line 237
invoke-direct {p0}, Lokhttp3/internal/cache/DiskLruCache;->processJournal()V
iput-boolean v2, p0, Lokhttp3/internal/cache/DiskLruCache;->initialized:Z
:try_end_2
.catch Ljava/io/IOException; {:try_start_2 .. :try_end_2} :catch_0
.catchall {:try_start_2 .. :try_end_2} :catchall_1
.line 239
monitor-exit p0
return-void
:catch_0
move-exception v1
.line 241
:try_start_3
sget-object v3, Lokhttp3/internal/platform/Platform;->Companion:Lokhttp3/internal/platform/Platform$Companion;
invoke-virtual {v3}, Lokhttp3/internal/platform/Platform$Companion;->get()Lokhttp3/internal/platform/Platform;
move-result-object v3
.line 242
new-instance v4, Ljava/lang/StringBuilder;
invoke-direct {v4, v0}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
iget-object v0, p0, Lokhttp3/internal/cache/DiskLruCache;->directory:Ljava/io/File;
invoke-virtual {v4, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
move-result-object v0
const-string v4, " is corrupt: "
invoke-virtual {v0, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v0
invoke-virtual {v1}, Ljava/io/IOException;->getMessage()Ljava/lang/String;
move-result-object v4
invoke-virtual {v0, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v0
const-string v4, ", removing"
invoke-virtual {v0, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v0
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v0
.line 244
check-cast v1, Ljava/lang/Throwable;
const/4 v4, 0x5
.line 241
invoke-virtual {v3, v0, v4, v1}, Lokhttp3/internal/platform/Platform;->log(Ljava/lang/String;ILjava/lang/Throwable;)V
:try_end_3
.catchall {:try_start_3 .. :try_end_3} :catchall_1
const/4 v0, 0x0
.line 250
:try_start_4
invoke-virtual {p0}, Lokhttp3/internal/cache/DiskLruCache;->delete()V
:try_end_4
.catchall {:try_start_4 .. :try_end_4} :catchall_0
:try_start_5
iput-boolean v0, p0, Lokhttp3/internal/cache/DiskLruCache;->closed:Z
goto :goto_2
:catchall_0
move-exception v1
iput-boolean v0, p0, Lokhttp3/internal/cache/DiskLruCache;->closed:Z
.line 252
throw v1
.line 256
:cond_5
:goto_2
invoke-virtual {p0}, Lokhttp3/internal/cache/DiskLruCache;->rebuildJournal$okhttp()V
iput-boolean v2, p0, Lokhttp3/internal/cache/DiskLruCache;->initialized:Z
:try_end_5
.catchall {:try_start_5 .. :try_end_5} :catchall_1
.line 259
monitor-exit p0
return-void
:catchall_1
move-exception v0
monitor-exit p0
throw v0
.end method
.method public final declared-synchronized isClosed()Z
.locals 1
monitor-enter p0
:try_start_0
iget-boolean v0, p0, Lokhttp3/internal/cache/DiskLruCache;->closed:Z
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
.line 661
monitor-exit p0
return v0
:catchall_0
move-exception v0
monitor-exit p0
throw v0
.end method
.method public final declared-synchronized rebuildJournal$okhttp()V
.locals 8
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
monitor-enter p0
:try_start_0
iget-object v0, p0, Lokhttp3/internal/cache/DiskLruCache;->journalWriter:Lokio/BufferedSink;
if-eqz v0, :cond_0
.line 386
invoke-interface {v0}, Lokio/BufferedSink;->close()V
:cond_0
iget-object v0, p0, Lokhttp3/internal/cache/DiskLruCache;->fileSystem:Lokhttp3/internal/io/FileSystem;
iget-object v1, p0, Lokhttp3/internal/cache/DiskLruCache;->journalFileTmp:Ljava/io/File;
.line 388
invoke-interface {v0, v1}, Lokhttp3/internal/io/FileSystem;->sink(Ljava/io/File;)Lokio/Sink;
move-result-object v0
invoke-static {v0}, Lokio/Okio;->buffer(Lokio/Sink;)Lokio/BufferedSink;
move-result-object v0
check-cast v0, Ljava/io/Closeable;
const/4 v1, 0x0
move-object v2, v1
check-cast v2, Ljava/lang/Throwable;
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_2
:try_start_1
move-object v2, v0
check-cast v2, Lokio/BufferedSink;
sget-object v3, Lokhttp3/internal/cache/DiskLruCache;->MAGIC:Ljava/lang/String;
.line 389
invoke-interface {v2, v3}, Lokio/BufferedSink;->writeUtf8(Ljava/lang/String;)Lokio/BufferedSink;
move-result-object v3
const/16 v4, 0xa
invoke-interface {v3, v4}, Lokio/BufferedSink;->writeByte(I)Lokio/BufferedSink;
sget-object v3, Lokhttp3/internal/cache/DiskLruCache;->VERSION_1:Ljava/lang/String;
.line 390
invoke-interface {v2, v3}, Lokio/BufferedSink;->writeUtf8(Ljava/lang/String;)Lokio/BufferedSink;
move-result-object v3
invoke-interface {v3, v4}, Lokio/BufferedSink;->writeByte(I)Lokio/BufferedSink;
iget v3, p0, Lokhttp3/internal/cache/DiskLruCache;->appVersion:I
int-to-long v5, v3
.line 391
invoke-interface {v2, v5, v6}, Lokio/BufferedSink;->writeDecimalLong(J)Lokio/BufferedSink;
move-result-object v3
invoke-interface {v3, v4}, Lokio/BufferedSink;->writeByte(I)Lokio/BufferedSink;
iget v3, p0, Lokhttp3/internal/cache/DiskLruCache;->valueCount:I
int-to-long v5, v3
.line 392
invoke-interface {v2, v5, v6}, Lokio/BufferedSink;->writeDecimalLong(J)Lokio/BufferedSink;
move-result-object v3
invoke-interface {v3, v4}, Lokio/BufferedSink;->writeByte(I)Lokio/BufferedSink;
.line 393
invoke-interface {v2, v4}, Lokio/BufferedSink;->writeByte(I)Lokio/BufferedSink;
iget-object v3, p0, Lokhttp3/internal/cache/DiskLruCache;->lruEntries:Ljava/util/LinkedHashMap;
.line 395
invoke-virtual {v3}, Ljava/util/LinkedHashMap;->values()Ljava/util/Collection;
move-result-object v3
invoke-interface {v3}, Ljava/util/Collection;->iterator()Ljava/util/Iterator;
move-result-object v3
:goto_0
invoke-interface {v3}, Ljava/util/Iterator;->hasNext()Z
move-result v5
if-eqz v5, :cond_2
invoke-interface {v3}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v5
check-cast v5, Lokhttp3/internal/cache/DiskLruCache$Entry;
.line 396
invoke-virtual {v5}, Lokhttp3/internal/cache/DiskLruCache$Entry;->getCurrentEditor$okhttp()Lokhttp3/internal/cache/DiskLruCache$Editor;
move-result-object v6
const/16 v7, 0x20
if-eqz v6, :cond_1
sget-object v6, Lokhttp3/internal/cache/DiskLruCache;->DIRTY:Ljava/lang/String;
.line 397
invoke-interface {v2, v6}, Lokio/BufferedSink;->writeUtf8(Ljava/lang/String;)Lokio/BufferedSink;
move-result-object v6
invoke-interface {v6, v7}, Lokio/BufferedSink;->writeByte(I)Lokio/BufferedSink;
.line 398
invoke-virtual {v5}, Lokhttp3/internal/cache/DiskLruCache$Entry;->getKey$okhttp()Ljava/lang/String;
move-result-object v5
invoke-interface {v2, v5}, Lokio/BufferedSink;->writeUtf8(Ljava/lang/String;)Lokio/BufferedSink;
.line 399
invoke-interface {v2, v4}, Lokio/BufferedSink;->writeByte(I)Lokio/BufferedSink;
goto :goto_0
:cond_1
sget-object v6, Lokhttp3/internal/cache/DiskLruCache;->CLEAN:Ljava/lang/String;
.line 401
invoke-interface {v2, v6}, Lokio/BufferedSink;->writeUtf8(Ljava/lang/String;)Lokio/BufferedSink;
move-result-object v6
invoke-interface {v6, v7}, Lokio/BufferedSink;->writeByte(I)Lokio/BufferedSink;
.line 402
invoke-virtual {v5}, Lokhttp3/internal/cache/DiskLruCache$Entry;->getKey$okhttp()Ljava/lang/String;
move-result-object v6
invoke-interface {v2, v6}, Lokio/BufferedSink;->writeUtf8(Ljava/lang/String;)Lokio/BufferedSink;
.line 403
invoke-virtual {v5, v2}, Lokhttp3/internal/cache/DiskLruCache$Entry;->writeLengths$okhttp(Lokio/BufferedSink;)V
.line 404
invoke-interface {v2, v4}, Lokio/BufferedSink;->writeByte(I)Lokio/BufferedSink;
goto :goto_0
.line 407
:cond_2
sget-object v2, Lkotlin/Unit;->INSTANCE:Lkotlin/Unit;
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
.line 388
:try_start_2
invoke-static {v0, v1}, Lkotlin/io/CloseableKt;->closeFinally(Ljava/io/Closeable;Ljava/lang/Throwable;)V
iget-object v0, p0, Lokhttp3/internal/cache/DiskLruCache;->fileSystem:Lokhttp3/internal/io/FileSystem;
iget-object v1, p0, Lokhttp3/internal/cache/DiskLruCache;->journalFile:Ljava/io/File;
.line 409
invoke-interface {v0, v1}, Lokhttp3/internal/io/FileSystem;->exists(Ljava/io/File;)Z
move-result v0
if-eqz v0, :cond_3
iget-object v0, p0, Lokhttp3/internal/cache/DiskLruCache;->fileSystem:Lokhttp3/internal/io/FileSystem;
iget-object v1, p0, Lokhttp3/internal/cache/DiskLruCache;->journalFile:Ljava/io/File;
iget-object v2, p0, Lokhttp3/internal/cache/DiskLruCache;->journalFileBackup:Ljava/io/File;
.line 410
invoke-interface {v0, v1, v2}, Lokhttp3/internal/io/FileSystem;->rename(Ljava/io/File;Ljava/io/File;)V
:cond_3
iget-object v0, p0, Lokhttp3/internal/cache/DiskLruCache;->fileSystem:Lokhttp3/internal/io/FileSystem;
iget-object v1, p0, Lokhttp3/internal/cache/DiskLruCache;->journalFileTmp:Ljava/io/File;
iget-object v2, p0, Lokhttp3/internal/cache/DiskLruCache;->journalFile:Ljava/io/File;
.line 412
invoke-interface {v0, v1, v2}, Lokhttp3/internal/io/FileSystem;->rename(Ljava/io/File;Ljava/io/File;)V
iget-object v0, p0, Lokhttp3/internal/cache/DiskLruCache;->fileSystem:Lokhttp3/internal/io/FileSystem;
iget-object v1, p0, Lokhttp3/internal/cache/DiskLruCache;->journalFileBackup:Ljava/io/File;
.line 413
invoke-interface {v0, v1}, Lokhttp3/internal/io/FileSystem;->delete(Ljava/io/File;)V
.line 415
invoke-direct {p0}, Lokhttp3/internal/cache/DiskLruCache;->newJournalWriter()Lokio/BufferedSink;
move-result-object v0
iput-object v0, p0, Lokhttp3/internal/cache/DiskLruCache;->journalWriter:Lokio/BufferedSink;
const/4 v0, 0x0
iput-boolean v0, p0, Lokhttp3/internal/cache/DiskLruCache;->hasJournalErrors:Z
iput-boolean v0, p0, Lokhttp3/internal/cache/DiskLruCache;->mostRecentRebuildFailed:Z
:try_end_2
.catchall {:try_start_2 .. :try_end_2} :catchall_2
.line 418
monitor-exit p0
return-void
:catchall_0
move-exception v1
.line 388
:try_start_3
throw v1
:try_end_3
.catchall {:try_start_3 .. :try_end_3} :catchall_1
:catchall_1
move-exception v2
:try_start_4
invoke-static {v0, v1}, Lkotlin/io/CloseableKt;->closeFinally(Ljava/io/Closeable;Ljava/lang/Throwable;)V
throw v2
:try_end_4
.catchall {:try_start_4 .. :try_end_4} :catchall_2
:catchall_2
move-exception v0
monitor-exit p0
throw v0
.end method
.method public final declared-synchronized remove(Ljava/lang/String;)Z
.locals 5
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
monitor-enter p0
:try_start_0
const-string v0, "key"
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
.line 592
invoke-virtual {p0}, Lokhttp3/internal/cache/DiskLruCache;->initialize()V
.line 594
invoke-direct {p0}, Lokhttp3/internal/cache/DiskLruCache;->checkNotClosed()V
.line 595
invoke-direct {p0, p1}, Lokhttp3/internal/cache/DiskLruCache;->validateKey(Ljava/lang/String;)V
iget-object v0, p0, Lokhttp3/internal/cache/DiskLruCache;->lruEntries:Ljava/util/LinkedHashMap;
.line 596
invoke-virtual {v0, p1}, Ljava/util/LinkedHashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object p1
check-cast p1, Lokhttp3/internal/cache/DiskLruCache$Entry;
const/4 v0, 0x0
if-eqz p1, :cond_1
const-string v1, "lruEntries[key] ?: return false"
invoke-static {p1, v1}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
.line 597
invoke-virtual {p0, p1}, Lokhttp3/internal/cache/DiskLruCache;->removeEntry$okhttp(Lokhttp3/internal/cache/DiskLruCache$Entry;)Z
move-result p1
if-eqz p1, :cond_0
iget-wide v1, p0, Lokhttp3/internal/cache/DiskLruCache;->size:J
iget-wide v3, p0, Lokhttp3/internal/cache/DiskLruCache;->maxSize:J
cmp-long v1, v1, v3
if-gtz v1, :cond_0
iput-boolean v0, p0, Lokhttp3/internal/cache/DiskLruCache;->mostRecentTrimFailed:Z
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
.line 599
:cond_0
monitor-exit p0
return p1
.line 596
:cond_1
monitor-exit p0
return v0
:catchall_0
move-exception p1
monitor-exit p0
throw p1
.end method
.method public final removeEntry$okhttp(Lokhttp3/internal/cache/DiskLruCache$Entry;)Z
.locals 10
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
const-string v0, "entry"
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
iget-boolean v0, p0, Lokhttp3/internal/cache/DiskLruCache;->civilizedFileSystem:Z
const/16 v1, 0xa
const/16 v2, 0x20
const/4 v3, 0x1
if-nez v0, :cond_2
.line 607
invoke-virtual {p1}, Lokhttp3/internal/cache/DiskLruCache$Entry;->getLockingSourceCount$okhttp()I
move-result v0
if-lez v0, :cond_0
iget-object v0, p0, Lokhttp3/internal/cache/DiskLruCache;->journalWriter:Lokio/BufferedSink;
if-eqz v0, :cond_0
sget-object v4, Lokhttp3/internal/cache/DiskLruCache;->DIRTY:Ljava/lang/String;
.line 610
invoke-interface {v0, v4}, Lokio/BufferedSink;->writeUtf8(Ljava/lang/String;)Lokio/BufferedSink;
.line 611
invoke-interface {v0, v2}, Lokio/BufferedSink;->writeByte(I)Lokio/BufferedSink;
.line 612
invoke-virtual {p1}, Lokhttp3/internal/cache/DiskLruCache$Entry;->getKey$okhttp()Ljava/lang/String;
move-result-object v4
invoke-interface {v0, v4}, Lokio/BufferedSink;->writeUtf8(Ljava/lang/String;)Lokio/BufferedSink;
.line 613
invoke-interface {v0, v1}, Lokio/BufferedSink;->writeByte(I)Lokio/BufferedSink;
.line 614
invoke-interface {v0}, Lokio/BufferedSink;->flush()V
.line 617
:cond_0
invoke-virtual {p1}, Lokhttp3/internal/cache/DiskLruCache$Entry;->getLockingSourceCount$okhttp()I
move-result v0
if-gtz v0, :cond_1
invoke-virtual {p1}, Lokhttp3/internal/cache/DiskLruCache$Entry;->getCurrentEditor$okhttp()Lokhttp3/internal/cache/DiskLruCache$Editor;
move-result-object v0
if-eqz v0, :cond_2
.line 618
:cond_1
invoke-virtual {p1, v3}, Lokhttp3/internal/cache/DiskLruCache$Entry;->setZombie$okhttp(Z)V
return v3
.line 623
:cond_2
invoke-virtual {p1}, Lokhttp3/internal/cache/DiskLruCache$Entry;->getCurrentEditor$okhttp()Lokhttp3/internal/cache/DiskLruCache$Editor;
move-result-object v0
if-eqz v0, :cond_3
invoke-virtual {v0}, Lokhttp3/internal/cache/DiskLruCache$Editor;->detach$okhttp()V
:cond_3
iget v0, p0, Lokhttp3/internal/cache/DiskLruCache;->valueCount:I
const/4 v4, 0x0
:goto_0
if-ge v4, v0, :cond_4
iget-object v5, p0, Lokhttp3/internal/cache/DiskLruCache;->fileSystem:Lokhttp3/internal/io/FileSystem;
.line 626
invoke-virtual {p1}, Lokhttp3/internal/cache/DiskLruCache$Entry;->getCleanFiles$okhttp()Ljava/util/List;
move-result-object v6
invoke-interface {v6, v4}, Ljava/util/List;->get(I)Ljava/lang/Object;
move-result-object v6
check-cast v6, Ljava/io/File;
invoke-interface {v5, v6}, Lokhttp3/internal/io/FileSystem;->delete(Ljava/io/File;)V
iget-wide v5, p0, Lokhttp3/internal/cache/DiskLruCache;->size:J
.line 627
invoke-virtual {p1}, Lokhttp3/internal/cache/DiskLruCache$Entry;->getLengths$okhttp()[J
move-result-object v7
aget-wide v7, v7, v4
sub-long/2addr v5, v7
iput-wide v5, p0, Lokhttp3/internal/cache/DiskLruCache;->size:J
.line 628
invoke-virtual {p1}, Lokhttp3/internal/cache/DiskLruCache$Entry;->getLengths$okhttp()[J
move-result-object v5
const-wide/16 v6, 0x0
aput-wide v6, v5, v4
add-int/lit8 v4, v4, 0x1
goto :goto_0
:cond_4
iget v0, p0, Lokhttp3/internal/cache/DiskLruCache;->redundantOpCount:I
add-int/2addr v0, v3
iput v0, p0, Lokhttp3/internal/cache/DiskLruCache;->redundantOpCount:I
iget-object v0, p0, Lokhttp3/internal/cache/DiskLruCache;->journalWriter:Lokio/BufferedSink;
if-eqz v0, :cond_5
sget-object v4, Lokhttp3/internal/cache/DiskLruCache;->REMOVE:Ljava/lang/String;
.line 633
invoke-interface {v0, v4}, Lokio/BufferedSink;->writeUtf8(Ljava/lang/String;)Lokio/BufferedSink;
.line 634
invoke-interface {v0, v2}, Lokio/BufferedSink;->writeByte(I)Lokio/BufferedSink;
.line 635
invoke-virtual {p1}, Lokhttp3/internal/cache/DiskLruCache$Entry;->getKey$okhttp()Ljava/lang/String;
move-result-object v2
invoke-interface {v0, v2}, Lokio/BufferedSink;->writeUtf8(Ljava/lang/String;)Lokio/BufferedSink;
.line 636
invoke-interface {v0, v1}, Lokio/BufferedSink;->writeByte(I)Lokio/BufferedSink;
:cond_5
iget-object v0, p0, Lokhttp3/internal/cache/DiskLruCache;->lruEntries:Ljava/util/LinkedHashMap;
.line 638
invoke-virtual {p1}, Lokhttp3/internal/cache/DiskLruCache$Entry;->getKey$okhttp()Ljava/lang/String;
move-result-object p1
invoke-virtual {v0, p1}, Ljava/util/LinkedHashMap;->remove(Ljava/lang/Object;)Ljava/lang/Object;
.line 640
invoke-direct {p0}, Lokhttp3/internal/cache/DiskLruCache;->journalRebuildRequired()Z
move-result p1
if-eqz p1, :cond_6
iget-object v4, p0, Lokhttp3/internal/cache/DiskLruCache;->cleanupQueue:Lokhttp3/internal/concurrent/TaskQueue;
iget-object p0, p0, Lokhttp3/internal/cache/DiskLruCache;->cleanupTask:Lokhttp3/internal/cache/DiskLruCache$cleanupTask$1;
.line 641
move-object v5, p0
check-cast v5, Lokhttp3/internal/concurrent/Task;
const-wide/16 v6, 0x0
const/4 v8, 0x2
const/4 v9, 0x0
invoke-static/range {v4 .. v9}, Lokhttp3/internal/concurrent/TaskQueue;->schedule$default(Lokhttp3/internal/concurrent/TaskQueue;Lokhttp3/internal/concurrent/Task;JILjava/lang/Object;)V
:cond_6
return v3
.end method
.method public final setClosed$okhttp(Z)V
.locals 0
iput-boolean p1, p0, Lokhttp3/internal/cache/DiskLruCache;->closed:Z
return-void
.end method
.method public final declared-synchronized setMaxSize(J)V
.locals 6
monitor-enter p0
:try_start_0
iput-wide p1, p0, Lokhttp3/internal/cache/DiskLruCache;->maxSize:J
iget-boolean p1, p0, Lokhttp3/internal/cache/DiskLruCache;->initialized:Z
if-eqz p1, :cond_0
iget-object v0, p0, Lokhttp3/internal/cache/DiskLruCache;->cleanupQueue:Lokhttp3/internal/concurrent/TaskQueue;
iget-object p1, p0, Lokhttp3/internal/cache/DiskLruCache;->cleanupTask:Lokhttp3/internal/cache/DiskLruCache$cleanupTask$1;
.line 108
move-object v1, p1
check-cast v1, Lokhttp3/internal/concurrent/Task;
const-wide/16 v2, 0x0
const/4 v4, 0x2
const/4 v5, 0x0
invoke-static/range {v0 .. v5}, Lokhttp3/internal/concurrent/TaskQueue;->schedule$default(Lokhttp3/internal/concurrent/TaskQueue;Lokhttp3/internal/concurrent/Task;JILjava/lang/Object;)V
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
.line 110
:cond_0
monitor-exit p0
return-void
:catchall_0
move-exception p1
monitor-exit p0
throw p1
.end method
.method public final declared-synchronized size()J
.locals 2
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
monitor-enter p0
.line 504
:try_start_0
invoke-virtual {p0}, Lokhttp3/internal/cache/DiskLruCache;->initialize()V
iget-wide v0, p0, Lokhttp3/internal/cache/DiskLruCache;->size:J
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
.line 505
monitor-exit p0
return-wide v0
:catchall_0
move-exception v0
monitor-exit p0
throw v0
.end method
.method public final declared-synchronized snapshots()Ljava/util/Iterator;
.locals 1
.annotation system Ldalvik/annotation/Signature;
value = {
"()",
"Ljava/util/Iterator<",
"Lokhttp3/internal/cache/DiskLruCache$Snapshot;",
">;"
}
.end annotation
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
monitor-enter p0
.line 746
:try_start_0
invoke-virtual {p0}, Lokhttp3/internal/cache/DiskLruCache;->initialize()V
.line 747
new-instance v0, Lokhttp3/internal/cache/DiskLruCache$snapshots$1;
invoke-direct {v0, p0}, Lokhttp3/internal/cache/DiskLruCache$snapshots$1;-><init>(Lokhttp3/internal/cache/DiskLruCache;)V
check-cast v0, Ljava/util/Iterator;
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
monitor-exit p0
return-object v0
:catchall_0
move-exception v0
monitor-exit p0
throw v0
.end method
.method public final trimToSize()V
.locals 4
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
:cond_0
iget-wide v0, p0, Lokhttp3/internal/cache/DiskLruCache;->size:J
iget-wide v2, p0, Lokhttp3/internal/cache/DiskLruCache;->maxSize:J
cmp-long v0, v0, v2
if-lez v0, :cond_1
.line 687
invoke-direct {p0}, Lokhttp3/internal/cache/DiskLruCache;->removeOldestEntry()Z
move-result v0
if-nez v0, :cond_0
return-void
:cond_1
const/4 v0, 0x0
iput-boolean v0, p0, Lokhttp3/internal/cache/DiskLruCache;->mostRecentTrimFailed:Z
return-void
.end method