Cache$2.smali
6.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
.class Lcom/brplug/okhttp3/Cache$2;
.super Ljava/lang/Object;
.source "Cache.java"
# interfaces
.implements Ljava/util/Iterator;
# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
value = Lcom/brplug/okhttp3/Cache;->urls()Ljava/util/Iterator;
.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 canRemove:Z
.field final delegate:Ljava/util/Iterator;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/Iterator<",
"Lcom/brplug/okhttp3/internal/cache/DiskLruCache$Snapshot;",
">;"
}
.end annotation
.end field
.field nextUrl:Ljava/lang/String;
.annotation runtime Ljavax/annotation/Nullable;
.end annotation
.end field
.field final synthetic this$0:Lcom/brplug/okhttp3/Cache;
# direct methods
.method constructor <init>(Lcom/brplug/okhttp3/Cache;)V
.locals 0
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 331
iput-object p1, p0, Lcom/brplug/okhttp3/Cache$2;->this$0:Lcom/brplug/okhttp3/Cache;
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
.line 332
iget-object p1, p0, Lcom/brplug/okhttp3/Cache$2;->this$0:Lcom/brplug/okhttp3/Cache;
iget-object p1, p1, Lcom/brplug/okhttp3/Cache;->cache:Lcom/brplug/okhttp3/internal/cache/DiskLruCache;
invoke-virtual {p1}, Lcom/brplug/okhttp3/internal/cache/DiskLruCache;->snapshots()Ljava/util/Iterator;
move-result-object p1
iput-object p1, p0, Lcom/brplug/okhttp3/Cache$2;->delegate:Ljava/util/Iterator;
return-void
.end method
# virtual methods
.method public hasNext()Z
.locals 5
.line 338
iget-object v0, p0, Lcom/brplug/okhttp3/Cache$2;->nextUrl:Ljava/lang/String;
const/4 v1, 0x1
if-eqz v0, :cond_0
return v1
:cond_0
const/4 v0, 0x0
.line 340
iput-boolean v0, p0, Lcom/brplug/okhttp3/Cache$2;->canRemove:Z
.line 341
:catch_0
iget-object v2, p0, Lcom/brplug/okhttp3/Cache$2;->delegate:Ljava/util/Iterator;
invoke-interface {v2}, Ljava/util/Iterator;->hasNext()Z
move-result v2
if-eqz v2, :cond_4
.line 342
:try_start_0
iget-object v2, p0, Lcom/brplug/okhttp3/Cache$2;->delegate:Ljava/util/Iterator;
invoke-interface {v2}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v2
check-cast v2, Lcom/brplug/okhttp3/internal/cache/DiskLruCache$Snapshot;
:try_end_0
.catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0
const/4 v3, 0x0
.line 343
:try_start_1
invoke-virtual {v2, v0}, Lcom/brplug/okhttp3/internal/cache/DiskLruCache$Snapshot;->getSource(I)Lcom/brplug/okio/Source;
move-result-object v4
invoke-static {v4}, Lcom/brplug/okio/Okio;->buffer(Lcom/brplug/okio/Source;)Lcom/brplug/okio/BufferedSource;
move-result-object v4
.line 344
invoke-interface {v4}, Lcom/brplug/okio/BufferedSource;->readUtf8LineStrict()Ljava/lang/String;
move-result-object v4
iput-object v4, p0, Lcom/brplug/okhttp3/Cache$2;->nextUrl:Ljava/lang/String;
:try_end_1
.catch Ljava/lang/Throwable; {:try_start_1 .. :try_end_1} :catch_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
if-eqz v2, :cond_1
.line 346
:try_start_2
invoke-virtual {v2}, Lcom/brplug/okhttp3/internal/cache/DiskLruCache$Snapshot;->close()V
:try_end_2
.catch Ljava/io/IOException; {:try_start_2 .. :try_end_2} :catch_0
:cond_1
return v1
:catchall_0
move-exception v4
goto :goto_0
:catch_1
move-exception v3
.line 342
:try_start_3
throw v3
:try_end_3
.catchall {:try_start_3 .. :try_end_3} :catchall_0
:goto_0
if-eqz v2, :cond_3
if-eqz v3, :cond_2
.line 346
:try_start_4
invoke-virtual {v2}, Lcom/brplug/okhttp3/internal/cache/DiskLruCache$Snapshot;->close()V
:try_end_4
.catch Ljava/lang/Throwable; {:try_start_4 .. :try_end_4} :catch_2
.catch Ljava/io/IOException; {:try_start_4 .. :try_end_4} :catch_0
goto :goto_1
:catch_2
move-exception v2
:try_start_5
invoke-virtual {v3, v2}, Ljava/lang/Throwable;->addSuppressed(Ljava/lang/Throwable;)V
goto :goto_1
:cond_2
invoke-virtual {v2}, Lcom/brplug/okhttp3/internal/cache/DiskLruCache$Snapshot;->close()V
:cond_3
:goto_1
throw v4
:try_end_5
.catch Ljava/io/IOException; {:try_start_5 .. :try_end_5} :catch_0
:cond_4
return v0
.end method
.method public bridge synthetic next()Ljava/lang/Object;
.locals 1
.line 331
invoke-virtual {p0}, Lcom/brplug/okhttp3/Cache$2;->next()Ljava/lang/String;
move-result-object v0
return-object v0
.end method
.method public next()Ljava/lang/String;
.locals 2
.line 356
invoke-virtual {p0}, Lcom/brplug/okhttp3/Cache$2;->hasNext()Z
move-result v0
if-eqz v0, :cond_0
.line 357
iget-object v0, p0, Lcom/brplug/okhttp3/Cache$2;->nextUrl:Ljava/lang/String;
const/4 v1, 0x0
.line 358
iput-object v1, p0, Lcom/brplug/okhttp3/Cache$2;->nextUrl:Ljava/lang/String;
const/4 v1, 0x1
.line 359
iput-boolean v1, p0, Lcom/brplug/okhttp3/Cache$2;->canRemove:Z
return-object v0
.line 356
:cond_0
new-instance v0, Ljava/util/NoSuchElementException;
invoke-direct {v0}, Ljava/util/NoSuchElementException;-><init>()V
throw v0
.end method
.method public remove()V
.locals 2
.line 364
iget-boolean v0, p0, Lcom/brplug/okhttp3/Cache$2;->canRemove:Z
if-eqz v0, :cond_0
.line 365
iget-object v0, p0, Lcom/brplug/okhttp3/Cache$2;->delegate:Ljava/util/Iterator;
invoke-interface {v0}, Ljava/util/Iterator;->remove()V
return-void
.line 364
: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