123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140 |
- .class Lokhttp3/mockwebserver/MockWebServer$TruncatingBuffer;
- .super Ljava/lang/Object;
- .source ""
- # interfaces
- .implements Lokio/Sink;
- # annotations
- .annotation system Ldalvik/annotation/EnclosingClass;
- value = Lokhttp3/mockwebserver/MockWebServer;
- .end annotation
- .annotation system Ldalvik/annotation/InnerClass;
- accessFlags = 0xa
- name = "TruncatingBuffer"
- .end annotation
- # instance fields
- .field private final buffer:Lokio/Buffer;
- .field private receivedByteCount:J
- .field private remainingByteCount:J
- # direct methods
- .method constructor <init>(J)V
- .locals 1
- invoke-direct {p0}, Ljava/lang/Object;-><init>()V
- new-instance v0, Lokio/Buffer;
- invoke-direct {v0}, Lokio/Buffer;-><init>()V
- iput-object v0, p0, Lokhttp3/mockwebserver/MockWebServer$TruncatingBuffer;->buffer:Lokio/Buffer;
- iput-wide p1, p0, Lokhttp3/mockwebserver/MockWebServer$TruncatingBuffer;->remainingByteCount:J
- return-void
- .end method
- .method static synthetic access$1900(Lokhttp3/mockwebserver/MockWebServer$TruncatingBuffer;)J
- .locals 2
- iget-wide v0, p0, Lokhttp3/mockwebserver/MockWebServer$TruncatingBuffer;->receivedByteCount:J
- return-wide v0
- .end method
- .method static synthetic access$2000(Lokhttp3/mockwebserver/MockWebServer$TruncatingBuffer;)Lokio/Buffer;
- .locals 0
- iget-object p0, p0, Lokhttp3/mockwebserver/MockWebServer$TruncatingBuffer;->buffer:Lokio/Buffer;
- return-object p0
- .end method
- # virtual methods
- .method public close()V
- .locals 0
- .annotation system Ldalvik/annotation/Throws;
- value = {
- Ljava/io/IOException;
- }
- .end annotation
- return-void
- .end method
- .method public flush()V
- .locals 0
- .annotation system Ldalvik/annotation/Throws;
- value = {
- Ljava/io/IOException;
- }
- .end annotation
- return-void
- .end method
- .method public timeout()Lokio/Timeout;
- .locals 1
- sget-object v0, Lokio/Timeout;->NONE:Lokio/Timeout;
- return-object v0
- .end method
- .method public write(Lokio/Buffer;J)V
- .locals 7
- .annotation system Ldalvik/annotation/Throws;
- value = {
- Ljava/io/IOException;
- }
- .end annotation
- iget-wide v0, p0, Lokhttp3/mockwebserver/MockWebServer$TruncatingBuffer;->remainingByteCount:J
- invoke-static {v0, v1, p2, p3}, Ljava/lang/Math;->min(JJ)J
- move-result-wide v0
- const-wide/16 v2, 0x0
- cmp-long v4, v0, v2
- if-lez v4, :cond_0
- iget-object v4, p0, Lokhttp3/mockwebserver/MockWebServer$TruncatingBuffer;->buffer:Lokio/Buffer;
- invoke-virtual {p1, v4, v0, v1}, Lokio/Buffer;->read(Lokio/Buffer;J)J
- :cond_0
- sub-long v4, p2, v0
- cmp-long v6, v4, v2
- if-lez v6, :cond_1
- invoke-virtual {p1, v4, v5}, Lokio/Buffer;->skip(J)V
- :cond_1
- iget-wide v2, p0, Lokhttp3/mockwebserver/MockWebServer$TruncatingBuffer;->remainingByteCount:J
- sub-long/2addr v2, v0
- iput-wide v2, p0, Lokhttp3/mockwebserver/MockWebServer$TruncatingBuffer;->remainingByteCount:J
- iget-wide v0, p0, Lokhttp3/mockwebserver/MockWebServer$TruncatingBuffer;->receivedByteCount:J
- add-long/2addr v0, p2
- iput-wide v0, p0, Lokhttp3/mockwebserver/MockWebServer$TruncatingBuffer;->receivedByteCount:J
- return-void
- .end method
|