.class public final Lv9/h0$a;
.super Ljava/io/Reader;
.source ""


# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lv9/h0;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x19
    name = "a"
.end annotation


# instance fields
.field public r:Z

.field public s:Ljava/io/Reader;

.field public final t:Lha/h;

.field public final u:Ljava/nio/charset/Charset;


# direct methods
.method public constructor <init>(Lha/h;Ljava/nio/charset/Charset;)V
    .registers 4

    const-string v0, "source"

    invoke-static {p1, v0}, Lx/e;->f(Ljava/lang/Object;Ljava/lang/String;)V

    const-string v0, "charset"

    invoke-static {p2, v0}, Lx/e;->f(Ljava/lang/Object;Ljava/lang/String;)V

    invoke-direct {p0}, Ljava/io/Reader;-><init>()V

    iput-object p1, p0, Lv9/h0$a;->t:Lha/h;

    iput-object p2, p0, Lv9/h0$a;->u:Ljava/nio/charset/Charset;

    return-void
.end method


# virtual methods
.method public close()V
    .registers 2

    const/4 v0, 0x1

    iput-boolean v0, p0, Lv9/h0$a;->r:Z

    iget-object v0, p0, Lv9/h0$a;->s:Ljava/io/Reader;

    if-eqz v0, :cond_b

    invoke-virtual {v0}, Ljava/io/Reader;->close()V

    goto :goto_10

    :cond_b
    iget-object v0, p0, Lv9/h0$a;->t:Lha/h;

    invoke-interface {v0}, Lha/z;->close()V

    :goto_10
    return-void
.end method

.method public read([CII)I
    .registers 8

    const-string v0, "cbuf"

    invoke-static {p1, v0}, Lx/e;->f(Ljava/lang/Object;Ljava/lang/String;)V

    iget-boolean v0, p0, Lv9/h0$a;->r:Z

    if-nez v0, :cond_28

    iget-object v0, p0, Lv9/h0$a;->s:Ljava/io/Reader;

    if-eqz v0, :cond_e

    goto :goto_23

    :cond_e
    new-instance v0, Ljava/io/InputStreamReader;

    iget-object v1, p0, Lv9/h0$a;->t:Lha/h;

    invoke-interface {v1}, Lha/h;->X()Ljava/io/InputStream;

    move-result-object v1

    iget-object v2, p0, Lv9/h0$a;->t:Lha/h;

    iget-object v3, p0, Lv9/h0$a;->u:Ljava/nio/charset/Charset;

    invoke-static {v2, v3}, Lw9/c;->r(Lha/h;Ljava/nio/charset/Charset;)Ljava/nio/charset/Charset;

    move-result-object v2

    invoke-direct {v0, v1, v2}, Ljava/io/InputStreamReader;-><init>(Ljava/io/InputStream;Ljava/nio/charset/Charset;)V

    iput-object v0, p0, Lv9/h0$a;->s:Ljava/io/Reader;

    :goto_23
    invoke-virtual {v0, p1, p2, p3}, Ljava/io/Reader;->read([CII)I

    move-result p1

    return p1

    :cond_28
    new-instance p1, Ljava/io/IOException;

    const-string p2, "Stream closed"

    invoke-direct {p1, p2}, Ljava/io/IOException;-><init>(Ljava/lang/String;)V

    throw p1
.end method
