123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191 |
- .class abstract Lokhttp3/internal/http1/Http1Codec$AbstractSource;
- .super Ljava/lang/Object;
- .source ""
- # interfaces
- .implements Lokio/Source;
- # annotations
- .annotation system Ldalvik/annotation/EnclosingClass;
- value = Lokhttp3/internal/http1/Http1Codec;
- .end annotation
- .annotation system Ldalvik/annotation/InnerClass;
- accessFlags = 0x402
- name = "AbstractSource"
- .end annotation
- # instance fields
- .field protected bytesRead:J
- .field protected closed:Z
- .field final synthetic this$0:Lokhttp3/internal/http1/Http1Codec;
- .field protected final timeout:Lokio/ForwardingTimeout;
- # direct methods
- .method private constructor <init>(Lokhttp3/internal/http1/Http1Codec;)V
- .locals 2
- iput-object p1, p0, Lokhttp3/internal/http1/Http1Codec$AbstractSource;->this$0:Lokhttp3/internal/http1/Http1Codec;
- invoke-direct {p0}, Ljava/lang/Object;-><init>()V
- new-instance p1, Lokio/ForwardingTimeout;
- iget-object v0, p0, Lokhttp3/internal/http1/Http1Codec$AbstractSource;->this$0:Lokhttp3/internal/http1/Http1Codec;
- iget-object v0, v0, Lokhttp3/internal/http1/Http1Codec;->source: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/internal/http1/Http1Codec$AbstractSource;->timeout:Lokio/ForwardingTimeout;
- const-wide/16 v0, 0x0
- iput-wide v0, p0, Lokhttp3/internal/http1/Http1Codec$AbstractSource;->bytesRead:J
- return-void
- .end method
- .method synthetic constructor <init>(Lokhttp3/internal/http1/Http1Codec;Lokhttp3/internal/http1/Http1Codec$1;)V
- .locals 0
- invoke-direct {p0, p1}, Lokhttp3/internal/http1/Http1Codec$AbstractSource;-><init>(Lokhttp3/internal/http1/Http1Codec;)V
- return-void
- .end method
- # virtual methods
- .method protected final endOfInput(ZLjava/io/IOException;)V
- .locals 9
- .annotation system Ldalvik/annotation/Throws;
- value = {
- Ljava/io/IOException;
- }
- .end annotation
- iget-object v0, p0, Lokhttp3/internal/http1/Http1Codec$AbstractSource;->this$0:Lokhttp3/internal/http1/Http1Codec;
- iget v1, v0, Lokhttp3/internal/http1/Http1Codec;->state:I
- const/4 v2, 0x6
- if-ne v1, v2, :cond_0
- return-void
- :cond_0
- const/4 v3, 0x5
- if-ne v1, v3, :cond_2
- iget-object v1, p0, Lokhttp3/internal/http1/Http1Codec$AbstractSource;->timeout:Lokio/ForwardingTimeout;
- invoke-virtual {v0, v1}, Lokhttp3/internal/http1/Http1Codec;->detachTimeout(Lokio/ForwardingTimeout;)V
- iget-object v5, p0, Lokhttp3/internal/http1/Http1Codec$AbstractSource;->this$0:Lokhttp3/internal/http1/Http1Codec;
- iput v2, v5, Lokhttp3/internal/http1/Http1Codec;->state:I
- iget-object v3, v5, Lokhttp3/internal/http1/Http1Codec;->streamAllocation:Lokhttp3/internal/connection/StreamAllocation;
- if-eqz v3, :cond_1
- xor-int/lit8 v4, p1, 0x1
- iget-wide v6, p0, Lokhttp3/internal/http1/Http1Codec$AbstractSource;->bytesRead:J
- move-object v8, p2
- invoke-virtual/range {v3 .. v8}, Lokhttp3/internal/connection/StreamAllocation;->streamFinished(ZLokhttp3/internal/http/HttpCodec;JLjava/io/IOException;)V
- :cond_1
- return-void
- :cond_2
- 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/internal/http1/Http1Codec$AbstractSource;->this$0:Lokhttp3/internal/http1/Http1Codec;
- iget v0, v0, Lokhttp3/internal/http1/Http1Codec;->state: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
- .locals 2
- .annotation system Ldalvik/annotation/Throws;
- value = {
- Ljava/io/IOException;
- }
- .end annotation
- :try_start_0
- iget-object v0, p0, Lokhttp3/internal/http1/Http1Codec$AbstractSource;->this$0:Lokhttp3/internal/http1/Http1Codec;
- iget-object v0, v0, Lokhttp3/internal/http1/Http1Codec;->source: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_0
- iget-wide v0, p0, Lokhttp3/internal/http1/Http1Codec$AbstractSource;->bytesRead:J
- add-long/2addr v0, p1
- iput-wide v0, p0, Lokhttp3/internal/http1/Http1Codec$AbstractSource;->bytesRead:J
- :try_end_0
- .catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0
- :cond_0
- return-wide p1
- :catch_0
- move-exception p1
- const/4 p2, 0x0
- invoke-virtual {p0, p2, p1}, Lokhttp3/internal/http1/Http1Codec$AbstractSource;->endOfInput(ZLjava/io/IOException;)V
- throw p1
- .end method
- .method public timeout()Lokio/Timeout;
- .locals 1
- iget-object v0, p0, Lokhttp3/internal/http1/Http1Codec$AbstractSource;->timeout:Lokio/ForwardingTimeout;
- return-object v0
- .end method
|