.class public final Lokio/i; .super Ljava/lang/Object; .source "InflaterSource.java" # interfaces .implements Lokio/q; # instance fields .field private final bql:Lokio/d; .field private bwy:I .field private closed:Z .field private final inflater:Ljava/util/zip/Inflater; # direct methods .method constructor (Lokio/d;Ljava/util/zip/Inflater;)V .locals 0 invoke-direct {p0}, Ljava/lang/Object;->()V if-eqz p1, :cond_1 if-eqz p2, :cond_0 iput-object p1, p0, Lokio/i;->bql:Lokio/d; 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;->(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;->(Ljava/lang/String;)V throw p1 .end method .method private Ef()V .locals 4 .annotation system Ldalvik/annotation/Throws; value = { Ljava/io/IOException; } .end annotation iget v0, p0, Lokio/i;->bwy:I 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 iget v1, p0, Lokio/i;->bwy:I sub-int/2addr v1, v0 iput v1, p0, Lokio/i;->bwy:I iget-object v1, p0, Lokio/i;->bql:Lokio/d; int-to-long v2, v0 invoke-interface {v1, v2, v3}, Lokio/d;->aC(J)V 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 iget-boolean v2, p0, Lokio/i;->closed:Z 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 invoke-direct {p0}, Lokio/i;->Ef()V 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 iget-object v0, p0, Lokio/i;->bql:Lokio/d; invoke-interface {v0}, Lokio/d;->DI()Z move-result v0 if-eqz v0, :cond_2 const/4 v2, 0x1 goto :goto_1 :cond_2 iget-object v0, p0, Lokio/i;->bql:Lokio/d; invoke-interface {v0}, Lokio/d;->DG()Lokio/c; move-result-object v0 iget-object v0, v0, Lokio/c;->bwo:Lokio/m; iget v3, v0, Lokio/m;->limit:I iget v4, v0, Lokio/m;->pos:I sub-int/2addr v3, v4 iput v3, p0, Lokio/i;->bwy:I iget-object v3, p0, Lokio/i;->inflater:Ljava/util/zip/Inflater; iget-object v4, v0, Lokio/m;->data:[B iget v0, v0, Lokio/m;->pos:I iget v5, p0, Lokio/i;->bwy:I invoke-virtual {v3, v4, v0, v5}, Ljava/util/zip/Inflater;->setInput([BII)V :goto_1 :try_start_0 invoke-virtual {p1, v1}, Lokio/c;->dA(I)Lokio/m; move-result-object v0 iget v1, v0, Lokio/m;->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/m;->data:[B iget v5, v0, Lokio/m;->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/m;->limit:I add-int/2addr p2, v1 iput p2, v0, Lokio/m;->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;->(Ljava/lang/String;)V throw p1 :cond_6 :goto_2 invoke-direct {p0}, Lokio/i;->Ef()V iget p2, v0, Lokio/m;->pos:I iget p3, v0, Lokio/m;->limit:I if-ne p2, p3, :cond_7 invoke-virtual {v0}, Lokio/m;->Ei()Lokio/m; move-result-object p2 iput-object p2, p1, Lokio/c;->bwo:Lokio/m; invoke-static {v0}, Lokio/n;->b(Lokio/m;)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;->(Ljava/lang/Throwable;)V throw p2 :cond_8 new-instance p1, Ljava/lang/IllegalStateException; const-string p2, "?" invoke-direct {p1, p2}, Ljava/lang/IllegalStateException;->(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;->(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;->(Ljava/lang/String;)V throw p1 return-void .end method .method public final close()V .locals 1 .annotation system Ldalvik/annotation/Throws; value = { Ljava/io/IOException; } .end annotation iget-boolean v0, p0, Lokio/i;->closed:Z 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 iput-boolean v0, p0, Lokio/i;->closed:Z iget-object v0, p0, Lokio/i;->bql:Lokio/d; invoke-interface {v0}, Lokio/d;->close()V return-void .end method .method public final timeout()Lokio/r; .locals 1 iget-object v0, p0, Lokio/i;->bql:Lokio/d; invoke-interface {v0}, Lokio/d;->timeout()Lokio/r; move-result-object v0 return-object v0 .end method