2020-03-27 22:23:51 +00:00
|
|
|
.class public final Ld0/m;
|
2020-02-20 19:33:18 +00:00
|
|
|
.super Ljava/lang/Object;
|
2020-04-17 19:35:49 +00:00
|
|
|
.source "Okio.kt"
|
2020-02-20 19:33:18 +00:00
|
|
|
|
2020-03-27 22:23:51 +00:00
|
|
|
# interfaces
|
2020-04-17 19:35:49 +00:00
|
|
|
.implements Ld0/w;
|
|
|
|
|
|
|
|
|
|
|
|
# instance fields
|
|
|
|
.field public final d:Ljava/io/InputStream;
|
|
|
|
|
|
|
|
.field public final e:Ld0/x;
|
2020-02-20 19:33:18 +00:00
|
|
|
|
|
|
|
|
|
|
|
# direct methods
|
2020-04-17 19:35:49 +00:00
|
|
|
.method public constructor <init>(Ljava/io/InputStream;Ld0/x;)V
|
|
|
|
.locals 1
|
|
|
|
|
|
|
|
const/4 v0, 0x0
|
|
|
|
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
|
|
|
|
if-eqz p2, :cond_0
|
2020-03-27 22:23:51 +00:00
|
|
|
|
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
|
2020-04-17 19:35:49 +00:00
|
|
|
iput-object p1, p0, Ld0/m;->d:Ljava/io/InputStream;
|
|
|
|
|
|
|
|
iput-object p2, p0, Ld0/m;->e:Ld0/x;
|
|
|
|
|
2020-03-27 22:23:51 +00:00
|
|
|
return-void
|
2020-04-17 19:35:49 +00:00
|
|
|
|
|
|
|
:cond_0
|
|
|
|
const-string p1, "timeout"
|
|
|
|
|
|
|
|
invoke-static {p1}, Ly/u/b/j;->a(Ljava/lang/String;)V
|
|
|
|
|
|
|
|
throw v0
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
const-string p1, "input"
|
|
|
|
|
|
|
|
invoke-static {p1}, Ly/u/b/j;->a(Ljava/lang/String;)V
|
|
|
|
|
|
|
|
throw v0
|
2020-03-27 22:23:51 +00:00
|
|
|
.end method
|
|
|
|
|
|
|
|
|
|
|
|
# virtual methods
|
2020-04-17 19:35:49 +00:00
|
|
|
.method public b(Ld0/e;J)J
|
|
|
|
.locals 3
|
|
|
|
|
|
|
|
if-eqz p1, :cond_5
|
|
|
|
|
|
|
|
const-wide/16 v0, 0x0
|
2020-03-27 22:23:51 +00:00
|
|
|
|
2020-04-17 19:35:49 +00:00
|
|
|
cmp-long v2, p2, v0
|
2020-03-27 22:23:51 +00:00
|
|
|
|
2020-04-17 19:35:49 +00:00
|
|
|
if-nez v2, :cond_0
|
2020-03-27 22:23:51 +00:00
|
|
|
|
2020-04-17 19:35:49 +00:00
|
|
|
return-wide v0
|
2020-03-27 22:23:51 +00:00
|
|
|
|
|
|
|
:cond_0
|
2020-04-17 19:35:49 +00:00
|
|
|
const/4 v0, 0x1
|
|
|
|
|
|
|
|
if-ltz v2, :cond_1
|
|
|
|
|
|
|
|
const/4 v1, 0x1
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
const/4 v1, 0x0
|
|
|
|
|
|
|
|
:goto_0
|
|
|
|
if-eqz v1, :cond_4
|
|
|
|
|
|
|
|
:try_start_0
|
|
|
|
iget-object v1, p0, Ld0/m;->e:Ld0/x;
|
|
|
|
|
|
|
|
invoke-virtual {v1}, Ld0/x;->e()V
|
|
|
|
|
|
|
|
invoke-virtual {p1, v0}, Ld0/e;->a(I)Ld0/r;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
iget v1, v0, Ld0/r;->c:I
|
|
|
|
|
|
|
|
rsub-int v1, v1, 0x2000
|
|
|
|
|
|
|
|
int-to-long v1, v1
|
|
|
|
|
|
|
|
invoke-static {p2, p3, v1, v2}, Ljava/lang/Math;->min(JJ)J
|
|
|
|
|
|
|
|
move-result-wide p2
|
|
|
|
|
|
|
|
long-to-int p3, p2
|
|
|
|
|
|
|
|
iget-object p2, p0, Ld0/m;->d:Ljava/io/InputStream;
|
|
|
|
|
|
|
|
iget-object v1, v0, Ld0/r;->a:[B
|
|
|
|
|
|
|
|
iget v2, v0, Ld0/r;->c:I
|
|
|
|
|
|
|
|
invoke-virtual {p2, v1, v2, p3}, Ljava/io/InputStream;->read([BII)I
|
|
|
|
|
|
|
|
move-result p2
|
|
|
|
|
|
|
|
const/4 p3, -0x1
|
|
|
|
|
|
|
|
if-ne p2, p3, :cond_2
|
2020-03-27 22:23:51 +00:00
|
|
|
|
2020-04-17 19:35:49 +00:00
|
|
|
const-wide/16 p1, -0x1
|
|
|
|
|
|
|
|
return-wide p1
|
|
|
|
|
|
|
|
:cond_2
|
|
|
|
iget p3, v0, Ld0/r;->c:I
|
|
|
|
|
|
|
|
add-int/2addr p3, p2
|
|
|
|
|
|
|
|
iput p3, v0, Ld0/r;->c:I
|
|
|
|
|
|
|
|
iget-wide v0, p1, Ld0/e;->e:J
|
|
|
|
|
|
|
|
int-to-long p2, p2
|
|
|
|
|
|
|
|
add-long/2addr v0, p2
|
|
|
|
|
|
|
|
iput-wide v0, p1, Ld0/e;->e:J
|
|
|
|
:try_end_0
|
|
|
|
.catch Ljava/lang/AssertionError; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
|
|
|
|
return-wide p2
|
|
|
|
|
|
|
|
:catch_0
|
|
|
|
move-exception p1
|
|
|
|
|
|
|
|
invoke-static {p1}, Lf/n/a/j/a;->a(Ljava/lang/AssertionError;)Z
|
|
|
|
|
|
|
|
move-result p2
|
|
|
|
|
|
|
|
if-eqz p2, :cond_3
|
|
|
|
|
|
|
|
new-instance p2, Ljava/io/IOException;
|
|
|
|
|
|
|
|
invoke-direct {p2, p1}, Ljava/io/IOException;-><init>(Ljava/lang/Throwable;)V
|
|
|
|
|
|
|
|
throw p2
|
|
|
|
|
|
|
|
:cond_3
|
|
|
|
throw p1
|
|
|
|
|
|
|
|
:cond_4
|
|
|
|
const-string p1, "byteCount < 0: "
|
|
|
|
|
|
|
|
invoke-static {p1, p2, p3}, Lf/e/b/a/a;->a(Ljava/lang/String;J)Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
new-instance p2, Ljava/lang/IllegalArgumentException;
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Ljava/lang/Object;->toString()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
invoke-direct {p2, p1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
|
|
|
|
|
|
|
|
throw p2
|
|
|
|
|
|
|
|
:cond_5
|
|
|
|
const-string p1, "sink"
|
|
|
|
|
|
|
|
invoke-static {p1}, Ly/u/b/j;->a(Ljava/lang/String;)V
|
2020-02-20 19:33:18 +00:00
|
|
|
|
2020-03-27 22:23:51 +00:00
|
|
|
const/4 p1, 0x0
|
2020-02-20 19:33:18 +00:00
|
|
|
|
2020-03-27 22:23:51 +00:00
|
|
|
throw p1
|
2020-02-20 19:33:18 +00:00
|
|
|
.end method
|
|
|
|
|
2020-04-17 19:35:49 +00:00
|
|
|
.method public close()V
|
2020-04-17 16:36:30 +00:00
|
|
|
.locals 1
|
2020-03-27 22:23:51 +00:00
|
|
|
|
2020-04-17 19:35:49 +00:00
|
|
|
iget-object v0, p0, Ld0/m;->d:Ljava/io/InputStream;
|
2020-04-17 16:36:30 +00:00
|
|
|
|
2020-04-17 19:35:49 +00:00
|
|
|
invoke-virtual {v0}, Ljava/io/InputStream;->close()V
|
2020-04-17 16:36:30 +00:00
|
|
|
|
2020-04-17 17:35:24 +00:00
|
|
|
return-void
|
2020-04-17 19:35:49 +00:00
|
|
|
.end method
|
2020-04-17 16:36:30 +00:00
|
|
|
|
2020-04-17 19:35:49 +00:00
|
|
|
.method public timeout()Ld0/x;
|
|
|
|
.locals 1
|
2020-04-17 16:36:30 +00:00
|
|
|
|
2020-04-17 19:35:49 +00:00
|
|
|
iget-object v0, p0, Ld0/m;->e:Ld0/x;
|
2020-04-17 16:36:30 +00:00
|
|
|
|
2020-04-17 19:35:49 +00:00
|
|
|
return-object v0
|
|
|
|
.end method
|
2020-04-17 16:36:30 +00:00
|
|
|
|
2020-04-17 19:35:49 +00:00
|
|
|
.method public toString()Ljava/lang/String;
|
|
|
|
.locals 2
|
2020-04-17 16:36:30 +00:00
|
|
|
|
2020-04-17 19:35:49 +00:00
|
|
|
const-string v0, "source("
|
2020-04-17 16:36:30 +00:00
|
|
|
|
2020-04-17 19:35:49 +00:00
|
|
|
invoke-static {v0}, Lf/e/b/a/a;->a(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
iget-object v1, p0, Ld0/m;->d:Ljava/io/InputStream;
|
|
|
|
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
const/16 v1, 0x29
|
|
|
|
|
|
|
|
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
|
2020-02-20 19:33:18 +00:00
|
|
|
.end method
|