Response.smali
16.5 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
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
.class public final Lcom/brplug/okhttp3/Response;
.super Ljava/lang/Object;
.source "Response.java"
# interfaces
.implements Ljava/io/Closeable;
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Lcom/brplug/okhttp3/Response$Builder;
}
.end annotation
# instance fields
.field final body:Lcom/brplug/okhttp3/ResponseBody;
.annotation runtime Ljavax/annotation/Nullable;
.end annotation
.end field
.field private volatile cacheControl:Lcom/brplug/okhttp3/CacheControl;
.annotation runtime Ljavax/annotation/Nullable;
.end annotation
.end field
.field final cacheResponse:Lcom/brplug/okhttp3/Response;
.annotation runtime Ljavax/annotation/Nullable;
.end annotation
.end field
.field final code:I
.field final exchange:Lcom/brplug/okhttp3/internal/connection/Exchange;
.annotation runtime Ljavax/annotation/Nullable;
.end annotation
.end field
.field final handshake:Lcom/brplug/okhttp3/Handshake;
.annotation runtime Ljavax/annotation/Nullable;
.end annotation
.end field
.field final headers:Lcom/brplug/okhttp3/Headers;
.field final message:Ljava/lang/String;
.field final networkResponse:Lcom/brplug/okhttp3/Response;
.annotation runtime Ljavax/annotation/Nullable;
.end annotation
.end field
.field final priorResponse:Lcom/brplug/okhttp3/Response;
.annotation runtime Ljavax/annotation/Nullable;
.end annotation
.end field
.field final protocol:Lcom/brplug/okhttp3/Protocol;
.field final receivedResponseAtMillis:J
.field final request:Lcom/brplug/okhttp3/Request;
.field final sentRequestAtMillis:J
# direct methods
.method constructor <init>(Lcom/brplug/okhttp3/Response$Builder;)V
.locals 2
.line 61
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
.line 62
iget-object v0, p1, Lcom/brplug/okhttp3/Response$Builder;->request:Lcom/brplug/okhttp3/Request;
iput-object v0, p0, Lcom/brplug/okhttp3/Response;->request:Lcom/brplug/okhttp3/Request;
.line 63
iget-object v0, p1, Lcom/brplug/okhttp3/Response$Builder;->protocol:Lcom/brplug/okhttp3/Protocol;
iput-object v0, p0, Lcom/brplug/okhttp3/Response;->protocol:Lcom/brplug/okhttp3/Protocol;
.line 64
iget v0, p1, Lcom/brplug/okhttp3/Response$Builder;->code:I
iput v0, p0, Lcom/brplug/okhttp3/Response;->code:I
.line 65
iget-object v0, p1, Lcom/brplug/okhttp3/Response$Builder;->message:Ljava/lang/String;
iput-object v0, p0, Lcom/brplug/okhttp3/Response;->message:Ljava/lang/String;
.line 66
iget-object v0, p1, Lcom/brplug/okhttp3/Response$Builder;->handshake:Lcom/brplug/okhttp3/Handshake;
iput-object v0, p0, Lcom/brplug/okhttp3/Response;->handshake:Lcom/brplug/okhttp3/Handshake;
.line 67
iget-object v0, p1, Lcom/brplug/okhttp3/Response$Builder;->headers:Lcom/brplug/okhttp3/Headers$Builder;
invoke-virtual {v0}, Lcom/brplug/okhttp3/Headers$Builder;->build()Lcom/brplug/okhttp3/Headers;
move-result-object v0
iput-object v0, p0, Lcom/brplug/okhttp3/Response;->headers:Lcom/brplug/okhttp3/Headers;
.line 68
iget-object v0, p1, Lcom/brplug/okhttp3/Response$Builder;->body:Lcom/brplug/okhttp3/ResponseBody;
iput-object v0, p0, Lcom/brplug/okhttp3/Response;->body:Lcom/brplug/okhttp3/ResponseBody;
.line 69
iget-object v0, p1, Lcom/brplug/okhttp3/Response$Builder;->networkResponse:Lcom/brplug/okhttp3/Response;
iput-object v0, p0, Lcom/brplug/okhttp3/Response;->networkResponse:Lcom/brplug/okhttp3/Response;
.line 70
iget-object v0, p1, Lcom/brplug/okhttp3/Response$Builder;->cacheResponse:Lcom/brplug/okhttp3/Response;
iput-object v0, p0, Lcom/brplug/okhttp3/Response;->cacheResponse:Lcom/brplug/okhttp3/Response;
.line 71
iget-object v0, p1, Lcom/brplug/okhttp3/Response$Builder;->priorResponse:Lcom/brplug/okhttp3/Response;
iput-object v0, p0, Lcom/brplug/okhttp3/Response;->priorResponse:Lcom/brplug/okhttp3/Response;
.line 72
iget-wide v0, p1, Lcom/brplug/okhttp3/Response$Builder;->sentRequestAtMillis:J
iput-wide v0, p0, Lcom/brplug/okhttp3/Response;->sentRequestAtMillis:J
.line 73
iget-wide v0, p1, Lcom/brplug/okhttp3/Response$Builder;->receivedResponseAtMillis:J
iput-wide v0, p0, Lcom/brplug/okhttp3/Response;->receivedResponseAtMillis:J
.line 74
iget-object p1, p1, Lcom/brplug/okhttp3/Response$Builder;->exchange:Lcom/brplug/okhttp3/internal/connection/Exchange;
iput-object p1, p0, Lcom/brplug/okhttp3/Response;->exchange:Lcom/brplug/okhttp3/internal/connection/Exchange;
return-void
.end method
# virtual methods
.method public body()Lcom/brplug/okhttp3/ResponseBody;
.locals 1
.annotation runtime Ljavax/annotation/Nullable;
.end annotation
.line 179
iget-object v0, p0, Lcom/brplug/okhttp3/Response;->body:Lcom/brplug/okhttp3/ResponseBody;
return-object v0
.end method
.method public cacheControl()Lcom/brplug/okhttp3/CacheControl;
.locals 1
.line 257
iget-object v0, p0, Lcom/brplug/okhttp3/Response;->cacheControl:Lcom/brplug/okhttp3/CacheControl;
if-eqz v0, :cond_0
goto :goto_0
.line 258
:cond_0
iget-object v0, p0, Lcom/brplug/okhttp3/Response;->headers:Lcom/brplug/okhttp3/Headers;
invoke-static {v0}, Lcom/brplug/okhttp3/CacheControl;->parse(Lcom/brplug/okhttp3/Headers;)Lcom/brplug/okhttp3/CacheControl;
move-result-object v0
iput-object v0, p0, Lcom/brplug/okhttp3/Response;->cacheControl:Lcom/brplug/okhttp3/CacheControl;
:goto_0
return-object v0
.end method
.method public cacheResponse()Lcom/brplug/okhttp3/Response;
.locals 1
.annotation runtime Ljavax/annotation/Nullable;
.end annotation
.line 216
iget-object v0, p0, Lcom/brplug/okhttp3/Response;->cacheResponse:Lcom/brplug/okhttp3/Response;
return-object v0
.end method
.method public challenges()Ljava/util/List;
.locals 2
.annotation system Ldalvik/annotation/Signature;
value = {
"()",
"Ljava/util/List<",
"Lcom/brplug/okhttp3/Challenge;",
">;"
}
.end annotation
.line 242
iget v0, p0, Lcom/brplug/okhttp3/Response;->code:I
const/16 v1, 0x191
if-ne v0, v1, :cond_0
const-string v0, "WWW-Authenticate"
goto :goto_0
:cond_0
const/16 v1, 0x197
if-ne v0, v1, :cond_1
const-string v0, "Proxy-Authenticate"
.line 249
:goto_0
invoke-virtual {p0}, Lcom/brplug/okhttp3/Response;->headers()Lcom/brplug/okhttp3/Headers;
move-result-object v1
invoke-static {v1, v0}, Lcom/brplug/okhttp3/internal/http/HttpHeaders;->parseChallenges(Lcom/brplug/okhttp3/Headers;Ljava/lang/String;)Ljava/util/List;
move-result-object v0
return-object v0
.line 247
:cond_1
invoke-static {}, Ljava/util/Collections;->emptyList()Ljava/util/List;
move-result-object v0
return-object v0
.end method
.method public close()V
.locals 2
.line 287
iget-object v0, p0, Lcom/brplug/okhttp3/Response;->body:Lcom/brplug/okhttp3/ResponseBody;
if-eqz v0, :cond_0
.line 290
invoke-virtual {v0}, Lcom/brplug/okhttp3/ResponseBody;->close()V
return-void
.line 288
:cond_0
new-instance v0, Ljava/lang/IllegalStateException;
const-string v1, "response is not eligible for a body and must not be closed"
invoke-direct {v0, v1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
throw v0
.end method
.method public code()I
.locals 1
.line 101
iget v0, p0, Lcom/brplug/okhttp3/Response;->code:I
return v0
.end method
.method public handshake()Lcom/brplug/okhttp3/Handshake;
.locals 1
.annotation runtime Ljavax/annotation/Nullable;
.end annotation
.line 122
iget-object v0, p0, Lcom/brplug/okhttp3/Response;->handshake:Lcom/brplug/okhttp3/Handshake;
return-object v0
.end method
.method public header(Ljava/lang/String;)Ljava/lang/String;
.locals 1
.annotation runtime Ljavax/annotation/Nullable;
.end annotation
const/4 v0, 0x0
.line 130
invoke-virtual {p0, p1, v0}, Lcom/brplug/okhttp3/Response;->header(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
move-result-object p1
return-object p1
.end method
.method public header(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
.locals 1
.param p2 # Ljava/lang/String;
.annotation runtime Ljavax/annotation/Nullable;
.end annotation
.end param
.annotation runtime Ljavax/annotation/Nullable;
.end annotation
.line 134
iget-object v0, p0, Lcom/brplug/okhttp3/Response;->headers:Lcom/brplug/okhttp3/Headers;
invoke-virtual {v0, p1}, Lcom/brplug/okhttp3/Headers;->get(Ljava/lang/String;)Ljava/lang/String;
move-result-object p1
if-eqz p1, :cond_0
goto :goto_0
:cond_0
move-object p1, p2
:goto_0
return-object p1
.end method
.method public headers()Lcom/brplug/okhttp3/Headers;
.locals 1
.line 139
iget-object v0, p0, Lcom/brplug/okhttp3/Response;->headers:Lcom/brplug/okhttp3/Headers;
return-object v0
.end method
.method public headers(Ljava/lang/String;)Ljava/util/List;
.locals 1
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/lang/String;",
")",
"Ljava/util/List<",
"Ljava/lang/String;",
">;"
}
.end annotation
.line 126
iget-object v0, p0, Lcom/brplug/okhttp3/Response;->headers:Lcom/brplug/okhttp3/Headers;
invoke-virtual {v0, p1}, Lcom/brplug/okhttp3/Headers;->values(Ljava/lang/String;)Ljava/util/List;
move-result-object p1
return-object p1
.end method
.method public isRedirect()Z
.locals 2
.line 188
iget v0, p0, Lcom/brplug/okhttp3/Response;->code:I
const/16 v1, 0x133
if-eq v0, v1, :cond_0
const/16 v1, 0x134
if-eq v0, v1, :cond_0
packed-switch v0, :pswitch_data_0
const/4 v0, 0x0
return v0
:cond_0
:pswitch_0
const/4 v0, 0x1
return v0
nop
:pswitch_data_0
.packed-switch 0x12c
:pswitch_0
:pswitch_0
:pswitch_0
:pswitch_0
.end packed-switch
.end method
.method public isSuccessful()Z
.locals 2
.line 109
iget v0, p0, Lcom/brplug/okhttp3/Response;->code:I
const/16 v1, 0xc8
if-lt v0, v1, :cond_0
const/16 v1, 0x12c
if-ge v0, v1, :cond_0
const/4 v0, 0x1
goto :goto_0
:cond_0
const/4 v0, 0x0
:goto_0
return v0
.end method
.method public message()Ljava/lang/String;
.locals 1
.line 114
iget-object v0, p0, Lcom/brplug/okhttp3/Response;->message:Ljava/lang/String;
return-object v0
.end method
.method public networkResponse()Lcom/brplug/okhttp3/Response;
.locals 1
.annotation runtime Ljavax/annotation/Nullable;
.end annotation
.line 207
iget-object v0, p0, Lcom/brplug/okhttp3/Response;->networkResponse:Lcom/brplug/okhttp3/Response;
return-object v0
.end method
.method public newBuilder()Lcom/brplug/okhttp3/Response$Builder;
.locals 1
.line 183
new-instance v0, Lcom/brplug/okhttp3/Response$Builder;
invoke-direct {v0, p0}, Lcom/brplug/okhttp3/Response$Builder;-><init>(Lcom/brplug/okhttp3/Response;)V
return-object v0
.end method
.method public peekBody(J)Lcom/brplug/okhttp3/ResponseBody;
.locals 4
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 163
iget-object v0, p0, Lcom/brplug/okhttp3/Response;->body:Lcom/brplug/okhttp3/ResponseBody;
invoke-virtual {v0}, Lcom/brplug/okhttp3/ResponseBody;->source()Lcom/brplug/okio/BufferedSource;
move-result-object v0
invoke-interface {v0}, Lcom/brplug/okio/BufferedSource;->peek()Lcom/brplug/okio/BufferedSource;
move-result-object v0
.line 164
new-instance v1, Lcom/brplug/okio/Buffer;
invoke-direct {v1}, Lcom/brplug/okio/Buffer;-><init>()V
.line 165
invoke-interface {v0, p1, p2}, Lcom/brplug/okio/BufferedSource;->request(J)Z
.line 166
invoke-interface {v0}, Lcom/brplug/okio/BufferedSource;->getBuffer()Lcom/brplug/okio/Buffer;
move-result-object v2
invoke-virtual {v2}, Lcom/brplug/okio/Buffer;->size()J
move-result-wide v2
invoke-static {p1, p2, v2, v3}, Ljava/lang/Math;->min(JJ)J
move-result-wide p1
invoke-virtual {v1, v0, p1, p2}, Lcom/brplug/okio/Buffer;->write(Lcom/brplug/okio/Source;J)Lcom/brplug/okio/BufferedSink;
.line 167
iget-object p1, p0, Lcom/brplug/okhttp3/Response;->body:Lcom/brplug/okhttp3/ResponseBody;
invoke-virtual {p1}, Lcom/brplug/okhttp3/ResponseBody;->contentType()Lcom/brplug/okhttp3/MediaType;
move-result-object p1
invoke-virtual {v1}, Lcom/brplug/okio/Buffer;->size()J
move-result-wide v2
invoke-static {p1, v2, v3, v1}, Lcom/brplug/okhttp3/ResponseBody;->create(Lcom/brplug/okhttp3/MediaType;JLcom/brplug/okio/BufferedSource;)Lcom/brplug/okhttp3/ResponseBody;
move-result-object p1
return-object p1
.end method
.method public priorResponse()Lcom/brplug/okhttp3/Response;
.locals 1
.annotation runtime Ljavax/annotation/Nullable;
.end annotation
.line 226
iget-object v0, p0, Lcom/brplug/okhttp3/Response;->priorResponse:Lcom/brplug/okhttp3/Response;
return-object v0
.end method
.method public protocol()Lcom/brplug/okhttp3/Protocol;
.locals 1
.line 96
iget-object v0, p0, Lcom/brplug/okhttp3/Response;->protocol:Lcom/brplug/okhttp3/Protocol;
return-object v0
.end method
.method public receivedResponseAtMillis()J
.locals 2
.line 276
iget-wide v0, p0, Lcom/brplug/okhttp3/Response;->receivedResponseAtMillis:J
return-wide v0
.end method
.method public request()Lcom/brplug/okhttp3/Request;
.locals 1
.line 89
iget-object v0, p0, Lcom/brplug/okhttp3/Response;->request:Lcom/brplug/okhttp3/Request;
return-object v0
.end method
.method public sentRequestAtMillis()J
.locals 2
.line 267
iget-wide v0, p0, Lcom/brplug/okhttp3/Response;->sentRequestAtMillis:J
return-wide v0
.end method
.method public toString()Ljava/lang/String;
.locals 2
.line 294
new-instance v0, Ljava/lang/StringBuilder;
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
const-string v1, "Response{protocol="
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
iget-object v1, p0, Lcom/brplug/okhttp3/Response;->protocol:Lcom/brplug/okhttp3/Protocol;
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
const-string v1, ", code="
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
iget v1, p0, Lcom/brplug/okhttp3/Response;->code:I
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
const-string v1, ", message="
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
iget-object v1, p0, Lcom/brplug/okhttp3/Response;->message:Ljava/lang/String;
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
const-string v1, ", url="
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
iget-object v1, p0, Lcom/brplug/okhttp3/Response;->request:Lcom/brplug/okhttp3/Request;
.line 301
invoke-virtual {v1}, Lcom/brplug/okhttp3/Request;->url()Lcom/brplug/okhttp3/HttpUrl;
move-result-object v1
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
const/16 v1, 0x7d
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v0
return-object v0
.end method
.method public trailers()Lcom/brplug/okhttp3/Headers;
.locals 2
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 147
iget-object v0, p0, Lcom/brplug/okhttp3/Response;->exchange:Lcom/brplug/okhttp3/internal/connection/Exchange;
if-eqz v0, :cond_0
.line 148
invoke-virtual {v0}, Lcom/brplug/okhttp3/internal/connection/Exchange;->trailers()Lcom/brplug/okhttp3/Headers;
move-result-object v0
return-object v0
.line 147
:cond_0
new-instance v0, Ljava/lang/IllegalStateException;
const-string v1, "trailers not available"
invoke-direct {v0, v1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
throw v0
.end method