215 lines
4.8 KiB
Smali
215 lines
4.8 KiB
Smali
.class final Lokhttp3/internal/d/a$d;
|
|
.super Ljava/lang/Object;
|
|
.source "Http1Codec.java"
|
|
|
|
# interfaces
|
|
.implements Lokio/q;
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/EnclosingClass;
|
|
value = Lokhttp3/internal/d/a;
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/InnerClass;
|
|
accessFlags = 0x10
|
|
name = "d"
|
|
.end annotation
|
|
|
|
|
|
# instance fields
|
|
.field private final bxD:Lokio/g;
|
|
|
|
.field final synthetic bxF:Lokhttp3/internal/d/a;
|
|
|
|
.field private bxI:J
|
|
|
|
.field private closed:Z
|
|
|
|
|
|
# direct methods
|
|
.method constructor <init>(Lokhttp3/internal/d/a;J)V
|
|
.locals 1
|
|
|
|
iput-object p1, p0, Lokhttp3/internal/d/a$d;->bxF:Lokhttp3/internal/d/a;
|
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
new-instance p1, Lokio/g;
|
|
|
|
iget-object v0, p0, Lokhttp3/internal/d/a$d;->bxF:Lokhttp3/internal/d/a;
|
|
|
|
iget-object v0, v0, Lokhttp3/internal/d/a;->bwU:Lokio/BufferedSink;
|
|
|
|
invoke-interface {v0}, Lokio/BufferedSink;->timeout()Lokio/s;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-direct {p1, v0}, Lokio/g;-><init>(Lokio/s;)V
|
|
|
|
iput-object p1, p0, Lokhttp3/internal/d/a$d;->bxD:Lokio/g;
|
|
|
|
iput-wide p2, p0, Lokhttp3/internal/d/a$d;->bxI:J
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public final close()V
|
|
.locals 5
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
iget-boolean v0, p0, Lokhttp3/internal/d/a$d;->closed:Z
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
const/4 v0, 0x1
|
|
|
|
iput-boolean v0, p0, Lokhttp3/internal/d/a$d;->closed:Z
|
|
|
|
iget-wide v0, p0, Lokhttp3/internal/d/a$d;->bxI:J
|
|
|
|
const-wide/16 v2, 0x0
|
|
|
|
cmp-long v4, v0, v2
|
|
|
|
if-gtz v4, :cond_1
|
|
|
|
iget-object v0, p0, Lokhttp3/internal/d/a$d;->bxD:Lokio/g;
|
|
|
|
invoke-static {v0}, Lokhttp3/internal/d/a;->a(Lokio/g;)V
|
|
|
|
iget-object v0, p0, Lokhttp3/internal/d/a$d;->bxF:Lokhttp3/internal/d/a;
|
|
|
|
const/4 v1, 0x3
|
|
|
|
iput v1, v0, Lokhttp3/internal/d/a;->state:I
|
|
|
|
return-void
|
|
|
|
:cond_1
|
|
new-instance v0, Ljava/net/ProtocolException;
|
|
|
|
const-string v1, "unexpected end of stream"
|
|
|
|
invoke-direct {v0, v1}, Ljava/net/ProtocolException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
.end method
|
|
|
|
.method public final flush()V
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
iget-boolean v0, p0, Lokhttp3/internal/d/a$d;->closed:Z
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
iget-object v0, p0, Lokhttp3/internal/d/a$d;->bxF:Lokhttp3/internal/d/a;
|
|
|
|
iget-object v0, v0, Lokhttp3/internal/d/a;->bwU:Lokio/BufferedSink;
|
|
|
|
invoke-interface {v0}, Lokio/BufferedSink;->flush()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public final timeout()Lokio/s;
|
|
.locals 1
|
|
|
|
iget-object v0, p0, Lokhttp3/internal/d/a$d;->bxD:Lokio/g;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public final write(Lokio/c;J)V
|
|
.locals 7
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
iget-boolean v0, p0, Lokhttp3/internal/d/a$d;->closed:Z
|
|
|
|
if-nez v0, :cond_1
|
|
|
|
iget-wide v1, p1, Lokio/c;->size:J
|
|
|
|
const-wide/16 v3, 0x0
|
|
|
|
move-wide v5, p2
|
|
|
|
invoke-static/range {v1 .. v6}, Lokhttp3/internal/c;->a(JJJ)V
|
|
|
|
iget-wide v0, p0, Lokhttp3/internal/d/a$d;->bxI:J
|
|
|
|
cmp-long v2, p2, v0
|
|
|
|
if-gtz v2, :cond_0
|
|
|
|
iget-object v0, p0, Lokhttp3/internal/d/a$d;->bxF:Lokhttp3/internal/d/a;
|
|
|
|
iget-object v0, v0, Lokhttp3/internal/d/a;->bwU:Lokio/BufferedSink;
|
|
|
|
invoke-interface {v0, p1, p2, p3}, Lokio/BufferedSink;->write(Lokio/c;J)V
|
|
|
|
iget-wide v0, p0, Lokhttp3/internal/d/a$d;->bxI:J
|
|
|
|
sub-long/2addr v0, p2
|
|
|
|
iput-wide v0, p0, Lokhttp3/internal/d/a$d;->bxI:J
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
new-instance p1, Ljava/net/ProtocolException;
|
|
|
|
new-instance v0, Ljava/lang/StringBuilder;
|
|
|
|
const-string v1, "expected "
|
|
|
|
invoke-direct {v0, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
|
|
|
|
iget-wide v1, p0, Lokhttp3/internal/d/a$d;->bxI:J
|
|
|
|
invoke-virtual {v0, v1, v2}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;
|
|
|
|
const-string v1, " bytes but received "
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v0, p2, p3}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v0}, 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
|
|
|
|
:cond_1
|
|
new-instance p1, Ljava/lang/IllegalStateException;
|
|
|
|
const-string p2, "closed"
|
|
|
|
invoke-direct {p1, p2}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw p1
|
|
.end method
|