2019-07-24 11:27:29 +00:00
|
|
|
.class public final Lokio/i;
|
|
|
|
.super Ljava/lang/Object;
|
|
|
|
.source "InflaterSource.java"
|
|
|
|
|
|
|
|
# interfaces
|
|
|
|
.implements Lokio/r;
|
|
|
|
|
|
|
|
|
|
|
|
# instance fields
|
2019-10-11 21:55:41 +00:00
|
|
|
.field private byO:I
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
.field private final inflater:Ljava/util/zip/Inflater;
|
|
|
|
|
2019-10-11 21:55:41 +00:00
|
|
|
.field private final lZ:Lokio/d;
|
2019-10-09 23:16:36 +00:00
|
|
|
|
|
|
|
.field private w:Z
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
|
|
|
|
# direct methods
|
|
|
|
.method constructor <init>(Lokio/d;Ljava/util/zip/Inflater;)V
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
|
|
|
|
if-eqz p2, :cond_0
|
|
|
|
|
2019-10-11 21:55:41 +00:00
|
|
|
iput-object p1, p0, Lokio/i;->lZ:Lokio/d;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
iput-object p2, p0, Lokio/i;->inflater:Ljava/util/zip/Inflater;
|
|
|
|
|
|
|
|
return-void
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
new-instance p1, Ljava/lang/IllegalArgumentException;
|
|
|
|
|
|
|
|
const-string p2, "inflater == null"
|
|
|
|
|
|
|
|
invoke-direct {p1, p2}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
|
|
|
|
|
|
|
|
throw p1
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
new-instance p1, Ljava/lang/IllegalArgumentException;
|
|
|
|
|
|
|
|
const-string p2, "source == null"
|
|
|
|
|
|
|
|
invoke-direct {p1, p2}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
|
|
|
|
|
|
|
|
throw p1
|
|
|
|
.end method
|
|
|
|
|
2019-10-11 21:55:41 +00:00
|
|
|
.method private HG()V
|
2019-07-24 11:27:29 +00:00
|
|
|
.locals 4
|
|
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
|
|
value = {
|
|
|
|
Ljava/io/IOException;
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
2019-10-11 21:55:41 +00:00
|
|
|
iget v0, p0, Lokio/i;->byO:I
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
|
|
|
|
return-void
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
iget-object v1, p0, Lokio/i;->inflater:Ljava/util/zip/Inflater;
|
|
|
|
|
|
|
|
invoke-virtual {v1}, Ljava/util/zip/Inflater;->getRemaining()I
|
|
|
|
|
|
|
|
move-result v1
|
|
|
|
|
|
|
|
sub-int/2addr v0, v1
|
|
|
|
|
2019-10-11 21:55:41 +00:00
|
|
|
iget v1, p0, Lokio/i;->byO:I
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
sub-int/2addr v1, v0
|
|
|
|
|
2019-10-11 21:55:41 +00:00
|
|
|
iput v1, p0, Lokio/i;->byO:I
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-10-11 21:55:41 +00:00
|
|
|
iget-object v1, p0, Lokio/i;->lZ:Lokio/d;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
int-to-long v2, v0
|
|
|
|
|
2019-10-09 23:16:36 +00:00
|
|
|
invoke-interface {v1, v2, v3}, Lokio/d;->aB(J)V
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
|
|
|
|
# virtual methods
|
|
|
|
.method public final a(Lokio/c;J)J
|
|
|
|
.locals 6
|
|
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
|
|
value = {
|
|
|
|
Ljava/io/IOException;
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
const-wide/16 v0, 0x0
|
|
|
|
|
|
|
|
cmp-long v2, p2, v0
|
|
|
|
|
|
|
|
if-ltz v2, :cond_a
|
|
|
|
|
2019-10-09 23:16:36 +00:00
|
|
|
iget-boolean v2, p0, Lokio/i;->w:Z
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
if-nez v2, :cond_9
|
|
|
|
|
|
|
|
cmp-long v2, p2, v0
|
|
|
|
|
|
|
|
if-nez v2, :cond_0
|
|
|
|
|
|
|
|
return-wide v0
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
:goto_0
|
|
|
|
iget-object v0, p0, Lokio/i;->inflater:Ljava/util/zip/Inflater;
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Ljava/util/zip/Inflater;->needsInput()Z
|
|
|
|
|
|
|
|
move-result v0
|
|
|
|
|
|
|
|
const/4 v1, 0x1
|
|
|
|
|
|
|
|
const/4 v2, 0x0
|
|
|
|
|
|
|
|
if-nez v0, :cond_1
|
|
|
|
|
|
|
|
goto :goto_1
|
|
|
|
|
|
|
|
:cond_1
|
2019-10-11 21:55:41 +00:00
|
|
|
invoke-direct {p0}, Lokio/i;->HG()V
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
iget-object v0, p0, Lokio/i;->inflater:Ljava/util/zip/Inflater;
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Ljava/util/zip/Inflater;->getRemaining()I
|
|
|
|
|
|
|
|
move-result v0
|
|
|
|
|
|
|
|
if-nez v0, :cond_8
|
|
|
|
|
2019-10-11 21:55:41 +00:00
|
|
|
iget-object v0, p0, Lokio/i;->lZ:Lokio/d;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-10-11 21:55:41 +00:00
|
|
|
invoke-interface {v0}, Lokio/d;->Hg()Z
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
move-result v0
|
|
|
|
|
|
|
|
if-eqz v0, :cond_2
|
|
|
|
|
|
|
|
const/4 v2, 0x1
|
|
|
|
|
|
|
|
goto :goto_1
|
|
|
|
|
|
|
|
:cond_2
|
2019-10-11 21:55:41 +00:00
|
|
|
iget-object v0, p0, Lokio/i;->lZ:Lokio/d;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-10-11 21:55:41 +00:00
|
|
|
invoke-interface {v0}, Lokio/d;->Hd()Lokio/c;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
2019-10-11 21:55:41 +00:00
|
|
|
iget-object v0, v0, Lokio/c;->byD:Lokio/n;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
iget v3, v0, Lokio/n;->limit:I
|
|
|
|
|
|
|
|
iget v4, v0, Lokio/n;->pos:I
|
|
|
|
|
|
|
|
sub-int/2addr v3, v4
|
|
|
|
|
2019-10-11 21:55:41 +00:00
|
|
|
iput v3, p0, Lokio/i;->byO:I
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
iget-object v3, p0, Lokio/i;->inflater:Ljava/util/zip/Inflater;
|
|
|
|
|
|
|
|
iget-object v4, v0, Lokio/n;->data:[B
|
|
|
|
|
|
|
|
iget v0, v0, Lokio/n;->pos:I
|
|
|
|
|
2019-10-11 21:55:41 +00:00
|
|
|
iget v5, p0, Lokio/i;->byO:I
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
invoke-virtual {v3, v4, v0, v5}, Ljava/util/zip/Inflater;->setInput([BII)V
|
|
|
|
|
|
|
|
:goto_1
|
|
|
|
:try_start_0
|
2019-10-09 23:16:36 +00:00
|
|
|
invoke-virtual {p1, v1}, Lokio/c;->dx(I)Lokio/n;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
iget v1, v0, Lokio/n;->limit:I
|
|
|
|
|
|
|
|
rsub-int v1, v1, 0x2000
|
|
|
|
|
|
|
|
int-to-long v3, v1
|
|
|
|
|
|
|
|
invoke-static {p2, p3, v3, v4}, Ljava/lang/Math;->min(JJ)J
|
|
|
|
|
|
|
|
move-result-wide v3
|
|
|
|
|
|
|
|
long-to-int v1, v3
|
|
|
|
|
|
|
|
iget-object v3, p0, Lokio/i;->inflater:Ljava/util/zip/Inflater;
|
|
|
|
|
|
|
|
iget-object v4, v0, Lokio/n;->data:[B
|
|
|
|
|
|
|
|
iget v5, v0, Lokio/n;->limit:I
|
|
|
|
|
|
|
|
invoke-virtual {v3, v4, v5, v1}, Ljava/util/zip/Inflater;->inflate([BII)I
|
|
|
|
|
|
|
|
move-result v1
|
|
|
|
|
|
|
|
if-lez v1, :cond_3
|
|
|
|
|
|
|
|
iget p2, v0, Lokio/n;->limit:I
|
|
|
|
|
|
|
|
add-int/2addr p2, v1
|
|
|
|
|
|
|
|
iput p2, v0, Lokio/n;->limit:I
|
|
|
|
|
|
|
|
iget-wide p2, p1, Lokio/c;->size:J
|
|
|
|
|
|
|
|
int-to-long v0, v1
|
|
|
|
|
|
|
|
add-long/2addr p2, v0
|
|
|
|
|
|
|
|
iput-wide p2, p1, Lokio/c;->size:J
|
|
|
|
|
|
|
|
return-wide v0
|
|
|
|
|
|
|
|
:cond_3
|
|
|
|
iget-object v1, p0, Lokio/i;->inflater:Ljava/util/zip/Inflater;
|
|
|
|
|
|
|
|
invoke-virtual {v1}, Ljava/util/zip/Inflater;->finished()Z
|
|
|
|
|
|
|
|
move-result v1
|
|
|
|
|
|
|
|
if-nez v1, :cond_6
|
|
|
|
|
|
|
|
iget-object v1, p0, Lokio/i;->inflater:Ljava/util/zip/Inflater;
|
|
|
|
|
|
|
|
invoke-virtual {v1}, Ljava/util/zip/Inflater;->needsDictionary()Z
|
|
|
|
|
|
|
|
move-result v1
|
|
|
|
|
|
|
|
if-eqz v1, :cond_4
|
|
|
|
|
|
|
|
goto :goto_2
|
|
|
|
|
|
|
|
:cond_4
|
|
|
|
if-nez v2, :cond_5
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_5
|
|
|
|
new-instance p1, Ljava/io/EOFException;
|
|
|
|
|
|
|
|
const-string p2, "source exhausted prematurely"
|
|
|
|
|
|
|
|
invoke-direct {p1, p2}, Ljava/io/EOFException;-><init>(Ljava/lang/String;)V
|
|
|
|
|
|
|
|
throw p1
|
|
|
|
|
|
|
|
:cond_6
|
|
|
|
:goto_2
|
2019-10-11 21:55:41 +00:00
|
|
|
invoke-direct {p0}, Lokio/i;->HG()V
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
iget p2, v0, Lokio/n;->pos:I
|
|
|
|
|
|
|
|
iget p3, v0, Lokio/n;->limit:I
|
|
|
|
|
|
|
|
if-ne p2, p3, :cond_7
|
|
|
|
|
2019-10-11 21:55:41 +00:00
|
|
|
invoke-virtual {v0}, Lokio/n;->HJ()Lokio/n;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
move-result-object p2
|
|
|
|
|
2019-10-11 21:55:41 +00:00
|
|
|
iput-object p2, p1, Lokio/c;->byD:Lokio/n;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
invoke-static {v0}, Lokio/o;->b(Lokio/n;)V
|
|
|
|
:try_end_0
|
|
|
|
.catch Ljava/util/zip/DataFormatException; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
|
|
|
|
:cond_7
|
|
|
|
const-wide/16 p1, -0x1
|
|
|
|
|
|
|
|
return-wide p1
|
|
|
|
|
|
|
|
:catch_0
|
|
|
|
move-exception p1
|
|
|
|
|
|
|
|
new-instance p2, Ljava/io/IOException;
|
|
|
|
|
|
|
|
invoke-direct {p2, p1}, Ljava/io/IOException;-><init>(Ljava/lang/Throwable;)V
|
|
|
|
|
|
|
|
throw p2
|
|
|
|
|
|
|
|
:cond_8
|
|
|
|
new-instance p1, Ljava/lang/IllegalStateException;
|
|
|
|
|
|
|
|
const-string p2, "?"
|
|
|
|
|
|
|
|
invoke-direct {p1, p2}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
|
|
|
|
|
|
|
|
throw p1
|
|
|
|
|
|
|
|
:cond_9
|
|
|
|
new-instance p1, Ljava/lang/IllegalStateException;
|
|
|
|
|
|
|
|
const-string p2, "closed"
|
|
|
|
|
|
|
|
invoke-direct {p1, p2}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
|
|
|
|
|
|
|
|
throw p1
|
|
|
|
|
|
|
|
:cond_a
|
|
|
|
new-instance p1, Ljava/lang/IllegalArgumentException;
|
|
|
|
|
|
|
|
invoke-static {p2, p3}, Ljava/lang/String;->valueOf(J)Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object p2
|
|
|
|
|
|
|
|
const-string p3, "byteCount < 0: "
|
|
|
|
|
|
|
|
invoke-virtual {p3, p2}, Ljava/lang/String;->concat(Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object p2
|
|
|
|
|
|
|
|
invoke-direct {p1, p2}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
|
|
|
|
|
|
|
|
goto :goto_4
|
|
|
|
|
|
|
|
:goto_3
|
|
|
|
throw p1
|
|
|
|
|
|
|
|
:goto_4
|
|
|
|
goto :goto_3
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public final close()V
|
|
|
|
.locals 1
|
|
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
|
|
value = {
|
|
|
|
Ljava/io/IOException;
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
2019-10-09 23:16:36 +00:00
|
|
|
iget-boolean v0, p0, Lokio/i;->w:Z
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
|
|
|
|
return-void
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
iget-object v0, p0, Lokio/i;->inflater:Ljava/util/zip/Inflater;
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Ljava/util/zip/Inflater;->end()V
|
|
|
|
|
|
|
|
const/4 v0, 0x1
|
|
|
|
|
2019-10-09 23:16:36 +00:00
|
|
|
iput-boolean v0, p0, Lokio/i;->w:Z
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-10-11 21:55:41 +00:00
|
|
|
iget-object v0, p0, Lokio/i;->lZ:Lokio/d;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
invoke-interface {v0}, Lokio/d;->close()V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public final timeout()Lokio/s;
|
|
|
|
.locals 1
|
|
|
|
|
2019-10-11 21:55:41 +00:00
|
|
|
iget-object v0, p0, Lokio/i;->lZ:Lokio/d;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
invoke-interface {v0}, Lokio/d;->timeout()Lokio/s;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
return-object v0
|
|
|
|
.end method
|