331 lines
7.5 KiB
Smali
331 lines
7.5 KiB
Smali
.class final Lokhttp3/internal/d/a$c;
|
|
.super Lokhttp3/internal/d/a$a;
|
|
.source "Http1Codec.java"
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/EnclosingClass;
|
|
value = Lokhttp3/internal/d/a;
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/InnerClass;
|
|
accessFlags = 0x0
|
|
name = "c"
|
|
.end annotation
|
|
|
|
|
|
# instance fields
|
|
.field private final biD:Lokhttp3/s;
|
|
|
|
.field final synthetic bqb:Lokhttp3/internal/d/a;
|
|
|
|
.field private bqc:J
|
|
|
|
.field private bqd:Z
|
|
|
|
|
|
# direct methods
|
|
.method constructor <init>(Lokhttp3/internal/d/a;Lokhttp3/s;)V
|
|
.locals 2
|
|
|
|
iput-object p1, p0, Lokhttp3/internal/d/a$c;->bqb:Lokhttp3/internal/d/a;
|
|
|
|
const/4 v0, 0x0
|
|
|
|
invoke-direct {p0, p1, v0}, Lokhttp3/internal/d/a$a;-><init>(Lokhttp3/internal/d/a;B)V
|
|
|
|
const-wide/16 v0, -0x1
|
|
|
|
iput-wide v0, p0, Lokhttp3/internal/d/a$c;->bqc:J
|
|
|
|
const/4 p1, 0x1
|
|
|
|
iput-boolean p1, p0, Lokhttp3/internal/d/a$c;->bqd:Z
|
|
|
|
iput-object p2, p0, Lokhttp3/internal/d/a$c;->biD:Lokhttp3/s;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public final a(Lokio/c;J)J
|
|
.locals 9
|
|
.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_9
|
|
|
|
iget-boolean v2, p0, Lokhttp3/internal/d/a$c;->closed:Z
|
|
|
|
if-nez v2, :cond_8
|
|
|
|
iget-boolean v2, p0, Lokhttp3/internal/d/a$c;->bqd:Z
|
|
|
|
const-wide/16 v3, -0x1
|
|
|
|
if-nez v2, :cond_0
|
|
|
|
return-wide v3
|
|
|
|
:cond_0
|
|
iget-wide v5, p0, Lokhttp3/internal/d/a$c;->bqc:J
|
|
|
|
const/4 v2, 0x0
|
|
|
|
cmp-long v7, v5, v0
|
|
|
|
if-eqz v7, :cond_1
|
|
|
|
cmp-long v7, v5, v3
|
|
|
|
if-nez v7, :cond_5
|
|
|
|
:cond_1
|
|
iget-wide v5, p0, Lokhttp3/internal/d/a$c;->bqc:J
|
|
|
|
cmp-long v7, v5, v3
|
|
|
|
if-eqz v7, :cond_2
|
|
|
|
iget-object v5, p0, Lokhttp3/internal/d/a$c;->bqb:Lokhttp3/internal/d/a;
|
|
|
|
iget-object v5, v5, Lokhttp3/internal/d/a;->bob:Lokio/d;
|
|
|
|
invoke-interface {v5}, Lokio/d;->Cd()Ljava/lang/String;
|
|
|
|
:cond_2
|
|
:try_start_0
|
|
iget-object v5, p0, Lokhttp3/internal/d/a$c;->bqb:Lokhttp3/internal/d/a;
|
|
|
|
iget-object v5, v5, Lokhttp3/internal/d/a;->bob:Lokio/d;
|
|
|
|
invoke-interface {v5}, Lokio/d;->Cb()J
|
|
|
|
move-result-wide v5
|
|
|
|
iput-wide v5, p0, Lokhttp3/internal/d/a$c;->bqc:J
|
|
|
|
iget-object v5, p0, Lokhttp3/internal/d/a$c;->bqb:Lokhttp3/internal/d/a;
|
|
|
|
iget-object v5, v5, Lokhttp3/internal/d/a;->bob:Lokio/d;
|
|
|
|
invoke-interface {v5}, Lokio/d;->Cd()Ljava/lang/String;
|
|
|
|
move-result-object v5
|
|
|
|
invoke-virtual {v5}, Ljava/lang/String;->trim()Ljava/lang/String;
|
|
|
|
move-result-object v5
|
|
|
|
iget-wide v6, p0, Lokhttp3/internal/d/a$c;->bqc:J
|
|
|
|
cmp-long v8, v6, v0
|
|
|
|
if-ltz v8, :cond_7
|
|
|
|
invoke-virtual {v5}, Ljava/lang/String;->isEmpty()Z
|
|
|
|
move-result v6
|
|
|
|
if-nez v6, :cond_3
|
|
|
|
const-string v6, ";"
|
|
|
|
invoke-virtual {v5, v6}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z
|
|
|
|
move-result v6
|
|
:try_end_0
|
|
.catch Ljava/lang/NumberFormatException; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
if-eqz v6, :cond_7
|
|
|
|
:cond_3
|
|
iget-wide v5, p0, Lokhttp3/internal/d/a$c;->bqc:J
|
|
|
|
cmp-long v7, v5, v0
|
|
|
|
if-nez v7, :cond_4
|
|
|
|
iput-boolean v2, p0, Lokhttp3/internal/d/a$c;->bqd:Z
|
|
|
|
iget-object v0, p0, Lokhttp3/internal/d/a$c;->bqb:Lokhttp3/internal/d/a;
|
|
|
|
iget-object v0, v0, Lokhttp3/internal/d/a;->bnx:Lokhttp3/t;
|
|
|
|
iget-object v0, v0, Lokhttp3/t;->cookieJar:Lokhttp3/m;
|
|
|
|
iget-object v1, p0, Lokhttp3/internal/d/a$c;->biD:Lokhttp3/s;
|
|
|
|
iget-object v5, p0, Lokhttp3/internal/d/a$c;->bqb:Lokhttp3/internal/d/a;
|
|
|
|
invoke-virtual {v5}, Lokhttp3/internal/d/a;->Bc()Lokhttp3/Headers;
|
|
|
|
move-result-object v5
|
|
|
|
invoke-static {v0, v1, v5}, Lokhttp3/internal/c/e;->a(Lokhttp3/m;Lokhttp3/s;Lokhttp3/Headers;)V
|
|
|
|
const/4 v0, 0x1
|
|
|
|
const/4 v1, 0x0
|
|
|
|
invoke-virtual {p0, v0, v1}, Lokhttp3/internal/d/a$c;->a(ZLjava/io/IOException;)V
|
|
|
|
:cond_4
|
|
iget-boolean v0, p0, Lokhttp3/internal/d/a$c;->bqd:Z
|
|
|
|
if-nez v0, :cond_5
|
|
|
|
return-wide v3
|
|
|
|
:cond_5
|
|
iget-wide v0, p0, Lokhttp3/internal/d/a$c;->bqc:J
|
|
|
|
invoke-static {p2, p3, v0, v1}, Ljava/lang/Math;->min(JJ)J
|
|
|
|
move-result-wide p2
|
|
|
|
invoke-super {p0, p1, p2, p3}, Lokhttp3/internal/d/a$a;->a(Lokio/c;J)J
|
|
|
|
move-result-wide p1
|
|
|
|
cmp-long p3, p1, v3
|
|
|
|
if-eqz p3, :cond_6
|
|
|
|
iget-wide v0, p0, Lokhttp3/internal/d/a$c;->bqc:J
|
|
|
|
sub-long/2addr v0, p1
|
|
|
|
iput-wide v0, p0, Lokhttp3/internal/d/a$c;->bqc:J
|
|
|
|
return-wide p1
|
|
|
|
:cond_6
|
|
new-instance p1, Ljava/net/ProtocolException;
|
|
|
|
const-string p2, "unexpected end of stream"
|
|
|
|
invoke-direct {p1, p2}, Ljava/net/ProtocolException;-><init>(Ljava/lang/String;)V
|
|
|
|
invoke-virtual {p0, v2, p1}, Lokhttp3/internal/d/a$c;->a(ZLjava/io/IOException;)V
|
|
|
|
throw p1
|
|
|
|
:cond_7
|
|
:try_start_1
|
|
new-instance p1, Ljava/net/ProtocolException;
|
|
|
|
new-instance p2, Ljava/lang/StringBuilder;
|
|
|
|
const-string p3, "expected chunk size and optional extensions but was \""
|
|
|
|
invoke-direct {p2, p3}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
|
|
|
|
iget-wide v0, p0, Lokhttp3/internal/d/a$c;->bqc:J
|
|
|
|
invoke-virtual {p2, v0, v1}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {p2, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
const-string p3, "\""
|
|
|
|
invoke-virtual {p2, p3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {p2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-direct {p1, p2}, Ljava/net/ProtocolException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw p1
|
|
:try_end_1
|
|
.catch Ljava/lang/NumberFormatException; {:try_start_1 .. :try_end_1} :catch_0
|
|
|
|
:catch_0
|
|
move-exception p1
|
|
|
|
new-instance p2, Ljava/net/ProtocolException;
|
|
|
|
invoke-virtual {p1}, Ljava/lang/NumberFormatException;->getMessage()Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-direct {p2, p1}, Ljava/net/ProtocolException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw p2
|
|
|
|
:cond_8
|
|
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_9
|
|
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
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method public final close()V
|
|
.locals 2
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
iget-boolean v0, p0, Lokhttp3/internal/d/a$c;->closed:Z
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
iget-boolean v0, p0, Lokhttp3/internal/d/a$c;->bqd:Z
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
sget-object v0, Ljava/util/concurrent/TimeUnit;->MILLISECONDS:Ljava/util/concurrent/TimeUnit;
|
|
|
|
invoke-static {p0, v0}, Lokhttp3/internal/c;->a(Lokio/q;Ljava/util/concurrent/TimeUnit;)Z
|
|
|
|
move-result v0
|
|
|
|
if-nez v0, :cond_1
|
|
|
|
const/4 v0, 0x0
|
|
|
|
const/4 v1, 0x0
|
|
|
|
invoke-virtual {p0, v0, v1}, Lokhttp3/internal/d/a$c;->a(ZLjava/io/IOException;)V
|
|
|
|
:cond_1
|
|
const/4 v0, 0x1
|
|
|
|
iput-boolean v0, p0, Lokhttp3/internal/d/a$c;->closed:Z
|
|
|
|
return-void
|
|
.end method
|