b$a.smali

.class abstract Lokhttp3/a/a/b$a;
.super Ljava/lang/Object;
.source "Http1Codec.java"

# interfaces
.implements Lokio/Source;


# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lokhttp3/a/a/b;
.end annotation

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


# instance fields
.field protected final a:Lokio/ForwardingTimeout;

.field protected b:Z

.field protected c:J

.field final synthetic d:Lokhttp3/a/a/b;


# direct methods
.method private constructor <init>(Lokhttp3/a/a/b;)V
    .registers 4

    .line 1
    iput-object p1, p0, Lokhttp3/a/a/b$a;->d:Lokhttp3/a/a/b;

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

    .line 2
    new-instance p1, Lokio/ForwardingTimeout;

    iget-object v0, p0, Lokhttp3/a/a/b$a;->d:Lokhttp3/a/a/b;

    iget-object v0, v0, Lokhttp3/a/a/b;->c:Lokio/BufferedSource;

    invoke-interface {v0}, Lokio/Source;->timeout()Lokio/Timeout;

    move-result-object v0

    invoke-direct {p1, v0}, Lokio/ForwardingTimeout;-><init>(Lokio/Timeout;)V

    iput-object p1, p0, Lokhttp3/a/a/b$a;->a:Lokio/ForwardingTimeout;

    const-wide/16 v0, 0x0

    .line 3
    iput-wide v0, p0, Lokhttp3/a/a/b$a;->c:J

    return-void
.end method

.method synthetic constructor <init>(Lokhttp3/a/a/b;Lokhttp3/a/a/a;)V
    .registers 3

    .line 4
    invoke-direct {p0, p1}, Lokhttp3/a/a/b$a;-><init>(Lokhttp3/a/a/b;)V

    return-void
.end method


# virtual methods
.method protected final a(ZLjava/io/IOException;)V
    .registers 12
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;
        }
    .end annotation

    .line 1
    iget-object v0, p0, Lokhttp3/a/a/b$a;->d:Lokhttp3/a/a/b;

    iget v1, v0, Lokhttp3/a/a/b;->e:I

    const/4 v2, 0x6

    if-ne v1, v2, :cond_8

    return-void

    :cond_8
    const/4 v3, 0x5

    if-ne v1, v3, :cond_21

    .line 2
    iget-object v1, p0, Lokhttp3/a/a/b$a;->a:Lokio/ForwardingTimeout;

    invoke-virtual {v0, v1}, Lokhttp3/a/a/b;->a(Lokio/ForwardingTimeout;)V

    .line 3
    iget-object v5, p0, Lokhttp3/a/a/b$a;->d:Lokhttp3/a/a/b;

    iput v2, v5, Lokhttp3/a/a/b;->e:I

    .line 4
    iget-object v3, v5, Lokhttp3/a/a/b;->b:Lokhttp3/internal/connection/g;

    if-eqz v3, :cond_20

    xor-int/lit8 v4, p1, 0x1

    .line 5
    iget-wide v6, p0, Lokhttp3/a/a/b$a;->c:J

    move-object v8, p2

    invoke-virtual/range {v3 .. v8}, Lokhttp3/internal/connection/g;->a(ZLokhttp3/internal/http/HttpCodec;JLjava/io/IOException;)V

    :cond_20
    return-void

    .line 6
    :cond_21
    new-instance p1, Ljava/lang/IllegalStateException;

    new-instance p2, Ljava/lang/StringBuilder;

    invoke-direct {p2}, Ljava/lang/StringBuilder;-><init>()V

    const-string v0, "state: "

    invoke-virtual {p2, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    iget-object v0, p0, Lokhttp3/a/a/b$a;->d:Lokhttp3/a/a/b;

    iget v0, v0, Lokhttp3/a/a/b;->e:I

    invoke-virtual {p2, v0}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    invoke-virtual {p2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object p2

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

    throw p1
.end method

.method public read(Lokio/Buffer;J)J
    .registers 6
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;
        }
    .end annotation

    .line 1
    :try_start_0
    iget-object v0, p0, Lokhttp3/a/a/b$a;->d:Lokhttp3/a/a/b;

    iget-object v0, v0, Lokhttp3/a/a/b;->c:Lokio/BufferedSource;

    invoke-interface {v0, p1, p2, p3}, Lokio/Source;->read(Lokio/Buffer;J)J

    move-result-wide p1

    const-wide/16 v0, 0x0

    cmp-long p3, p1, v0

    if-lez p3, :cond_13

    .line 2
    iget-wide v0, p0, Lokhttp3/a/a/b$a;->c:J

    add-long/2addr v0, p1

    iput-wide v0, p0, Lokhttp3/a/a/b$a;->c:J
    :try_end_13
    .catch Ljava/io/IOException; {:try_start_0 .. :try_end_13} :catch_14

    :cond_13
    return-wide p1

    :catch_14
    move-exception p1

    const/4 p2, 0x0

    .line 3
    invoke-virtual {p0, p2, p1}, Lokhttp3/a/a/b$a;->a(ZLjava/io/IOException;)V

    .line 4
    throw p1
.end method

.method public timeout()Lokio/Timeout;
    .registers 2

    .line 1
    iget-object v0, p0, Lokhttp3/a/a/b$a;->a:Lokio/ForwardingTimeout;

    return-object v0
.end method