Weather/smali_classes4/okhttp3/Cache$2.smali
2021-05-10 10:13:34 +02:00

194 lines
3.9 KiB
Smali

.class Lokhttp3/Cache$2;
.super Ljava/lang/Object;
.source "Cache.java"
# interfaces
.implements Ljava/util/Iterator;
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lokhttp3/Cache;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x0
name = null
.end annotation
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/lang/Object;",
"Ljava/util/Iterator<",
"Ljava/lang/String;",
">;"
}
.end annotation
# instance fields
.field final a:Ljava/util/Iterator;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/Iterator<",
"Lokhttp3/internal/cache/DiskLruCache$Snapshot;",
">;"
}
.end annotation
.end field
.field b:Ljava/lang/String;
.field c:Z
# virtual methods
.method public a()Ljava/lang/String;
.locals 2
.line 355
invoke-virtual {p0}, Lokhttp3/Cache$2;->hasNext()Z
move-result v0
if-eqz v0, :cond_0
.line 356
iget-object v0, p0, Lokhttp3/Cache$2;->b:Ljava/lang/String;
const/4 v1, 0x0
.line 357
iput-object v1, p0, Lokhttp3/Cache$2;->b:Ljava/lang/String;
const/4 v1, 0x1
.line 358
iput-boolean v1, p0, Lokhttp3/Cache$2;->c:Z
return-object v0
.line 355
:cond_0
new-instance v0, Ljava/util/NoSuchElementException;
invoke-direct {v0}, Ljava/util/NoSuchElementException;-><init>()V
throw v0
.end method
.method public hasNext()Z
.locals 4
.line 334
iget-object v0, p0, Lokhttp3/Cache$2;->b:Ljava/lang/String;
const/4 v1, 0x1
if-eqz v0, :cond_0
return v1
:cond_0
const/4 v0, 0x0
.line 336
iput-boolean v0, p0, Lokhttp3/Cache$2;->c:Z
.line 337
:goto_0
iget-object v2, p0, Lokhttp3/Cache$2;->a:Ljava/util/Iterator;
invoke-interface {v2}, Ljava/util/Iterator;->hasNext()Z
move-result v2
if-eqz v2, :cond_1
.line 338
iget-object v2, p0, Lokhttp3/Cache$2;->a:Ljava/util/Iterator;
invoke-interface {v2}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v2
check-cast v2, Lokhttp3/internal/cache/DiskLruCache$Snapshot;
.line 340
:try_start_0
invoke-virtual {v2, v0}, Lokhttp3/internal/cache/DiskLruCache$Snapshot;->a(I)Lokio/Source;
move-result-object v3
invoke-static {v3}, Lokio/Okio;->buffer(Lokio/Source;)Lokio/BufferedSource;
move-result-object v3
.line 341
invoke-interface {v3}, Lokio/BufferedSource;->readUtf8LineStrict()Ljava/lang/String;
move-result-object v3
iput-object v3, p0, Lokhttp3/Cache$2;->b:Ljava/lang/String;
:try_end_0
.catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
.line 347
invoke-virtual {v2}, Lokhttp3/internal/cache/DiskLruCache$Snapshot;->close()V
return v1
:catchall_0
move-exception v0
invoke-virtual {v2}, Lokhttp3/internal/cache/DiskLruCache$Snapshot;->close()V
throw v0
:catch_0
invoke-virtual {v2}, Lokhttp3/internal/cache/DiskLruCache$Snapshot;->close()V
goto :goto_0
:cond_1
return v0
.end method
.method public synthetic next()Ljava/lang/Object;
.locals 1
.line 327
invoke-virtual {p0}, Lokhttp3/Cache$2;->a()Ljava/lang/String;
move-result-object v0
return-object v0
.end method
.method public remove()V
.locals 2
.line 363
iget-boolean v0, p0, Lokhttp3/Cache$2;->c:Z
if-eqz v0, :cond_0
.line 364
iget-object v0, p0, Lokhttp3/Cache$2;->a:Ljava/util/Iterator;
invoke-interface {v0}, Ljava/util/Iterator;->remove()V
return-void
.line 363
:cond_0
new-instance v0, Ljava/lang/IllegalStateException;
const-string v1, "remove() before next()"
invoke-direct {v0, v1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
throw v0
.end method