RealBufferedSource.smali
.class public final Lokio/RealBufferedSource;
.super Ljava/lang/Object;
.source "RealBufferedSource.kt"
# interfaces
.implements Lokio/BufferedSource;
# instance fields
.field public final bufferField:Lokio/Buffer;
.field public closed:Z
.field public final source:Lokio/Source;
# direct methods
.method public constructor <init>(Lokio/Source;)V
.registers 3
const-string v0, "source"
invoke-static {p1, v0}, Lkotlin/jvm/internal/i;->d(Ljava/lang/Object;Ljava/lang/String;)V
.line 1
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
iput-object p1, p0, Lokio/RealBufferedSource;->source:Lokio/Source;
.line 2
new-instance p1, Lokio/Buffer;
invoke-direct {p1}, Lokio/Buffer;-><init>()V
iput-object p1, p0, Lokio/RealBufferedSource;->bufferField:Lokio/Buffer;
return-void
.end method
.method public static synthetic buffer$annotations()V
.registers 0
return-void
.end method
# virtual methods
.method public buffer()Lokio/Buffer;
.registers 2
.line 1
iget-object v0, p0, Lokio/RealBufferedSource;->bufferField:Lokio/Buffer;
return-object v0
.end method
.method public close()V
.registers 2
.line 1
iget-boolean v0, p0, Lokio/RealBufferedSource;->closed:Z
if-eqz v0, :cond_5
return-void
:cond_5
const/4 v0, 0x1
.line 2
iput-boolean v0, p0, Lokio/RealBufferedSource;->closed:Z
.line 3
iget-object v0, p0, Lokio/RealBufferedSource;->source:Lokio/Source;
invoke-interface {v0}, Lokio/Source;->close()V
.line 4
iget-object v0, p0, Lokio/RealBufferedSource;->bufferField:Lokio/Buffer;
.line 5
invoke-virtual {v0}, Lokio/Buffer;->clear()V
return-void
.end method
.method public exhausted()Z
.registers 7
.line 1
iget-boolean v0, p0, Lokio/RealBufferedSource;->closed:Z
const/4 v1, 0x1
xor-int/2addr v0, v1
if-eqz v0, :cond_22
.line 2
iget-object v0, p0, Lokio/RealBufferedSource;->bufferField:Lokio/Buffer;
.line 3
invoke-virtual {v0}, Lokio/Buffer;->exhausted()Z
move-result v0
if-eqz v0, :cond_20
iget-object v0, p0, Lokio/RealBufferedSource;->source:Lokio/Source;
.line 4
iget-object v2, p0, Lokio/RealBufferedSource;->bufferField:Lokio/Buffer;
const/16 v3, 0x2000
int-to-long v3, v3
.line 5
invoke-interface {v0, v2, v3, v4}, Lokio/Source;->read(Lokio/Buffer;J)J
move-result-wide v2
const-wide/16 v4, -0x1
cmp-long v0, v2, v4
if-nez v0, :cond_20
goto :goto_21
:cond_20
const/4 v1, 0x0
:goto_21
return v1
.line 6
:cond_22
new-instance v0, Ljava/lang/IllegalStateException;
const-string v1, "closed"
invoke-direct {v0, v1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
throw v0
.end method
.method public getBuffer()Lokio/Buffer;
.registers 2
.line 1
iget-object v0, p0, Lokio/RealBufferedSource;->bufferField:Lokio/Buffer;
return-object v0
.end method
.method public indexOf(B)J
.registers 8
const-wide/16 v2, 0x0
const-wide v4, 0x7fffffffffffffffL
move-object v0, p0
move v1, p1
.line 1
invoke-virtual/range {v0 .. v5}, Lokio/RealBufferedSource;->indexOf(BJJ)J
move-result-wide v0
return-wide v0
.end method
.method public indexOf(BJ)J
.registers 10
const-wide v4, 0x7fffffffffffffffL
move-object v0, p0
move v1, p1
move-wide v2, p2
.line 2
invoke-virtual/range {v0 .. v5}, Lokio/RealBufferedSource;->indexOf(BJJ)J
move-result-wide p1
return-wide p1
.end method
.method public indexOf(BJJ)J
.registers 14
.line 3
iget-boolean v0, p0, Lokio/RealBufferedSource;->closed:Z
const/4 v1, 0x1
xor-int/2addr v0, v1
if-eqz v0, :cond_6c
const-wide/16 v2, 0x0
cmp-long v0, v2, p2
if-lez v0, :cond_d
goto :goto_12
:cond_d
cmp-long v0, p4, p2
if-ltz v0, :cond_12
goto :goto_13
:cond_12
:goto_12
const/4 v1, 0x0
:goto_13
if-eqz v1, :cond_49
:goto_15
const-wide/16 v0, -0x1
cmp-long v2, p2, p4
if-gez v2, :cond_48
.line 4
iget-object v2, p0, Lokio/RealBufferedSource;->bufferField:Lokio/Buffer;
move v3, p1
move-wide v4, p2
move-wide v6, p4
.line 5
invoke-virtual/range {v2 .. v7}, Lokio/Buffer;->indexOf(BJJ)J
move-result-wide v2
cmp-long v4, v2, v0
if-eqz v4, :cond_29
return-wide v2
.line 6
:cond_29
iget-object v2, p0, Lokio/RealBufferedSource;->bufferField:Lokio/Buffer;
invoke-virtual {v2}, Lokio/Buffer;->size()J
move-result-wide v2
cmp-long v4, v2, p4
if-gez v4, :cond_48
.line 7
iget-object v4, p0, Lokio/RealBufferedSource;->source:Lokio/Source;
.line 8
iget-object v5, p0, Lokio/RealBufferedSource;->bufferField:Lokio/Buffer;
const/16 v6, 0x2000
int-to-long v6, v6
.line 9
invoke-interface {v4, v5, v6, v7}, Lokio/Source;->read(Lokio/Buffer;J)J
move-result-wide v4
cmp-long v6, v4, v0
if-nez v6, :cond_43
goto :goto_48
.line 10
:cond_43
invoke-static {p2, p3, v2, v3}, Ljava/lang/Math;->max(JJ)J
move-result-wide p2
goto :goto_15
:cond_48
:goto_48
return-wide v0
.line 11
:cond_49
new-instance p1, Ljava/lang/StringBuilder;
invoke-direct {p1}, Ljava/lang/StringBuilder;-><init>()V
const-string v0, "fromIndex="
invoke-virtual {p1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {p1, p2, p3}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;
const-string p2, " toIndex="
invoke-virtual {p1, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {p1, p4, p5}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;
invoke-virtual {p1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p1
new-instance p2, Ljava/lang/IllegalArgumentException;
invoke-virtual {p1}, Ljava/lang/String;->toString()Ljava/lang/String;
move-result-object p1
invoke-direct {p2, p1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
throw p2
.line 12
:cond_6c
new-instance p1, Ljava/lang/IllegalStateException;
const-string p2, "closed"
invoke-direct {p1, p2}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
goto :goto_75
:goto_74
throw p1
:goto_75
goto :goto_74
.end method
.method public indexOf(Lokio/ByteString;)J
.registers 4
const-string v0, "bytes"
invoke-static {p1, v0}, Lkotlin/jvm/internal/i;->d(Ljava/lang/Object;Ljava/lang/String;)V
const-wide/16 v0, 0x0
.line 13
invoke-virtual {p0, p1, v0, v1}, Lokio/RealBufferedSource;->indexOf(Lokio/ByteString;J)J
move-result-wide v0
return-wide v0
.end method
.method public indexOf(Lokio/ByteString;J)J
.registers 12
const-string v0, "bytes"
invoke-static {p1, v0}, Lkotlin/jvm/internal/i;->d(Ljava/lang/Object;Ljava/lang/String;)V
.line 14
iget-boolean v0, p0, Lokio/RealBufferedSource;->closed:Z
xor-int/lit8 v0, v0, 0x1
if-eqz v0, :cond_3c
.line 15
:goto_b
iget-object v0, p0, Lokio/RealBufferedSource;->bufferField:Lokio/Buffer;
.line 16
invoke-virtual {v0, p1, p2, p3}, Lokio/Buffer;->indexOf(Lokio/ByteString;J)J
move-result-wide v0
const-wide/16 v2, -0x1
cmp-long v4, v0, v2
if-eqz v4, :cond_18
return-wide v0
.line 17
:cond_18
iget-object v0, p0, Lokio/RealBufferedSource;->bufferField:Lokio/Buffer;
invoke-virtual {v0}, Lokio/Buffer;->size()J
move-result-wide v0
.line 18
iget-object v4, p0, Lokio/RealBufferedSource;->source:Lokio/Source;
.line 19
iget-object v5, p0, Lokio/RealBufferedSource;->bufferField:Lokio/Buffer;
const/16 v6, 0x2000
int-to-long v6, v6
.line 20
invoke-interface {v4, v5, v6, v7}, Lokio/Source;->read(Lokio/Buffer;J)J
move-result-wide v4
cmp-long v6, v4, v2
if-nez v6, :cond_2e
return-wide v2
.line 21
:cond_2e
invoke-virtual {p1}, Lokio/ByteString;->size()I
move-result v2
int-to-long v2, v2
sub-long/2addr v0, v2
const-wide/16 v2, 0x1
add-long/2addr v0, v2
invoke-static {p2, p3, v0, v1}, Ljava/lang/Math;->max(JJ)J
move-result-wide p2
goto :goto_b
.line 22
:cond_3c
new-instance p1, Ljava/lang/IllegalStateException;
const-string p2, "closed"
invoke-direct {p1, p2}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
goto :goto_45
:goto_44
throw p1
:goto_45
goto :goto_44
.end method
.method public indexOfElement(Lokio/ByteString;)J
.registers 4
const-string v0, "targetBytes"
invoke-static {p1, v0}, Lkotlin/jvm/internal/i;->d(Ljava/lang/Object;Ljava/lang/String;)V
const-wide/16 v0, 0x0
.line 1
invoke-virtual {p0, p1, v0, v1}, Lokio/RealBufferedSource;->indexOfElement(Lokio/ByteString;J)J
move-result-wide v0
return-wide v0
.end method
.method public indexOfElement(Lokio/ByteString;J)J
.registers 12
const-string v0, "targetBytes"
invoke-static {p1, v0}, Lkotlin/jvm/internal/i;->d(Ljava/lang/Object;Ljava/lang/String;)V
.line 2
iget-boolean v0, p0, Lokio/RealBufferedSource;->closed:Z
xor-int/lit8 v0, v0, 0x1
if-eqz v0, :cond_33
.line 3
:goto_b
iget-object v0, p0, Lokio/RealBufferedSource;->bufferField:Lokio/Buffer;
.line 4
invoke-virtual {v0, p1, p2, p3}, Lokio/Buffer;->indexOfElement(Lokio/ByteString;J)J
move-result-wide v0
const-wide/16 v2, -0x1
cmp-long v4, v0, v2
if-eqz v4, :cond_18
return-wide v0
.line 5
:cond_18
iget-object v0, p0, Lokio/RealBufferedSource;->bufferField:Lokio/Buffer;
invoke-virtual {v0}, Lokio/Buffer;->size()J
move-result-wide v0
.line 6
iget-object v4, p0, Lokio/RealBufferedSource;->source:Lokio/Source;
.line 7
iget-object v5, p0, Lokio/RealBufferedSource;->bufferField:Lokio/Buffer;
const/16 v6, 0x2000
int-to-long v6, v6
.line 8
invoke-interface {v4, v5, v6, v7}, Lokio/Source;->read(Lokio/Buffer;J)J
move-result-wide v4
cmp-long v6, v4, v2
if-nez v6, :cond_2e
return-wide v2
.line 9
:cond_2e
invoke-static {p2, p3, v0, v1}, Ljava/lang/Math;->max(JJ)J
move-result-wide p2
goto :goto_b
.line 10
:cond_33
new-instance p1, Ljava/lang/IllegalStateException;
const-string p2, "closed"
invoke-direct {p1, p2}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
goto :goto_3c
:goto_3b
throw p1
:goto_3c
goto :goto_3b
.end method
.method public inputStream()Ljava/io/InputStream;
.registers 2
.line 1
new-instance v0, Lokio/RealBufferedSource$inputStream$1;
invoke-direct {v0, p0}, Lokio/RealBufferedSource$inputStream$1;-><init>(Lokio/RealBufferedSource;)V
return-object v0
.end method
.method public isOpen()Z
.registers 2
.line 1
iget-boolean v0, p0, Lokio/RealBufferedSource;->closed:Z
xor-int/lit8 v0, v0, 0x1
return v0
.end method
.method public peek()Lokio/BufferedSource;
.registers 2
.line 1
new-instance v0, Lokio/PeekSource;
invoke-direct {v0, p0}, Lokio/PeekSource;-><init>(Lokio/BufferedSource;)V
invoke-static {v0}, Lokio/Okio;->buffer(Lokio/Source;)Lokio/BufferedSource;
move-result-object v0
return-object v0
.end method
.method public rangeEquals(JLokio/ByteString;)Z
.registers 11
const-string v0, "bytes"
invoke-static {p3, v0}, Lkotlin/jvm/internal/i;->d(Ljava/lang/Object;Ljava/lang/String;)V
.line 1
invoke-virtual {p3}, Lokio/ByteString;->size()I
move-result v6
const/4 v5, 0x0
move-object v1, p0
move-wide v2, p1
move-object v4, p3
.line 2
invoke-virtual/range {v1 .. v6}, Lokio/RealBufferedSource;->rangeEquals(JLokio/ByteString;II)Z
move-result p1
return p1
.end method
.method public rangeEquals(JLokio/ByteString;II)Z
.registers 13
const-string v0, "bytes"
invoke-static {p3, v0}, Lkotlin/jvm/internal/i;->d(Ljava/lang/Object;Ljava/lang/String;)V
.line 3
iget-boolean v0, p0, Lokio/RealBufferedSource;->closed:Z
const/4 v1, 0x1
xor-int/2addr v0, v1
if-eqz v0, :cond_41
const-wide/16 v2, 0x0
const/4 v0, 0x0
cmp-long v4, p1, v2
if-ltz v4, :cond_40
if-ltz p4, :cond_40
if-ltz p5, :cond_40
.line 4
invoke-virtual {p3}, Lokio/ByteString;->size()I
move-result v2
sub-int/2addr v2, p4
if-ge v2, p5, :cond_1e
goto :goto_40
:cond_1e
const/4 v2, 0x0
:goto_1f
if-ge v2, p5, :cond_3f
int-to-long v3, v2
add-long/2addr v3, p1
const-wide/16 v5, 0x1
add-long/2addr v5, v3
.line 5
invoke-virtual {p0, v5, v6}, Lokio/RealBufferedSource;->request(J)Z
move-result v5
if-nez v5, :cond_2d
return v0
.line 6
:cond_2d
iget-object v5, p0, Lokio/RealBufferedSource;->bufferField:Lokio/Buffer;
.line 7
invoke-virtual {v5, v3, v4}, Lokio/Buffer;->getByte(J)B
move-result v3
add-int v4, p4, v2
invoke-virtual {p3, v4}, Lokio/ByteString;->getByte(I)B
move-result v4
if-eq v3, v4, :cond_3c
return v0
:cond_3c
add-int/lit8 v2, v2, 0x1
goto :goto_1f
:cond_3f
return v1
:cond_40
:goto_40
return v0
.line 8
:cond_41
new-instance p1, Ljava/lang/IllegalStateException;
const-string p2, "closed"
invoke-direct {p1, p2}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
goto :goto_4a
:goto_49
throw p1
:goto_4a
goto :goto_49
.end method
.method public read(Ljava/nio/ByteBuffer;)I
.registers 7
const-string v0, "sink"
invoke-static {p1, v0}, Lkotlin/jvm/internal/i;->d(Ljava/lang/Object;Ljava/lang/String;)V
.line 22
iget-object v0, p0, Lokio/RealBufferedSource;->bufferField:Lokio/Buffer;
invoke-virtual {v0}, Lokio/Buffer;->size()J
move-result-wide v0
const-wide/16 v2, 0x0
cmp-long v4, v0, v2
if-nez v4, :cond_24
.line 23
iget-object v0, p0, Lokio/RealBufferedSource;->source:Lokio/Source;
.line 24
iget-object v1, p0, Lokio/RealBufferedSource;->bufferField:Lokio/Buffer;
const/16 v2, 0x2000
int-to-long v2, v2
.line 25
invoke-interface {v0, v1, v2, v3}, Lokio/Source;->read(Lokio/Buffer;J)J
move-result-wide v0
const-wide/16 v2, -0x1
cmp-long v4, v0, v2
if-nez v4, :cond_24
const/4 p1, -0x1
return p1
.line 26
:cond_24
iget-object v0, p0, Lokio/RealBufferedSource;->bufferField:Lokio/Buffer;
.line 27
invoke-virtual {v0, p1}, Lokio/Buffer;->read(Ljava/nio/ByteBuffer;)I
move-result p1
return p1
.end method
.method public read([B)I
.registers 4
const-string v0, "sink"
invoke-static {p1, v0}, Lkotlin/jvm/internal/i;->d(Ljava/lang/Object;Ljava/lang/String;)V
.line 12
array-length v0, p1
const/4 v1, 0x0
invoke-virtual {p0, p1, v1, v0}, Lokio/RealBufferedSource;->read([BII)I
move-result p1
return p1
.end method
.method public read([BII)I
.registers 13
const-string v0, "sink"
invoke-static {p1, v0}, Lkotlin/jvm/internal/i;->d(Ljava/lang/Object;Ljava/lang/String;)V
.line 13
array-length v0, p1
int-to-long v1, v0
int-to-long v3, p2
int-to-long v7, p3
move-wide v5, v7
invoke-static/range {v1 .. v6}, Lokio/-Util;->checkOffsetAndCount(JJJ)V
.line 14
iget-object p3, p0, Lokio/RealBufferedSource;->bufferField:Lokio/Buffer;
invoke-virtual {p3}, Lokio/Buffer;->size()J
move-result-wide v0
const-wide/16 v2, 0x0
cmp-long p3, v0, v2
if-nez p3, :cond_2c
.line 15
iget-object p3, p0, Lokio/RealBufferedSource;->source:Lokio/Source;
.line 16
iget-object v0, p0, Lokio/RealBufferedSource;->bufferField:Lokio/Buffer;
const/16 v1, 0x2000
int-to-long v1, v1
.line 17
invoke-interface {p3, v0, v1, v2}, Lokio/Source;->read(Lokio/Buffer;J)J
move-result-wide v0
const-wide/16 v2, -0x1
cmp-long p3, v0, v2
if-nez p3, :cond_2c
const/4 p1, -0x1
return p1
.line 18
:cond_2c
iget-object p3, p0, Lokio/RealBufferedSource;->bufferField:Lokio/Buffer;
invoke-virtual {p3}, Lokio/Buffer;->size()J
move-result-wide v0
.line 19
invoke-static {v7, v8, v0, v1}, Ljava/lang/Math;->min(JJ)J
move-result-wide v0
long-to-int p3, v0
.line 20
iget-object v0, p0, Lokio/RealBufferedSource;->bufferField:Lokio/Buffer;
.line 21
invoke-virtual {v0, p1, p2, p3}, Lokio/Buffer;->read([BII)I
move-result p1
return p1
.end method
.method public read(Lokio/Buffer;J)J
.registers 9
const-string v0, "sink"
invoke-static {p1, v0}, Lkotlin/jvm/internal/i;->d(Ljava/lang/Object;Ljava/lang/String;)V
const/4 v0, 0x1
const-wide/16 v1, 0x0
cmp-long v3, p2, v1
if-ltz v3, :cond_e
const/4 v3, 0x1
goto :goto_f
:cond_e
const/4 v3, 0x0
:goto_f
if-eqz v3, :cond_4b
.line 1
iget-boolean v3, p0, Lokio/RealBufferedSource;->closed:Z
xor-int/2addr v0, v3
if-eqz v0, :cond_43
.line 2
iget-object v0, p0, Lokio/RealBufferedSource;->bufferField:Lokio/Buffer;
invoke-virtual {v0}, Lokio/Buffer;->size()J
move-result-wide v3
cmp-long v0, v3, v1
if-nez v0, :cond_32
.line 3
iget-object v0, p0, Lokio/RealBufferedSource;->source:Lokio/Source;
.line 4
iget-object v1, p0, Lokio/RealBufferedSource;->bufferField:Lokio/Buffer;
const/16 v2, 0x2000
int-to-long v2, v2
.line 5
invoke-interface {v0, v1, v2, v3}, Lokio/Source;->read(Lokio/Buffer;J)J
move-result-wide v0
const-wide/16 v2, -0x1
cmp-long v4, v0, v2
if-nez v4, :cond_32
return-wide v2
.line 6
:cond_32
iget-object v0, p0, Lokio/RealBufferedSource;->bufferField:Lokio/Buffer;
invoke-virtual {v0}, Lokio/Buffer;->size()J
move-result-wide v0
.line 7
invoke-static {p2, p3, v0, v1}, Ljava/lang/Math;->min(JJ)J
move-result-wide p2
.line 8
iget-object v0, p0, Lokio/RealBufferedSource;->bufferField:Lokio/Buffer;
.line 9
invoke-virtual {v0, p1, p2, p3}, Lokio/Buffer;->read(Lokio/Buffer;J)J
move-result-wide p1
return-wide p1
.line 10
:cond_43
new-instance p1, Ljava/lang/IllegalStateException;
const-string p2, "closed"
invoke-direct {p1, p2}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
throw p1
.line 11
:cond_4b
new-instance p1, Ljava/lang/StringBuilder;
invoke-direct {p1}, Ljava/lang/StringBuilder;-><init>()V
const-string v0, "byteCount < 0: "
invoke-virtual {p1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {p1, p2, p3}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;
invoke-virtual {p1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p1
new-instance p2, Ljava/lang/IllegalArgumentException;
invoke-virtual {p1}, Ljava/lang/String;->toString()Ljava/lang/String;
move-result-object p1
invoke-direct {p2, p1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
throw p2
.end method
.method public readAll(Lokio/Sink;)J
.registers 11
const-string v0, "sink"
invoke-static {p1, v0}, Lkotlin/jvm/internal/i;->d(Ljava/lang/Object;Ljava/lang/String;)V
const-wide/16 v0, 0x0
move-wide v2, v0
.line 1
:cond_8
:goto_8
iget-object v4, p0, Lokio/RealBufferedSource;->source:Lokio/Source;
.line 2
iget-object v5, p0, Lokio/RealBufferedSource;->bufferField:Lokio/Buffer;
const/16 v6, 0x2000
int-to-long v6, v6
.line 3
invoke-interface {v4, v5, v6, v7}, Lokio/Source;->read(Lokio/Buffer;J)J
move-result-wide v4
const-wide/16 v6, -0x1
cmp-long v8, v4, v6
if-eqz v8, :cond_2a
.line 4
iget-object v4, p0, Lokio/RealBufferedSource;->bufferField:Lokio/Buffer;
.line 5
invoke-virtual {v4}, Lokio/Buffer;->completeSegmentByteCount()J
move-result-wide v4
cmp-long v6, v4, v0
if-lez v6, :cond_8
add-long/2addr v2, v4
.line 6
iget-object v6, p0, Lokio/RealBufferedSource;->bufferField:Lokio/Buffer;
.line 7
invoke-interface {p1, v6, v4, v5}, Lokio/Sink;->write(Lokio/Buffer;J)V
goto :goto_8
.line 8
:cond_2a
iget-object v4, p0, Lokio/RealBufferedSource;->bufferField:Lokio/Buffer;
invoke-virtual {v4}, Lokio/Buffer;->size()J
move-result-wide v4
cmp-long v6, v4, v0
if-lez v6, :cond_44
.line 9
iget-object v0, p0, Lokio/RealBufferedSource;->bufferField:Lokio/Buffer;
invoke-virtual {v0}, Lokio/Buffer;->size()J
move-result-wide v0
add-long/2addr v2, v0
.line 10
iget-object v0, p0, Lokio/RealBufferedSource;->bufferField:Lokio/Buffer;
.line 11
invoke-virtual {v0}, Lokio/Buffer;->size()J
move-result-wide v4
.line 12
invoke-interface {p1, v0, v4, v5}, Lokio/Sink;->write(Lokio/Buffer;J)V
:cond_44
return-wide v2
.end method
.method public readByte()B
.registers 3
const-wide/16 v0, 0x1
.line 1
invoke-virtual {p0, v0, v1}, Lokio/RealBufferedSource;->require(J)V
.line 2
iget-object v0, p0, Lokio/RealBufferedSource;->bufferField:Lokio/Buffer;
.line 3
invoke-virtual {v0}, Lokio/Buffer;->readByte()B
move-result v0
return v0
.end method
.method public readByteArray()[B
.registers 3
.line 4
iget-object v0, p0, Lokio/RealBufferedSource;->bufferField:Lokio/Buffer;
.line 5
iget-object v1, p0, Lokio/RealBufferedSource;->source:Lokio/Source;
invoke-virtual {v0, v1}, Lokio/Buffer;->writeAll(Lokio/Source;)J
.line 6
iget-object v0, p0, Lokio/RealBufferedSource;->bufferField:Lokio/Buffer;
.line 7
invoke-virtual {v0}, Lokio/Buffer;->readByteArray()[B
move-result-object v0
return-object v0
.end method
.method public readByteArray(J)[B
.registers 4
.line 1
invoke-virtual {p0, p1, p2}, Lokio/RealBufferedSource;->require(J)V
.line 2
iget-object v0, p0, Lokio/RealBufferedSource;->bufferField:Lokio/Buffer;
.line 3
invoke-virtual {v0, p1, p2}, Lokio/Buffer;->readByteArray(J)[B
move-result-object p1
return-object p1
.end method
.method public readByteString()Lokio/ByteString;
.registers 3
.line 4
iget-object v0, p0, Lokio/RealBufferedSource;->bufferField:Lokio/Buffer;
.line 5
iget-object v1, p0, Lokio/RealBufferedSource;->source:Lokio/Source;
invoke-virtual {v0, v1}, Lokio/Buffer;->writeAll(Lokio/Source;)J
.line 6
iget-object v0, p0, Lokio/RealBufferedSource;->bufferField:Lokio/Buffer;
.line 7
invoke-virtual {v0}, Lokio/Buffer;->readByteString()Lokio/ByteString;
move-result-object v0
return-object v0
.end method
.method public readByteString(J)Lokio/ByteString;
.registers 4
.line 1
invoke-virtual {p0, p1, p2}, Lokio/RealBufferedSource;->require(J)V
.line 2
iget-object v0, p0, Lokio/RealBufferedSource;->bufferField:Lokio/Buffer;
.line 3
invoke-virtual {v0, p1, p2}, Lokio/Buffer;->readByteString(J)Lokio/ByteString;
move-result-object p1
return-object p1
.end method
.method public readDecimalLong()J
.registers 11
const-wide/16 v0, 0x1
.line 1
invoke-virtual {p0, v0, v1}, Lokio/RealBufferedSource;->require(J)V
const-wide/16 v2, 0x0
move-wide v4, v2
:goto_8
add-long v6, v4, v0
.line 2
invoke-virtual {p0, v6, v7}, Lokio/RealBufferedSource;->request(J)Z
move-result v8
if-eqz v8, :cond_53
.line 3
iget-object v8, p0, Lokio/RealBufferedSource;->bufferField:Lokio/Buffer;
.line 4
invoke-virtual {v8, v4, v5}, Lokio/Buffer;->getByte(J)B
move-result v8
const/16 v9, 0x30
int-to-byte v9, v9
if-lt v8, v9, :cond_20
const/16 v9, 0x39
int-to-byte v9, v9
if-le v8, v9, :cond_2a
:cond_20
cmp-long v9, v4, v2
if-nez v9, :cond_2c
const/16 v9, 0x2d
int-to-byte v9, v9
if-eq v8, v9, :cond_2a
goto :goto_2c
:cond_2a
move-wide v4, v6
goto :goto_8
:cond_2c
:goto_2c
cmp-long v0, v4, v2
if-eqz v0, :cond_31
goto :goto_53
.line 5
:cond_31
sget-object v0, Lkotlin/jvm/internal/m;->a:Lkotlin/jvm/internal/m;
const/4 v0, 0x1
.line 6
new-array v0, v0, [Ljava/lang/Object;
const/4 v1, 0x0
invoke-static {v8}, Ljava/lang/Byte;->valueOf(B)Ljava/lang/Byte;
move-result-object v2
aput-object v2, v0, v1
.line 7
array-length v1, v0
invoke-static {v0, v1}, Ljava/util/Arrays;->copyOf([Ljava/lang/Object;I)[Ljava/lang/Object;
move-result-object v0
const-string v1, "Expected leading [0-9] or \'-\' character but was %#x"
invoke-static {v1, v0}, Ljava/lang/String;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
move-result-object v0
const-string v1, "java.lang.String.format(format, *args)"
invoke-static {v0, v1}, Lkotlin/jvm/internal/i;->a(Ljava/lang/Object;Ljava/lang/String;)V
new-instance v1, Ljava/lang/NumberFormatException;
invoke-direct {v1, v0}, Ljava/lang/NumberFormatException;-><init>(Ljava/lang/String;)V
throw v1
.line 8
:cond_53
:goto_53
iget-object v0, p0, Lokio/RealBufferedSource;->bufferField:Lokio/Buffer;
.line 9
invoke-virtual {v0}, Lokio/Buffer;->readDecimalLong()J
move-result-wide v0
return-wide v0
.end method
.method public readFully(Lokio/Buffer;J)V
.registers 5
const-string v0, "sink"
invoke-static {p1, v0}, Lkotlin/jvm/internal/i;->d(Ljava/lang/Object;Ljava/lang/String;)V
.line 10
:try_start_5
invoke-virtual {p0, p2, p3}, Lokio/RealBufferedSource;->require(J)V
:try_end_8
.catch Ljava/io/EOFException; {:try_start_5 .. :try_end_8} :catch_e
.line 11
iget-object v0, p0, Lokio/RealBufferedSource;->bufferField:Lokio/Buffer;
.line 12
invoke-virtual {v0, p1, p2, p3}, Lokio/Buffer;->readFully(Lokio/Buffer;J)V
return-void
:catch_e
move-exception p2
.line 13
iget-object p3, p0, Lokio/RealBufferedSource;->bufferField:Lokio/Buffer;
.line 14
invoke-virtual {p1, p3}, Lokio/Buffer;->writeAll(Lokio/Source;)J
.line 15
throw p2
.end method
.method public readFully([B)V
.registers 9
const-string v0, "sink"
invoke-static {p1, v0}, Lkotlin/jvm/internal/i;->d(Ljava/lang/Object;Ljava/lang/String;)V
.line 1
:try_start_5
array-length v0, p1
int-to-long v0, v0
invoke-virtual {p0, v0, v1}, Lokio/RealBufferedSource;->require(J)V
:try_end_a
.catch Ljava/io/EOFException; {:try_start_5 .. :try_end_a} :catch_10
.line 2
iget-object v0, p0, Lokio/RealBufferedSource;->bufferField:Lokio/Buffer;
.line 3
invoke-virtual {v0, p1}, Lokio/Buffer;->readFully([B)V
return-void
:catch_10
move-exception v0
const/4 v1, 0x0
.line 4
:goto_12
iget-object v2, p0, Lokio/RealBufferedSource;->bufferField:Lokio/Buffer;
invoke-virtual {v2}, Lokio/Buffer;->size()J
move-result-wide v2
const-wide/16 v4, 0x0
cmp-long v6, v2, v4
if-lez v6, :cond_34
.line 5
iget-object v2, p0, Lokio/RealBufferedSource;->bufferField:Lokio/Buffer;
.line 6
invoke-virtual {v2}, Lokio/Buffer;->size()J
move-result-wide v3
long-to-int v4, v3
.line 7
invoke-virtual {v2, p1, v1, v4}, Lokio/Buffer;->read([BII)I
move-result v2
const/4 v3, -0x1
if-eq v2, v3, :cond_2e
add-int/2addr v1, v2
goto :goto_12
.line 8
:cond_2e
new-instance p1, Ljava/lang/AssertionError;
invoke-direct {p1}, Ljava/lang/AssertionError;-><init>()V
throw p1
.line 9
:cond_34
goto :goto_36
:goto_35
throw v0
:goto_36
goto :goto_35
.end method
.method public readHexadecimalUnsignedLong()J
.registers 7
const-wide/16 v0, 0x1
.line 1
invoke-virtual {p0, v0, v1}, Lokio/RealBufferedSource;->require(J)V
const/4 v0, 0x0
const/4 v1, 0x0
:goto_7
add-int/lit8 v2, v1, 0x1
int-to-long v3, v2
.line 2
invoke-virtual {p0, v3, v4}, Lokio/RealBufferedSource;->request(J)Z
move-result v3
if-eqz v3, :cond_5c
.line 3
iget-object v3, p0, Lokio/RealBufferedSource;->bufferField:Lokio/Buffer;
int-to-long v4, v1
.line 4
invoke-virtual {v3, v4, v5}, Lokio/Buffer;->getByte(J)B
move-result v3
const/16 v4, 0x30
int-to-byte v4, v4
if-lt v3, v4, :cond_21
const/16 v4, 0x39
int-to-byte v4, v4
if-le v3, v4, :cond_36
:cond_21
const/16 v4, 0x61
int-to-byte v4, v4
if-lt v3, v4, :cond_2b
const/16 v4, 0x66
int-to-byte v4, v4
if-le v3, v4, :cond_36
:cond_2b
const/16 v4, 0x41
int-to-byte v4, v4
if-lt v3, v4, :cond_38
const/16 v4, 0x46
int-to-byte v4, v4
if-le v3, v4, :cond_36
goto :goto_38
:cond_36
move v1, v2
goto :goto_7
:cond_38
:goto_38
if-eqz v1, :cond_3b
goto :goto_5c
.line 5
:cond_3b
sget-object v1, Lkotlin/jvm/internal/m;->a:Lkotlin/jvm/internal/m;
const/4 v1, 0x1
.line 6
new-array v1, v1, [Ljava/lang/Object;
invoke-static {v3}, Ljava/lang/Byte;->valueOf(B)Ljava/lang/Byte;
move-result-object v2
aput-object v2, v1, v0
.line 7
array-length v0, v1
invoke-static {v1, v0}, Ljava/util/Arrays;->copyOf([Ljava/lang/Object;I)[Ljava/lang/Object;
move-result-object v0
const-string v1, "Expected leading [0-9a-fA-F] character but was %#x"
invoke-static {v1, v0}, Ljava/lang/String;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
move-result-object v0
const-string v1, "java.lang.String.format(format, *args)"
invoke-static {v0, v1}, Lkotlin/jvm/internal/i;->a(Ljava/lang/Object;Ljava/lang/String;)V
new-instance v1, Ljava/lang/NumberFormatException;
invoke-direct {v1, v0}, Ljava/lang/NumberFormatException;-><init>(Ljava/lang/String;)V
throw v1
.line 8
:cond_5c
:goto_5c
iget-object v0, p0, Lokio/RealBufferedSource;->bufferField:Lokio/Buffer;
.line 9
invoke-virtual {v0}, Lokio/Buffer;->readHexadecimalUnsignedLong()J
move-result-wide v0
return-wide v0
.end method
.method public readInt()I
.registers 3
const-wide/16 v0, 0x4
.line 1
invoke-virtual {p0, v0, v1}, Lokio/RealBufferedSource;->require(J)V
.line 2
iget-object v0, p0, Lokio/RealBufferedSource;->bufferField:Lokio/Buffer;
.line 3
invoke-virtual {v0}, Lokio/Buffer;->readInt()I
move-result v0
return v0
.end method
.method public readIntLe()I
.registers 3
const-wide/16 v0, 0x4
.line 1
invoke-virtual {p0, v0, v1}, Lokio/RealBufferedSource;->require(J)V
.line 2
iget-object v0, p0, Lokio/RealBufferedSource;->bufferField:Lokio/Buffer;
.line 3
invoke-virtual {v0}, Lokio/Buffer;->readIntLe()I
move-result v0
return v0
.end method
.method public readLong()J
.registers 3
const-wide/16 v0, 0x8
.line 1
invoke-virtual {p0, v0, v1}, Lokio/RealBufferedSource;->require(J)V
.line 2
iget-object v0, p0, Lokio/RealBufferedSource;->bufferField:Lokio/Buffer;
.line 3
invoke-virtual {v0}, Lokio/Buffer;->readLong()J
move-result-wide v0
return-wide v0
.end method
.method public readLongLe()J
.registers 3
const-wide/16 v0, 0x8
.line 1
invoke-virtual {p0, v0, v1}, Lokio/RealBufferedSource;->require(J)V
.line 2
iget-object v0, p0, Lokio/RealBufferedSource;->bufferField:Lokio/Buffer;
.line 3
invoke-virtual {v0}, Lokio/Buffer;->readLongLe()J
move-result-wide v0
return-wide v0
.end method
.method public readShort()S
.registers 3
const-wide/16 v0, 0x2
.line 1
invoke-virtual {p0, v0, v1}, Lokio/RealBufferedSource;->require(J)V
.line 2
iget-object v0, p0, Lokio/RealBufferedSource;->bufferField:Lokio/Buffer;
.line 3
invoke-virtual {v0}, Lokio/Buffer;->readShort()S
move-result v0
return v0
.end method
.method public readShortLe()S
.registers 3
const-wide/16 v0, 0x2
.line 1
invoke-virtual {p0, v0, v1}, Lokio/RealBufferedSource;->require(J)V
.line 2
iget-object v0, p0, Lokio/RealBufferedSource;->bufferField:Lokio/Buffer;
.line 3
invoke-virtual {v0}, Lokio/Buffer;->readShortLe()S
move-result v0
return v0
.end method
.method public readString(JLjava/nio/charset/Charset;)Ljava/lang/String;
.registers 5
const-string v0, "charset"
invoke-static {p3, v0}, Lkotlin/jvm/internal/i;->d(Ljava/lang/Object;Ljava/lang/String;)V
.line 1
invoke-virtual {p0, p1, p2}, Lokio/RealBufferedSource;->require(J)V
.line 2
iget-object v0, p0, Lokio/RealBufferedSource;->bufferField:Lokio/Buffer;
.line 3
invoke-virtual {v0, p1, p2, p3}, Lokio/Buffer;->readString(JLjava/nio/charset/Charset;)Ljava/lang/String;
move-result-object p1
return-object p1
.end method
.method public readString(Ljava/nio/charset/Charset;)Ljava/lang/String;
.registers 4
const-string v0, "charset"
invoke-static {p1, v0}, Lkotlin/jvm/internal/i;->d(Ljava/lang/Object;Ljava/lang/String;)V
.line 4
iget-object v0, p0, Lokio/RealBufferedSource;->bufferField:Lokio/Buffer;
.line 5
iget-object v1, p0, Lokio/RealBufferedSource;->source:Lokio/Source;
invoke-virtual {v0, v1}, Lokio/Buffer;->writeAll(Lokio/Source;)J
.line 6
iget-object v0, p0, Lokio/RealBufferedSource;->bufferField:Lokio/Buffer;
.line 7
invoke-virtual {v0, p1}, Lokio/Buffer;->readString(Ljava/nio/charset/Charset;)Ljava/lang/String;
move-result-object p1
return-object p1
.end method
.method public readUtf8()Ljava/lang/String;
.registers 3
.line 4
iget-object v0, p0, Lokio/RealBufferedSource;->bufferField:Lokio/Buffer;
.line 5
iget-object v1, p0, Lokio/RealBufferedSource;->source:Lokio/Source;
invoke-virtual {v0, v1}, Lokio/Buffer;->writeAll(Lokio/Source;)J
.line 6
iget-object v0, p0, Lokio/RealBufferedSource;->bufferField:Lokio/Buffer;
.line 7
invoke-virtual {v0}, Lokio/Buffer;->readUtf8()Ljava/lang/String;
move-result-object v0
return-object v0
.end method
.method public readUtf8(J)Ljava/lang/String;
.registers 4
.line 1
invoke-virtual {p0, p1, p2}, Lokio/RealBufferedSource;->require(J)V
.line 2
iget-object v0, p0, Lokio/RealBufferedSource;->bufferField:Lokio/Buffer;
.line 3
invoke-virtual {v0, p1, p2}, Lokio/Buffer;->readUtf8(J)Ljava/lang/String;
move-result-object p1
return-object p1
.end method
.method public readUtf8CodePoint()I
.registers 4
const-wide/16 v0, 0x1
.line 1
invoke-virtual {p0, v0, v1}, Lokio/RealBufferedSource;->require(J)V
.line 2
iget-object v0, p0, Lokio/RealBufferedSource;->bufferField:Lokio/Buffer;
const-wide/16 v1, 0x0
.line 3
invoke-virtual {v0, v1, v2}, Lokio/Buffer;->getByte(J)B
move-result v0
and-int/lit16 v1, v0, 0xe0
const/16 v2, 0xc0
if-ne v1, v2, :cond_19
const-wide/16 v0, 0x2
.line 4
invoke-virtual {p0, v0, v1}, Lokio/RealBufferedSource;->require(J)V
goto :goto_30
:cond_19
and-int/lit16 v1, v0, 0xf0
const/16 v2, 0xe0
if-ne v1, v2, :cond_25
const-wide/16 v0, 0x3
.line 5
invoke-virtual {p0, v0, v1}, Lokio/RealBufferedSource;->require(J)V
goto :goto_30
:cond_25
and-int/lit16 v0, v0, 0xf8
const/16 v1, 0xf0
if-ne v0, v1, :cond_30
const-wide/16 v0, 0x4
.line 6
invoke-virtual {p0, v0, v1}, Lokio/RealBufferedSource;->require(J)V
.line 7
:cond_30
:goto_30
iget-object v0, p0, Lokio/RealBufferedSource;->bufferField:Lokio/Buffer;
.line 8
invoke-virtual {v0}, Lokio/Buffer;->readUtf8CodePoint()I
move-result v0
return v0
.end method
.method public readUtf8Line()Ljava/lang/String;
.registers 6
const/16 v0, 0xa
int-to-byte v0, v0
.line 1
invoke-virtual {p0, v0}, Lokio/RealBufferedSource;->indexOf(B)J
move-result-wide v0
const-wide/16 v2, -0x1
cmp-long v4, v0, v2
if-nez v4, :cond_26
.line 2
iget-object v0, p0, Lokio/RealBufferedSource;->bufferField:Lokio/Buffer;
invoke-virtual {v0}, Lokio/Buffer;->size()J
move-result-wide v0
const-wide/16 v2, 0x0
cmp-long v4, v0, v2
if-eqz v4, :cond_24
.line 3
iget-object v0, p0, Lokio/RealBufferedSource;->bufferField:Lokio/Buffer;
invoke-virtual {v0}, Lokio/Buffer;->size()J
move-result-wide v0
.line 4
invoke-virtual {p0, v0, v1}, Lokio/RealBufferedSource;->readUtf8(J)Ljava/lang/String;
move-result-object v0
goto :goto_2c
:cond_24
const/4 v0, 0x0
goto :goto_2c
.line 5
:cond_26
iget-object v2, p0, Lokio/RealBufferedSource;->bufferField:Lokio/Buffer;
.line 6
invoke-static {v2, v0, v1}, Lokio/internal/BufferKt;->readUtf8Line(Lokio/Buffer;J)Ljava/lang/String;
move-result-object v0
:goto_2c
return-object v0
.end method
.method public readUtf8LineStrict()Ljava/lang/String;
.registers 3
const-wide v0, 0x7fffffffffffffffL
.line 1
invoke-virtual {p0, v0, v1}, Lokio/RealBufferedSource;->readUtf8LineStrict(J)Ljava/lang/String;
move-result-object v0
return-object v0
.end method
.method public readUtf8LineStrict(J)Ljava/lang/String;
.registers 16
const-wide/16 v0, 0x0
cmp-long v2, p1, v0
if-ltz v2, :cond_8
const/4 v0, 0x1
goto :goto_9
:cond_8
const/4 v0, 0x0
:goto_9
if-eqz v0, :cond_ae
const-wide/16 v0, 0x1
const-wide v2, 0x7fffffffffffffffL
cmp-long v4, p1, v2
if-nez v4, :cond_18
move-wide v4, v2
goto :goto_1a
:cond_18
add-long v4, p1, v0
:goto_1a
const/16 v6, 0xa
int-to-byte v12, v6
const-wide/16 v8, 0x0
move-object v6, p0
move v7, v12
move-wide v10, v4
.line 2
invoke-virtual/range {v6 .. v11}, Lokio/RealBufferedSource;->indexOf(BJJ)J
move-result-wide v6
const-wide/16 v8, -0x1
cmp-long v10, v6, v8
if-eqz v10, :cond_33
.line 3
iget-object p1, p0, Lokio/RealBufferedSource;->bufferField:Lokio/Buffer;
.line 4
invoke-static {p1, v6, v7}, Lokio/internal/BufferKt;->readUtf8Line(Lokio/Buffer;J)Ljava/lang/String;
move-result-object p1
return-object p1
:cond_33
cmp-long v6, v4, v2
if-gez v6, :cond_60
.line 5
invoke-virtual {p0, v4, v5}, Lokio/RealBufferedSource;->request(J)Z
move-result v2
if-eqz v2, :cond_60
.line 6
iget-object v2, p0, Lokio/RealBufferedSource;->bufferField:Lokio/Buffer;
sub-long v6, v4, v0
.line 7
invoke-virtual {v2, v6, v7}, Lokio/Buffer;->getByte(J)B
move-result v2
const/16 v3, 0xd
int-to-byte v3, v3
if-ne v2, v3, :cond_60
add-long/2addr v0, v4
.line 8
invoke-virtual {p0, v0, v1}, Lokio/RealBufferedSource;->request(J)Z
move-result v0
if-eqz v0, :cond_60
.line 9
iget-object v0, p0, Lokio/RealBufferedSource;->bufferField:Lokio/Buffer;
.line 10
invoke-virtual {v0, v4, v5}, Lokio/Buffer;->getByte(J)B
move-result v0
if-ne v0, v12, :cond_60
.line 11
iget-object p1, p0, Lokio/RealBufferedSource;->bufferField:Lokio/Buffer;
.line 12
invoke-static {p1, v4, v5}, Lokio/internal/BufferKt;->readUtf8Line(Lokio/Buffer;J)Ljava/lang/String;
move-result-object p1
return-object p1
.line 13
:cond_60
new-instance v6, Lokio/Buffer;
invoke-direct {v6}, Lokio/Buffer;-><init>()V
.line 14
iget-object v0, p0, Lokio/RealBufferedSource;->bufferField:Lokio/Buffer;
const-wide/16 v2, 0x0
const/16 v1, 0x20
.line 15
invoke-virtual {v0}, Lokio/Buffer;->size()J
move-result-wide v4
int-to-long v7, v1
.line 16
invoke-static {v7, v8, v4, v5}, Ljava/lang/Math;->min(JJ)J
move-result-wide v4
move-object v1, v6
.line 17
invoke-virtual/range {v0 .. v5}, Lokio/Buffer;->copyTo(Lokio/Buffer;JJ)Lokio/Buffer;
.line 18
new-instance v0, Ljava/lang/StringBuilder;
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
const-string v1, "\\n not found: limit="
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
.line 19
iget-object v1, p0, Lokio/RealBufferedSource;->bufferField:Lokio/Buffer;
invoke-virtual {v1}, Lokio/Buffer;->size()J
move-result-wide v1
.line 20
invoke-static {v1, v2, p1, p2}, Ljava/lang/Math;->min(JJ)J
move-result-wide p1
invoke-virtual {v0, p1, p2}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;
const-string p1, " content="
invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
.line 21
invoke-virtual {v6}, Lokio/Buffer;->readByteString()Lokio/ByteString;
move-result-object p1
invoke-virtual {p1}, Lokio/ByteString;->hex()Ljava/lang/String;
move-result-object p1
invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
const-string p1, "\u2026"
invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p1
.line 22
new-instance p2, Ljava/io/EOFException;
invoke-direct {p2, p1}, Ljava/io/EOFException;-><init>(Ljava/lang/String;)V
throw p2
.line 23
:cond_ae
new-instance v0, Ljava/lang/StringBuilder;
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
const-string v1, "limit < 0: "
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v0, p1, p2}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p1
new-instance p2, Ljava/lang/IllegalArgumentException;
invoke-virtual {p1}, Ljava/lang/String;->toString()Ljava/lang/String;
move-result-object p1
invoke-direct {p2, p1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
throw p2
.end method
.method public request(J)Z
.registers 10
const/4 v0, 0x0
const/4 v1, 0x1
const-wide/16 v2, 0x0
cmp-long v4, p1, v2
if-ltz v4, :cond_a
const/4 v2, 0x1
goto :goto_b
:cond_a
const/4 v2, 0x0
:goto_b
if-eqz v2, :cond_37
.line 1
iget-boolean v2, p0, Lokio/RealBufferedSource;->closed:Z
xor-int/2addr v2, v1
if-eqz v2, :cond_2f
.line 2
:cond_12
iget-object v2, p0, Lokio/RealBufferedSource;->bufferField:Lokio/Buffer;
invoke-virtual {v2}, Lokio/Buffer;->size()J
move-result-wide v2
cmp-long v4, v2, p1
if-gez v4, :cond_2e
.line 3
iget-object v2, p0, Lokio/RealBufferedSource;->source:Lokio/Source;
.line 4
iget-object v3, p0, Lokio/RealBufferedSource;->bufferField:Lokio/Buffer;
const/16 v4, 0x2000
int-to-long v4, v4
.line 5
invoke-interface {v2, v3, v4, v5}, Lokio/Source;->read(Lokio/Buffer;J)J
move-result-wide v2
const-wide/16 v4, -0x1
cmp-long v6, v2, v4
if-nez v6, :cond_12
return v0
:cond_2e
return v1
.line 6
:cond_2f
new-instance p1, Ljava/lang/IllegalStateException;
const-string p2, "closed"
invoke-direct {p1, p2}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
throw p1
.line 7
:cond_37
new-instance v0, Ljava/lang/StringBuilder;
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
const-string v1, "byteCount < 0: "
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v0, p1, p2}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p1
new-instance p2, Ljava/lang/IllegalArgumentException;
invoke-virtual {p1}, Ljava/lang/String;->toString()Ljava/lang/String;
move-result-object p1
invoke-direct {p2, p1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
goto :goto_53
:goto_52
throw p2
:goto_53
goto :goto_52
.end method
.method public require(J)V
.registers 3
.line 1
invoke-virtual {p0, p1, p2}, Lokio/RealBufferedSource;->request(J)Z
move-result p1
if-eqz p1, :cond_7
return-void
:cond_7
new-instance p1, Ljava/io/EOFException;
invoke-direct {p1}, Ljava/io/EOFException;-><init>()V
throw p1
.end method
.method public select(Lokio/Options;)I
.registers 10
const-string v0, "options"
invoke-static {p1, v0}, Lkotlin/jvm/internal/i;->d(Ljava/lang/Object;Ljava/lang/String;)V
.line 1
iget-boolean v0, p0, Lokio/RealBufferedSource;->closed:Z
const/4 v1, 0x1
xor-int/2addr v0, v1
if-eqz v0, :cond_3b
.line 2
:cond_b
iget-object v0, p0, Lokio/RealBufferedSource;->bufferField:Lokio/Buffer;
.line 3
invoke-static {v0, p1, v1}, Lokio/internal/BufferKt;->selectPrefix(Lokio/Buffer;Lokio/Options;Z)I
move-result v0
const/4 v2, -0x2
const/4 v3, -0x1
if-eq v0, v2, :cond_29
if-eq v0, v3, :cond_28
.line 4
invoke-virtual {p1}, Lokio/Options;->getByteStrings$okio()[Lokio/ByteString;
move-result-object p1
aget-object p1, p1, v0
invoke-virtual {p1}, Lokio/ByteString;->size()I
move-result p1
.line 5
iget-object v1, p0, Lokio/RealBufferedSource;->bufferField:Lokio/Buffer;
int-to-long v2, p1
.line 6
invoke-virtual {v1, v2, v3}, Lokio/Buffer;->skip(J)V
return v0
:cond_28
return v3
.line 7
:cond_29
iget-object v0, p0, Lokio/RealBufferedSource;->source:Lokio/Source;
.line 8
iget-object v2, p0, Lokio/RealBufferedSource;->bufferField:Lokio/Buffer;
const/16 v4, 0x2000
int-to-long v4, v4
.line 9
invoke-interface {v0, v2, v4, v5}, Lokio/Source;->read(Lokio/Buffer;J)J
move-result-wide v4
const-wide/16 v6, -0x1
cmp-long v0, v4, v6
if-nez v0, :cond_b
return v3
.line 10
:cond_3b
new-instance p1, Ljava/lang/IllegalStateException;
const-string v0, "closed"
invoke-direct {p1, v0}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
goto :goto_44
:goto_43
throw p1
:goto_44
goto :goto_43
.end method
.method public skip(J)V
.registers 8
.line 1
iget-boolean v0, p0, Lokio/RealBufferedSource;->closed:Z
xor-int/lit8 v0, v0, 0x1
if-eqz v0, :cond_40
:goto_6
const-wide/16 v0, 0x0
cmp-long v2, p1, v0
if-lez v2, :cond_3f
.line 2
iget-object v2, p0, Lokio/RealBufferedSource;->bufferField:Lokio/Buffer;
invoke-virtual {v2}, Lokio/Buffer;->size()J
move-result-wide v2
cmp-long v4, v2, v0
if-nez v4, :cond_2e
.line 3
iget-object v0, p0, Lokio/RealBufferedSource;->source:Lokio/Source;
.line 4
iget-object v1, p0, Lokio/RealBufferedSource;->bufferField:Lokio/Buffer;
const/16 v2, 0x2000
int-to-long v2, v2
.line 5
invoke-interface {v0, v1, v2, v3}, Lokio/Source;->read(Lokio/Buffer;J)J
move-result-wide v0
const-wide/16 v2, -0x1
cmp-long v4, v0, v2
if-eqz v4, :cond_28
goto :goto_2e
.line 6
:cond_28
new-instance p1, Ljava/io/EOFException;
invoke-direct {p1}, Ljava/io/EOFException;-><init>()V
throw p1
.line 7
:cond_2e
:goto_2e
iget-object v0, p0, Lokio/RealBufferedSource;->bufferField:Lokio/Buffer;
invoke-virtual {v0}, Lokio/Buffer;->size()J
move-result-wide v0
.line 8
invoke-static {p1, p2, v0, v1}, Ljava/lang/Math;->min(JJ)J
move-result-wide v0
.line 9
iget-object v2, p0, Lokio/RealBufferedSource;->bufferField:Lokio/Buffer;
.line 10
invoke-virtual {v2, v0, v1}, Lokio/Buffer;->skip(J)V
sub-long/2addr p1, v0
goto :goto_6
:cond_3f
return-void
.line 11
:cond_40
new-instance p1, Ljava/lang/IllegalStateException;
const-string p2, "closed"
invoke-direct {p1, p2}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
goto :goto_49
:goto_48
throw p1
:goto_49
goto :goto_48
.end method
.method public timeout()Lokio/Timeout;
.registers 2
.line 1
iget-object v0, p0, Lokio/RealBufferedSource;->source:Lokio/Source;
invoke-interface {v0}, Lokio/Source;->timeout()Lokio/Timeout;
move-result-object v0
return-object v0
.end method
.method public toString()Ljava/lang/String;
.registers 3
.line 1
new-instance v0, Ljava/lang/StringBuilder;
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
const-string v1, "buffer("
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
iget-object v1, p0, Lokio/RealBufferedSource;->source:Lokio/Source;
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
const/16 v1, 0x29
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v0
return-object v0
.end method