393 lines
7 KiB
Smali
393 lines
7 KiB
Smali
.class public final Lp0/l;
|
|
.super Ljava/lang/Object;
|
|
.source "InflaterSource.kt"
|
|
|
|
# interfaces
|
|
.implements Lp0/w;
|
|
|
|
|
|
# instance fields
|
|
.field public d:I
|
|
|
|
.field public e:Z
|
|
|
|
.field public final f:Lp0/g;
|
|
|
|
.field public final g:Ljava/util/zip/Inflater;
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(Lp0/g;Ljava/util/zip/Inflater;)V
|
|
.locals 1
|
|
|
|
const-string v0, "source"
|
|
|
|
invoke-static {p1, v0}, Lk0/o/c/i;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const-string v0, "inflater"
|
|
|
|
invoke-static {p2, v0}, Lk0/o/c/i;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
iput-object p1, p0, Lp0/l;->f:Lp0/g;
|
|
|
|
iput-object p2, p0, Lp0/l;->g:Ljava/util/zip/Inflater;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public B0(Lp0/e;J)J
|
|
.locals 7
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
const-string v0, "sink"
|
|
|
|
invoke-static {p1, v0}, Lk0/o/c/i;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const-wide/16 v0, 0x0
|
|
|
|
const/4 v2, 0x1
|
|
|
|
cmp-long v3, p2, v0
|
|
|
|
if-ltz v3, :cond_0
|
|
|
|
const/4 v4, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 v4, 0x0
|
|
|
|
:goto_0
|
|
if-eqz v4, :cond_d
|
|
|
|
iget-boolean v4, p0, Lp0/l;->e:Z
|
|
|
|
xor-int/2addr v4, v2
|
|
|
|
if-eqz v4, :cond_c
|
|
|
|
if-nez v3, :cond_1
|
|
|
|
return-wide v0
|
|
|
|
:cond_1
|
|
:goto_1
|
|
iget-object v0, p0, Lp0/l;->g:Ljava/util/zip/Inflater;
|
|
|
|
invoke-virtual {v0}, Ljava/util/zip/Inflater;->needsInput()Z
|
|
|
|
move-result v0
|
|
|
|
if-nez v0, :cond_2
|
|
|
|
goto :goto_3
|
|
|
|
:cond_2
|
|
invoke-virtual {p0}, Lp0/l;->a()V
|
|
|
|
iget-object v0, p0, Lp0/l;->g:Ljava/util/zip/Inflater;
|
|
|
|
invoke-virtual {v0}, Ljava/util/zip/Inflater;->getRemaining()I
|
|
|
|
move-result v0
|
|
|
|
if-nez v0, :cond_3
|
|
|
|
const/4 v0, 0x1
|
|
|
|
goto :goto_2
|
|
|
|
:cond_3
|
|
const/4 v0, 0x0
|
|
|
|
:goto_2
|
|
if-eqz v0, :cond_b
|
|
|
|
iget-object v0, p0, Lp0/l;->f:Lp0/g;
|
|
|
|
invoke-interface {v0}, Lp0/g;->J()Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_4
|
|
|
|
const/4 v0, 0x1
|
|
|
|
goto :goto_4
|
|
|
|
:cond_4
|
|
iget-object v0, p0, Lp0/l;->f:Lp0/g;
|
|
|
|
invoke-interface {v0}, Lp0/g;->h()Lp0/e;
|
|
|
|
move-result-object v0
|
|
|
|
iget-object v0, v0, Lp0/e;->d:Lp0/r;
|
|
|
|
if-eqz v0, :cond_a
|
|
|
|
iget v1, v0, Lp0/r;->c:I
|
|
|
|
iget v3, v0, Lp0/r;->b:I
|
|
|
|
sub-int/2addr v1, v3
|
|
|
|
iput v1, p0, Lp0/l;->d:I
|
|
|
|
iget-object v4, p0, Lp0/l;->g:Ljava/util/zip/Inflater;
|
|
|
|
iget-object v0, v0, Lp0/r;->a:[B
|
|
|
|
invoke-virtual {v4, v0, v3, v1}, Ljava/util/zip/Inflater;->setInput([BII)V
|
|
|
|
:goto_3
|
|
const/4 v0, 0x0
|
|
|
|
:goto_4
|
|
:try_start_0
|
|
invoke-virtual {p1, v2}, Lp0/e;->C(I)Lp0/r;
|
|
|
|
move-result-object v1
|
|
|
|
iget v3, v1, Lp0/r;->c:I
|
|
|
|
rsub-int v3, v3, 0x2000
|
|
|
|
int-to-long v3, v3
|
|
|
|
invoke-static {p2, p3, v3, v4}, Ljava/lang/Math;->min(JJ)J
|
|
|
|
move-result-wide v3
|
|
|
|
long-to-int v4, v3
|
|
|
|
iget-object v3, p0, Lp0/l;->g:Ljava/util/zip/Inflater;
|
|
|
|
iget-object v5, v1, Lp0/r;->a:[B
|
|
|
|
iget v6, v1, Lp0/r;->c:I
|
|
|
|
invoke-virtual {v3, v5, v6, v4}, Ljava/util/zip/Inflater;->inflate([BII)I
|
|
|
|
move-result v3
|
|
|
|
if-lez v3, :cond_5
|
|
|
|
iget p2, v1, Lp0/r;->c:I
|
|
|
|
add-int/2addr p2, v3
|
|
|
|
iput p2, v1, Lp0/r;->c:I
|
|
|
|
iget-wide p2, p1, Lp0/e;->e:J
|
|
|
|
int-to-long v0, v3
|
|
|
|
add-long/2addr p2, v0
|
|
|
|
iput-wide p2, p1, Lp0/e;->e:J
|
|
|
|
return-wide v0
|
|
|
|
:cond_5
|
|
iget-object v3, p0, Lp0/l;->g:Ljava/util/zip/Inflater;
|
|
|
|
invoke-virtual {v3}, Ljava/util/zip/Inflater;->finished()Z
|
|
|
|
move-result v3
|
|
|
|
if-nez v3, :cond_8
|
|
|
|
iget-object v3, p0, Lp0/l;->g:Ljava/util/zip/Inflater;
|
|
|
|
invoke-virtual {v3}, Ljava/util/zip/Inflater;->needsDictionary()Z
|
|
|
|
move-result v3
|
|
|
|
if-eqz v3, :cond_6
|
|
|
|
goto :goto_5
|
|
|
|
:cond_6
|
|
if-nez v0, :cond_7
|
|
|
|
goto :goto_1
|
|
|
|
:cond_7
|
|
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_8
|
|
:goto_5
|
|
invoke-virtual {p0}, Lp0/l;->a()V
|
|
|
|
iget p2, v1, Lp0/r;->b:I
|
|
|
|
iget p3, v1, Lp0/r;->c:I
|
|
|
|
if-ne p2, p3, :cond_9
|
|
|
|
invoke-virtual {v1}, Lp0/r;->a()Lp0/r;
|
|
|
|
move-result-object p2
|
|
|
|
iput-object p2, p1, Lp0/e;->d:Lp0/r;
|
|
|
|
invoke-static {v1}, Lp0/s;->a(Lp0/r;)V
|
|
:try_end_0
|
|
.catch Ljava/util/zip/DataFormatException; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
:cond_9
|
|
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_a
|
|
invoke-static {}, Lk0/o/c/i;->throwNpe()V
|
|
|
|
const/4 p1, 0x0
|
|
|
|
throw p1
|
|
|
|
:cond_b
|
|
new-instance p1, Ljava/lang/IllegalStateException;
|
|
|
|
const-string p2, "?"
|
|
|
|
invoke-virtual {p2}, Ljava/lang/Object;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-direct {p1, p2}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw p1
|
|
|
|
:cond_c
|
|
new-instance p1, Ljava/lang/IllegalStateException;
|
|
|
|
const-string p2, "closed"
|
|
|
|
invoke-virtual {p2}, Ljava/lang/Object;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-direct {p1, p2}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw p1
|
|
|
|
:cond_d
|
|
const-string p1, "byteCount < 0: "
|
|
|
|
invoke-static {p1, p2, p3}, Lf/e/b/a/a;->l(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
|
|
.end method
|
|
|
|
.method public final a()V
|
|
.locals 4
|
|
|
|
iget v0, p0, Lp0/l;->d:I
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
iget-object v1, p0, Lp0/l;->g:Ljava/util/zip/Inflater;
|
|
|
|
invoke-virtual {v1}, Ljava/util/zip/Inflater;->getRemaining()I
|
|
|
|
move-result v1
|
|
|
|
sub-int/2addr v0, v1
|
|
|
|
iget v1, p0, Lp0/l;->d:I
|
|
|
|
sub-int/2addr v1, v0
|
|
|
|
iput v1, p0, Lp0/l;->d:I
|
|
|
|
iget-object v1, p0, Lp0/l;->f:Lp0/g;
|
|
|
|
int-to-long v2, v0
|
|
|
|
invoke-interface {v1, v2, v3}, Lp0/g;->skip(J)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public close()V
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
iget-boolean v0, p0, Lp0/l;->e:Z
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
iget-object v0, p0, Lp0/l;->g:Ljava/util/zip/Inflater;
|
|
|
|
invoke-virtual {v0}, Ljava/util/zip/Inflater;->end()V
|
|
|
|
const/4 v0, 0x1
|
|
|
|
iput-boolean v0, p0, Lp0/l;->e:Z
|
|
|
|
iget-object v0, p0, Lp0/l;->f:Lp0/g;
|
|
|
|
invoke-interface {v0}, Lp0/w;->close()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public timeout()Lp0/x;
|
|
.locals 1
|
|
|
|
iget-object v0, p0, Lp0/l;->f:Lp0/g;
|
|
|
|
invoke-interface {v0}, Lp0/w;->timeout()Lp0/x;
|
|
|
|
move-result-object v0
|
|
|
|
return-object v0
|
|
.end method
|