2140 lines
43 KiB
Smali
2140 lines
43 KiB
Smali
.class final Lokio/RealBufferedSource;
|
|
.super Ljava/lang/Object;
|
|
.source "RealBufferedSource.java"
|
|
|
|
# interfaces
|
|
.implements Lokio/BufferedSource;
|
|
|
|
|
|
# instance fields
|
|
.field public final buffer:Lokio/Buffer;
|
|
|
|
.field closed:Z
|
|
|
|
.field public final source:Lokio/Source;
|
|
|
|
|
|
# direct methods
|
|
.method constructor <init>(Lokio/Source;)V
|
|
.locals 1
|
|
|
|
.line 30
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
.line 26
|
|
new-instance v0, Lokio/Buffer;
|
|
|
|
invoke-direct {v0}, Lokio/Buffer;-><init>()V
|
|
|
|
iput-object v0, p0, Lokio/RealBufferedSource;->buffer:Lokio/Buffer;
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
.line 32
|
|
iput-object p1, p0, Lokio/RealBufferedSource;->source:Lokio/Source;
|
|
|
|
return-void
|
|
|
|
.line 31
|
|
:cond_0
|
|
new-instance p1, Ljava/lang/NullPointerException;
|
|
|
|
const-string v0, "source == null"
|
|
|
|
invoke-direct {p1, v0}, Ljava/lang/NullPointerException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public buffer()Lokio/Buffer;
|
|
.locals 1
|
|
|
|
.line 36
|
|
iget-object v0, p0, Lokio/RealBufferedSource;->buffer:Lokio/Buffer;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public close()V
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
.line 432
|
|
iget-boolean v0, p0, Lokio/RealBufferedSource;->closed:Z
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
const/4 v0, 0x1
|
|
|
|
.line 433
|
|
iput-boolean v0, p0, Lokio/RealBufferedSource;->closed:Z
|
|
|
|
.line 434
|
|
iget-object v0, p0, Lokio/RealBufferedSource;->source:Lokio/Source;
|
|
|
|
invoke-interface {v0}, Lokio/Source;->close()V
|
|
|
|
.line 435
|
|
iget-object v0, p0, Lokio/RealBufferedSource;->buffer:Lokio/Buffer;
|
|
|
|
invoke-virtual {v0}, Lokio/Buffer;->clear()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public exhausted()Z
|
|
.locals 5
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
.line 54
|
|
iget-boolean v0, p0, Lokio/RealBufferedSource;->closed:Z
|
|
|
|
if-nez v0, :cond_1
|
|
|
|
.line 55
|
|
iget-object v0, p0, Lokio/RealBufferedSource;->buffer:Lokio/Buffer;
|
|
|
|
invoke-virtual {v0}, Lokio/Buffer;->exhausted()Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
iget-object v0, p0, Lokio/RealBufferedSource;->source:Lokio/Source;
|
|
|
|
iget-object v1, p0, Lokio/RealBufferedSource;->buffer:Lokio/Buffer;
|
|
|
|
const-wide/16 v2, 0x2000
|
|
|
|
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_0
|
|
|
|
const/4 v0, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 v0, 0x0
|
|
|
|
:goto_0
|
|
return v0
|
|
|
|
.line 54
|
|
:cond_1
|
|
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 indexOf(B)J
|
|
.locals 2
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
const-wide/16 v0, 0x0
|
|
|
|
.line 314
|
|
invoke-virtual {p0, p1, v0, v1}, Lokio/RealBufferedSource;->indexOf(BJ)J
|
|
|
|
move-result-wide v0
|
|
|
|
return-wide v0
|
|
.end method
|
|
|
|
.method public indexOf(BJ)J
|
|
.locals 8
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
.line 318
|
|
iget-boolean v0, p0, Lokio/RealBufferedSource;->closed:Z
|
|
|
|
if-nez v0, :cond_2
|
|
|
|
.line 321
|
|
:goto_0
|
|
iget-object v0, p0, Lokio/RealBufferedSource;->buffer:Lokio/Buffer;
|
|
|
|
invoke-virtual {v0, p1, p2, p3}, Lokio/Buffer;->indexOf(BJ)J
|
|
|
|
move-result-wide v0
|
|
|
|
const-wide/16 v2, -0x1
|
|
|
|
cmp-long v4, v0, v2
|
|
|
|
if-eqz v4, :cond_0
|
|
|
|
return-wide v0
|
|
|
|
.line 324
|
|
:cond_0
|
|
iget-object v0, p0, Lokio/RealBufferedSource;->buffer:Lokio/Buffer;
|
|
|
|
iget-wide v0, v0, Lokio/Buffer;->size:J
|
|
|
|
.line 325
|
|
iget-object v4, p0, Lokio/RealBufferedSource;->source:Lokio/Source;
|
|
|
|
iget-object v5, p0, Lokio/RealBufferedSource;->buffer:Lokio/Buffer;
|
|
|
|
const-wide/16 v6, 0x2000
|
|
|
|
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_1
|
|
|
|
return-wide v2
|
|
|
|
.line 328
|
|
:cond_1
|
|
invoke-static {p2, p3, v0, v1}, Ljava/lang/Math;->max(JJ)J
|
|
|
|
move-result-wide p2
|
|
|
|
goto :goto_0
|
|
|
|
.line 318
|
|
:cond_2
|
|
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
|
|
|
|
.method public indexOf(Lokio/ByteString;)J
|
|
.locals 2
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
const-wide/16 v0, 0x0
|
|
|
|
.line 333
|
|
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
|
|
.locals 8
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
.line 337
|
|
iget-boolean v0, p0, Lokio/RealBufferedSource;->closed:Z
|
|
|
|
if-nez v0, :cond_2
|
|
|
|
.line 340
|
|
:goto_0
|
|
iget-object v0, p0, Lokio/RealBufferedSource;->buffer:Lokio/Buffer;
|
|
|
|
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_0
|
|
|
|
return-wide v0
|
|
|
|
.line 343
|
|
:cond_0
|
|
iget-object v0, p0, Lokio/RealBufferedSource;->buffer:Lokio/Buffer;
|
|
|
|
iget-wide v0, v0, Lokio/Buffer;->size:J
|
|
|
|
.line 344
|
|
iget-object v4, p0, Lokio/RealBufferedSource;->source:Lokio/Source;
|
|
|
|
iget-object v5, p0, Lokio/RealBufferedSource;->buffer:Lokio/Buffer;
|
|
|
|
const-wide/16 v6, 0x2000
|
|
|
|
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_1
|
|
|
|
return-wide v2
|
|
|
|
.line 347
|
|
:cond_1
|
|
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_0
|
|
|
|
.line 337
|
|
:cond_2
|
|
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
|
|
|
|
.method public indexOfElement(Lokio/ByteString;)J
|
|
.locals 2
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
const-wide/16 v0, 0x0
|
|
|
|
.line 352
|
|
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
|
|
.locals 8
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
.line 356
|
|
iget-boolean v0, p0, Lokio/RealBufferedSource;->closed:Z
|
|
|
|
if-nez v0, :cond_2
|
|
|
|
.line 359
|
|
:goto_0
|
|
iget-object v0, p0, Lokio/RealBufferedSource;->buffer:Lokio/Buffer;
|
|
|
|
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_0
|
|
|
|
return-wide v0
|
|
|
|
.line 362
|
|
:cond_0
|
|
iget-object v0, p0, Lokio/RealBufferedSource;->buffer:Lokio/Buffer;
|
|
|
|
iget-wide v0, v0, Lokio/Buffer;->size:J
|
|
|
|
.line 363
|
|
iget-object v4, p0, Lokio/RealBufferedSource;->source:Lokio/Source;
|
|
|
|
iget-object v5, p0, Lokio/RealBufferedSource;->buffer:Lokio/Buffer;
|
|
|
|
const-wide/16 v6, 0x2000
|
|
|
|
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_1
|
|
|
|
return-wide v2
|
|
|
|
.line 366
|
|
:cond_1
|
|
invoke-static {p2, p3, v0, v1}, Ljava/lang/Math;->max(JJ)J
|
|
|
|
move-result-wide p2
|
|
|
|
goto :goto_0
|
|
|
|
.line 356
|
|
:cond_2
|
|
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
|
|
|
|
.method public inputStream()Ljava/io/InputStream;
|
|
.locals 1
|
|
|
|
.line 394
|
|
new-instance v0, Lokio/RealBufferedSource$1;
|
|
|
|
invoke-direct {v0, p0}, Lokio/RealBufferedSource$1;-><init>(Lokio/RealBufferedSource;)V
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public rangeEquals(JLokio/ByteString;)Z
|
|
.locals 6
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
.line 371
|
|
invoke-virtual {p3}, Lokio/ByteString;->size()I
|
|
|
|
move-result v5
|
|
|
|
const/4 v4, 0x0
|
|
|
|
move-object v0, p0
|
|
|
|
move-wide v1, p1
|
|
|
|
move-object v3, p3
|
|
|
|
invoke-virtual/range {v0 .. v5}, Lokio/RealBufferedSource;->rangeEquals(JLokio/ByteString;II)Z
|
|
|
|
move-result p1
|
|
|
|
return p1
|
|
.end method
|
|
|
|
.method public rangeEquals(JLokio/ByteString;II)Z
|
|
.locals 7
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
.line 377
|
|
iget-boolean v0, p0, Lokio/RealBufferedSource;->closed:Z
|
|
|
|
if-nez v0, :cond_5
|
|
|
|
const-wide/16 v0, 0x0
|
|
|
|
const/4 v2, 0x0
|
|
|
|
cmp-long v3, p1, v0
|
|
|
|
if-ltz v3, :cond_4
|
|
|
|
if-ltz p4, :cond_4
|
|
|
|
if-ltz p5, :cond_4
|
|
|
|
.line 382
|
|
invoke-virtual {p3}, Lokio/ByteString;->size()I
|
|
|
|
move-result v0
|
|
|
|
sub-int/2addr v0, p4
|
|
|
|
if-ge v0, p5, :cond_0
|
|
|
|
goto :goto_1
|
|
|
|
:cond_0
|
|
const/4 v0, 0x0
|
|
|
|
:goto_0
|
|
if-ge v0, p5, :cond_3
|
|
|
|
int-to-long v3, v0
|
|
|
|
add-long/2addr v3, p1
|
|
|
|
const-wide/16 v5, 0x1
|
|
|
|
add-long/2addr v5, v3
|
|
|
|
.line 387
|
|
invoke-virtual {p0, v5, v6}, Lokio/RealBufferedSource;->request(J)Z
|
|
|
|
move-result v1
|
|
|
|
if-nez v1, :cond_1
|
|
|
|
return v2
|
|
|
|
.line 388
|
|
:cond_1
|
|
iget-object v1, p0, Lokio/RealBufferedSource;->buffer:Lokio/Buffer;
|
|
|
|
invoke-virtual {v1, v3, v4}, Lokio/Buffer;->getByte(J)B
|
|
|
|
move-result v1
|
|
|
|
add-int v3, p4, v0
|
|
|
|
invoke-virtual {p3, v3}, Lokio/ByteString;->getByte(I)B
|
|
|
|
move-result v3
|
|
|
|
if-eq v1, v3, :cond_2
|
|
|
|
return v2
|
|
|
|
:cond_2
|
|
add-int/lit8 v0, v0, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_3
|
|
const/4 p1, 0x1
|
|
|
|
return p1
|
|
|
|
:cond_4
|
|
:goto_1
|
|
return v2
|
|
|
|
.line 377
|
|
:cond_5
|
|
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
|
|
|
|
.method public read([B)I
|
|
.locals 2
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
.line 116
|
|
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
|
|
.locals 9
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
.line 136
|
|
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 138
|
|
iget-object p3, p0, Lokio/RealBufferedSource;->buffer:Lokio/Buffer;
|
|
|
|
iget-wide v0, p3, Lokio/Buffer;->size:J
|
|
|
|
const-wide/16 v2, 0x0
|
|
|
|
cmp-long p3, v0, v2
|
|
|
|
if-nez p3, :cond_0
|
|
|
|
.line 139
|
|
iget-object p3, p0, Lokio/RealBufferedSource;->source:Lokio/Source;
|
|
|
|
iget-object v0, p0, Lokio/RealBufferedSource;->buffer:Lokio/Buffer;
|
|
|
|
const-wide/16 v1, 0x2000
|
|
|
|
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_0
|
|
|
|
const/4 p1, -0x1
|
|
|
|
return p1
|
|
|
|
.line 143
|
|
:cond_0
|
|
iget-object p3, p0, Lokio/RealBufferedSource;->buffer:Lokio/Buffer;
|
|
|
|
iget-wide v0, p3, Lokio/Buffer;->size:J
|
|
|
|
invoke-static {v7, v8, v0, v1}, Ljava/lang/Math;->min(JJ)J
|
|
|
|
move-result-wide v0
|
|
|
|
long-to-int p3, v0
|
|
|
|
.line 144
|
|
iget-object v0, p0, Lokio/RealBufferedSource;->buffer:Lokio/Buffer;
|
|
|
|
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
|
|
.locals 5
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
if-eqz p1, :cond_3
|
|
|
|
const-wide/16 v0, 0x0
|
|
|
|
cmp-long v2, p2, v0
|
|
|
|
if-ltz v2, :cond_2
|
|
|
|
.line 42
|
|
iget-boolean v2, p0, Lokio/RealBufferedSource;->closed:Z
|
|
|
|
if-nez v2, :cond_1
|
|
|
|
.line 44
|
|
iget-object v2, p0, Lokio/RealBufferedSource;->buffer:Lokio/Buffer;
|
|
|
|
iget-wide v2, v2, Lokio/Buffer;->size:J
|
|
|
|
cmp-long v4, v2, v0
|
|
|
|
if-nez v4, :cond_0
|
|
|
|
.line 45
|
|
iget-object v0, p0, Lokio/RealBufferedSource;->source:Lokio/Source;
|
|
|
|
iget-object v1, p0, Lokio/RealBufferedSource;->buffer:Lokio/Buffer;
|
|
|
|
const-wide/16 v2, 0x2000
|
|
|
|
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_0
|
|
|
|
return-wide v2
|
|
|
|
.line 49
|
|
:cond_0
|
|
iget-object v0, p0, Lokio/RealBufferedSource;->buffer:Lokio/Buffer;
|
|
|
|
iget-wide v0, v0, Lokio/Buffer;->size:J
|
|
|
|
invoke-static {p2, p3, v0, v1}, Ljava/lang/Math;->min(JJ)J
|
|
|
|
move-result-wide p2
|
|
|
|
.line 50
|
|
iget-object v0, p0, Lokio/RealBufferedSource;->buffer:Lokio/Buffer;
|
|
|
|
invoke-virtual {v0, p1, p2, p3}, Lokio/Buffer;->read(Lokio/Buffer;J)J
|
|
|
|
move-result-wide p1
|
|
|
|
return-wide p1
|
|
|
|
.line 42
|
|
: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
|
|
|
|
.line 41
|
|
:cond_2
|
|
new-instance p1, Ljava/lang/IllegalArgumentException;
|
|
|
|
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, 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/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw p1
|
|
|
|
.line 40
|
|
:cond_3
|
|
new-instance p1, Ljava/lang/IllegalArgumentException;
|
|
|
|
const-string p2, "sink == null"
|
|
|
|
invoke-direct {p1, p2}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method public readAll(Lokio/Sink;)J
|
|
.locals 9
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
if-eqz p1, :cond_3
|
|
|
|
const-wide/16 v0, 0x0
|
|
|
|
move-wide v2, v0
|
|
|
|
.line 162
|
|
:cond_0
|
|
:goto_0
|
|
iget-object v4, p0, Lokio/RealBufferedSource;->source:Lokio/Source;
|
|
|
|
iget-object v5, p0, Lokio/RealBufferedSource;->buffer:Lokio/Buffer;
|
|
|
|
const-wide/16 v6, 0x2000
|
|
|
|
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_1
|
|
|
|
.line 163
|
|
iget-object v4, p0, Lokio/RealBufferedSource;->buffer:Lokio/Buffer;
|
|
|
|
invoke-virtual {v4}, Lokio/Buffer;->completeSegmentByteCount()J
|
|
|
|
move-result-wide v4
|
|
|
|
cmp-long v6, v4, v0
|
|
|
|
if-lez v6, :cond_0
|
|
|
|
add-long/2addr v2, v4
|
|
|
|
.line 166
|
|
iget-object v6, p0, Lokio/RealBufferedSource;->buffer:Lokio/Buffer;
|
|
|
|
invoke-interface {p1, v6, v4, v5}, Lokio/Sink;->write(Lokio/Buffer;J)V
|
|
|
|
goto :goto_0
|
|
|
|
.line 169
|
|
:cond_1
|
|
iget-object v4, p0, Lokio/RealBufferedSource;->buffer:Lokio/Buffer;
|
|
|
|
invoke-virtual {v4}, Lokio/Buffer;->size()J
|
|
|
|
move-result-wide v4
|
|
|
|
cmp-long v6, v4, v0
|
|
|
|
if-lez v6, :cond_2
|
|
|
|
.line 170
|
|
iget-object v0, p0, Lokio/RealBufferedSource;->buffer:Lokio/Buffer;
|
|
|
|
invoke-virtual {v0}, Lokio/Buffer;->size()J
|
|
|
|
move-result-wide v0
|
|
|
|
add-long/2addr v2, v0
|
|
|
|
.line 171
|
|
iget-object v0, p0, Lokio/RealBufferedSource;->buffer:Lokio/Buffer;
|
|
|
|
iget-object v1, p0, Lokio/RealBufferedSource;->buffer:Lokio/Buffer;
|
|
|
|
invoke-virtual {v1}, Lokio/Buffer;->size()J
|
|
|
|
move-result-wide v4
|
|
|
|
invoke-interface {p1, v0, v4, v5}, Lokio/Sink;->write(Lokio/Buffer;J)V
|
|
|
|
:cond_2
|
|
return-wide v2
|
|
|
|
.line 159
|
|
:cond_3
|
|
new-instance p1, Ljava/lang/IllegalArgumentException;
|
|
|
|
const-string v0, "sink == null"
|
|
|
|
invoke-direct {p1, v0}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method public readByte()B
|
|
.locals 2
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
const-wide/16 v0, 0x1
|
|
|
|
.line 72
|
|
invoke-virtual {p0, v0, v1}, Lokio/RealBufferedSource;->require(J)V
|
|
|
|
.line 73
|
|
iget-object v0, p0, Lokio/RealBufferedSource;->buffer:Lokio/Buffer;
|
|
|
|
invoke-virtual {v0}, Lokio/Buffer;->readByte()B
|
|
|
|
move-result v0
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public readByteArray()[B
|
|
.locals 2
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
.line 106
|
|
iget-object v0, p0, Lokio/RealBufferedSource;->buffer:Lokio/Buffer;
|
|
|
|
iget-object v1, p0, Lokio/RealBufferedSource;->source:Lokio/Source;
|
|
|
|
invoke-virtual {v0, v1}, Lokio/Buffer;->writeAll(Lokio/Source;)J
|
|
|
|
.line 107
|
|
iget-object v0, p0, Lokio/RealBufferedSource;->buffer:Lokio/Buffer;
|
|
|
|
invoke-virtual {v0}, Lokio/Buffer;->readByteArray()[B
|
|
|
|
move-result-object v0
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public readByteArray(J)[B
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
.line 111
|
|
invoke-virtual {p0, p1, p2}, Lokio/RealBufferedSource;->require(J)V
|
|
|
|
.line 112
|
|
iget-object v0, p0, Lokio/RealBufferedSource;->buffer:Lokio/Buffer;
|
|
|
|
invoke-virtual {v0, p1, p2}, Lokio/Buffer;->readByteArray(J)[B
|
|
|
|
move-result-object p1
|
|
|
|
return-object p1
|
|
.end method
|
|
|
|
.method public readByteString()Lokio/ByteString;
|
|
.locals 2
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
.line 77
|
|
iget-object v0, p0, Lokio/RealBufferedSource;->buffer:Lokio/Buffer;
|
|
|
|
iget-object v1, p0, Lokio/RealBufferedSource;->source:Lokio/Source;
|
|
|
|
invoke-virtual {v0, v1}, Lokio/Buffer;->writeAll(Lokio/Source;)J
|
|
|
|
.line 78
|
|
iget-object v0, p0, Lokio/RealBufferedSource;->buffer:Lokio/Buffer;
|
|
|
|
invoke-virtual {v0}, Lokio/Buffer;->readByteString()Lokio/ByteString;
|
|
|
|
move-result-object v0
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public readByteString(J)Lokio/ByteString;
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
.line 82
|
|
invoke-virtual {p0, p1, p2}, Lokio/RealBufferedSource;->require(J)V
|
|
|
|
.line 83
|
|
iget-object v0, p0, Lokio/RealBufferedSource;->buffer:Lokio/Buffer;
|
|
|
|
invoke-virtual {v0, p1, p2}, Lokio/Buffer;->readByteString(J)Lokio/ByteString;
|
|
|
|
move-result-object p1
|
|
|
|
return-object p1
|
|
.end method
|
|
|
|
.method public readDecimalLong()J
|
|
.locals 6
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
const-wide/16 v0, 0x1
|
|
|
|
.line 266
|
|
invoke-virtual {p0, v0, v1}, Lokio/RealBufferedSource;->require(J)V
|
|
|
|
const/4 v0, 0x0
|
|
|
|
const/4 v1, 0x0
|
|
|
|
:goto_0
|
|
add-int/lit8 v2, v1, 0x1
|
|
|
|
int-to-long v3, v2
|
|
|
|
.line 268
|
|
invoke-virtual {p0, v3, v4}, Lokio/RealBufferedSource;->request(J)Z
|
|
|
|
move-result v3
|
|
|
|
if-eqz v3, :cond_4
|
|
|
|
.line 269
|
|
iget-object v3, p0, Lokio/RealBufferedSource;->buffer:Lokio/Buffer;
|
|
|
|
int-to-long v4, v1
|
|
|
|
invoke-virtual {v3, v4, v5}, Lokio/Buffer;->getByte(J)B
|
|
|
|
move-result v3
|
|
|
|
const/16 v4, 0x30
|
|
|
|
if-lt v3, v4, :cond_0
|
|
|
|
const/16 v4, 0x39
|
|
|
|
if-le v3, v4, :cond_1
|
|
|
|
:cond_0
|
|
if-nez v1, :cond_2
|
|
|
|
const/16 v4, 0x2d
|
|
|
|
if-eq v3, v4, :cond_1
|
|
|
|
goto :goto_1
|
|
|
|
:cond_1
|
|
move v1, v2
|
|
|
|
goto :goto_0
|
|
|
|
:cond_2
|
|
:goto_1
|
|
if-eqz v1, :cond_3
|
|
|
|
goto :goto_2
|
|
|
|
.line 273
|
|
:cond_3
|
|
new-instance v1, Ljava/lang/NumberFormatException;
|
|
|
|
const/4 v2, 0x1
|
|
|
|
new-array v2, v2, [Ljava/lang/Object;
|
|
|
|
.line 274
|
|
invoke-static {v3}, Ljava/lang/Byte;->valueOf(B)Ljava/lang/Byte;
|
|
|
|
move-result-object v3
|
|
|
|
aput-object v3, v2, v0
|
|
|
|
const-string v0, "Expected leading [0-9] or \'-\' character but was %#x"
|
|
|
|
.line 273
|
|
invoke-static {v0, v2}, Ljava/lang/String;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-direct {v1, v0}, Ljava/lang/NumberFormatException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw v1
|
|
|
|
.line 280
|
|
:cond_4
|
|
:goto_2
|
|
iget-object v0, p0, Lokio/RealBufferedSource;->buffer:Lokio/Buffer;
|
|
|
|
invoke-virtual {v0}, Lokio/Buffer;->readDecimalLong()J
|
|
|
|
move-result-wide v0
|
|
|
|
return-wide v0
|
|
.end method
|
|
|
|
.method public readFully(Lokio/Buffer;J)V
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
.line 149
|
|
:try_start_0
|
|
invoke-virtual {p0, p2, p3}, Lokio/RealBufferedSource;->require(J)V
|
|
:try_end_0
|
|
.catch Ljava/io/EOFException; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
.line 155
|
|
iget-object v0, p0, Lokio/RealBufferedSource;->buffer:Lokio/Buffer;
|
|
|
|
invoke-virtual {v0, p1, p2, p3}, Lokio/Buffer;->readFully(Lokio/Buffer;J)V
|
|
|
|
return-void
|
|
|
|
:catch_0
|
|
move-exception p2
|
|
|
|
.line 152
|
|
iget-object p3, p0, Lokio/RealBufferedSource;->buffer:Lokio/Buffer;
|
|
|
|
invoke-virtual {p1, p3}, Lokio/Buffer;->writeAll(Lokio/Source;)J
|
|
|
|
.line 153
|
|
throw p2
|
|
.end method
|
|
|
|
.method public readFully([B)V
|
|
.locals 7
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
.line 121
|
|
:try_start_0
|
|
array-length v0, p1
|
|
|
|
int-to-long v0, v0
|
|
|
|
invoke-virtual {p0, v0, v1}, Lokio/RealBufferedSource;->require(J)V
|
|
:try_end_0
|
|
.catch Ljava/io/EOFException; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
.line 132
|
|
iget-object v0, p0, Lokio/RealBufferedSource;->buffer:Lokio/Buffer;
|
|
|
|
invoke-virtual {v0, p1}, Lokio/Buffer;->readFully([B)V
|
|
|
|
return-void
|
|
|
|
:catch_0
|
|
move-exception v0
|
|
|
|
const/4 v1, 0x0
|
|
|
|
.line 125
|
|
:goto_0
|
|
iget-object v2, p0, Lokio/RealBufferedSource;->buffer:Lokio/Buffer;
|
|
|
|
iget-wide v2, v2, Lokio/Buffer;->size:J
|
|
|
|
const-wide/16 v4, 0x0
|
|
|
|
cmp-long v6, v2, v4
|
|
|
|
if-lez v6, :cond_1
|
|
|
|
.line 126
|
|
iget-object v2, p0, Lokio/RealBufferedSource;->buffer:Lokio/Buffer;
|
|
|
|
iget-object v3, p0, Lokio/RealBufferedSource;->buffer:Lokio/Buffer;
|
|
|
|
iget-wide v3, v3, Lokio/Buffer;->size:J
|
|
|
|
long-to-int v3, v3
|
|
|
|
invoke-virtual {v2, p1, v1, v3}, Lokio/Buffer;->read([BII)I
|
|
|
|
move-result v2
|
|
|
|
const/4 v3, -0x1
|
|
|
|
if-eq v2, v3, :cond_0
|
|
|
|
add-int/2addr v1, v2
|
|
|
|
goto :goto_0
|
|
|
|
.line 127
|
|
:cond_0
|
|
new-instance p1, Ljava/lang/AssertionError;
|
|
|
|
invoke-direct {p1}, Ljava/lang/AssertionError;-><init>()V
|
|
|
|
throw p1
|
|
|
|
.line 130
|
|
:cond_1
|
|
throw v0
|
|
.end method
|
|
|
|
.method public readHexadecimalUnsignedLong()J
|
|
.locals 6
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
const-wide/16 v0, 0x1
|
|
|
|
.line 284
|
|
invoke-virtual {p0, v0, v1}, Lokio/RealBufferedSource;->require(J)V
|
|
|
|
const/4 v0, 0x0
|
|
|
|
const/4 v1, 0x0
|
|
|
|
:goto_0
|
|
add-int/lit8 v2, v1, 0x1
|
|
|
|
int-to-long v3, v2
|
|
|
|
.line 286
|
|
invoke-virtual {p0, v3, v4}, Lokio/RealBufferedSource;->request(J)Z
|
|
|
|
move-result v3
|
|
|
|
if-eqz v3, :cond_5
|
|
|
|
.line 287
|
|
iget-object v3, p0, Lokio/RealBufferedSource;->buffer:Lokio/Buffer;
|
|
|
|
int-to-long v4, v1
|
|
|
|
invoke-virtual {v3, v4, v5}, Lokio/Buffer;->getByte(J)B
|
|
|
|
move-result v3
|
|
|
|
const/16 v4, 0x30
|
|
|
|
if-lt v3, v4, :cond_0
|
|
|
|
const/16 v4, 0x39
|
|
|
|
if-le v3, v4, :cond_2
|
|
|
|
:cond_0
|
|
const/16 v4, 0x61
|
|
|
|
if-lt v3, v4, :cond_1
|
|
|
|
const/16 v4, 0x66
|
|
|
|
if-le v3, v4, :cond_2
|
|
|
|
:cond_1
|
|
const/16 v4, 0x41
|
|
|
|
if-lt v3, v4, :cond_3
|
|
|
|
const/16 v4, 0x46
|
|
|
|
if-le v3, v4, :cond_2
|
|
|
|
goto :goto_1
|
|
|
|
:cond_2
|
|
move v1, v2
|
|
|
|
goto :goto_0
|
|
|
|
:cond_3
|
|
:goto_1
|
|
if-eqz v1, :cond_4
|
|
|
|
goto :goto_2
|
|
|
|
.line 291
|
|
:cond_4
|
|
new-instance v1, Ljava/lang/NumberFormatException;
|
|
|
|
const/4 v2, 0x1
|
|
|
|
new-array v2, v2, [Ljava/lang/Object;
|
|
|
|
.line 292
|
|
invoke-static {v3}, Ljava/lang/Byte;->valueOf(B)Ljava/lang/Byte;
|
|
|
|
move-result-object v3
|
|
|
|
aput-object v3, v2, v0
|
|
|
|
const-string v0, "Expected leading [0-9a-fA-F] character but was %#x"
|
|
|
|
.line 291
|
|
invoke-static {v0, v2}, Ljava/lang/String;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-direct {v1, v0}, Ljava/lang/NumberFormatException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw v1
|
|
|
|
.line 298
|
|
:cond_5
|
|
:goto_2
|
|
iget-object v0, p0, Lokio/RealBufferedSource;->buffer:Lokio/Buffer;
|
|
|
|
invoke-virtual {v0}, Lokio/Buffer;->readHexadecimalUnsignedLong()J
|
|
|
|
move-result-wide v0
|
|
|
|
return-wide v0
|
|
.end method
|
|
|
|
.method public readInt()I
|
|
.locals 2
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
const-wide/16 v0, 0x4
|
|
|
|
.line 246
|
|
invoke-virtual {p0, v0, v1}, Lokio/RealBufferedSource;->require(J)V
|
|
|
|
.line 247
|
|
iget-object v0, p0, Lokio/RealBufferedSource;->buffer:Lokio/Buffer;
|
|
|
|
invoke-virtual {v0}, Lokio/Buffer;->readInt()I
|
|
|
|
move-result v0
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public readIntLe()I
|
|
.locals 2
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
const-wide/16 v0, 0x4
|
|
|
|
.line 251
|
|
invoke-virtual {p0, v0, v1}, Lokio/RealBufferedSource;->require(J)V
|
|
|
|
.line 252
|
|
iget-object v0, p0, Lokio/RealBufferedSource;->buffer:Lokio/Buffer;
|
|
|
|
invoke-virtual {v0}, Lokio/Buffer;->readIntLe()I
|
|
|
|
move-result v0
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public readLong()J
|
|
.locals 2
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
const-wide/16 v0, 0x8
|
|
|
|
.line 256
|
|
invoke-virtual {p0, v0, v1}, Lokio/RealBufferedSource;->require(J)V
|
|
|
|
.line 257
|
|
iget-object v0, p0, Lokio/RealBufferedSource;->buffer:Lokio/Buffer;
|
|
|
|
invoke-virtual {v0}, Lokio/Buffer;->readLong()J
|
|
|
|
move-result-wide v0
|
|
|
|
return-wide v0
|
|
.end method
|
|
|
|
.method public readLongLe()J
|
|
.locals 2
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
const-wide/16 v0, 0x8
|
|
|
|
.line 261
|
|
invoke-virtual {p0, v0, v1}, Lokio/RealBufferedSource;->require(J)V
|
|
|
|
.line 262
|
|
iget-object v0, p0, Lokio/RealBufferedSource;->buffer:Lokio/Buffer;
|
|
|
|
invoke-virtual {v0}, Lokio/Buffer;->readLongLe()J
|
|
|
|
move-result-wide v0
|
|
|
|
return-wide v0
|
|
.end method
|
|
|
|
.method public readShort()S
|
|
.locals 2
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
const-wide/16 v0, 0x2
|
|
|
|
.line 236
|
|
invoke-virtual {p0, v0, v1}, Lokio/RealBufferedSource;->require(J)V
|
|
|
|
.line 237
|
|
iget-object v0, p0, Lokio/RealBufferedSource;->buffer:Lokio/Buffer;
|
|
|
|
invoke-virtual {v0}, Lokio/Buffer;->readShort()S
|
|
|
|
move-result v0
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public readShortLe()S
|
|
.locals 2
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
const-wide/16 v0, 0x2
|
|
|
|
.line 241
|
|
invoke-virtual {p0, v0, v1}, Lokio/RealBufferedSource;->require(J)V
|
|
|
|
.line 242
|
|
iget-object v0, p0, Lokio/RealBufferedSource;->buffer:Lokio/Buffer;
|
|
|
|
invoke-virtual {v0}, Lokio/Buffer;->readShortLe()S
|
|
|
|
move-result v0
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public readString(JLjava/nio/charset/Charset;)Ljava/lang/String;
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
.line 194
|
|
invoke-virtual {p0, p1, p2}, Lokio/RealBufferedSource;->require(J)V
|
|
|
|
if-eqz p3, :cond_0
|
|
|
|
.line 196
|
|
iget-object v0, p0, Lokio/RealBufferedSource;->buffer:Lokio/Buffer;
|
|
|
|
invoke-virtual {v0, p1, p2, p3}, Lokio/Buffer;->readString(JLjava/nio/charset/Charset;)Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
return-object p1
|
|
|
|
.line 195
|
|
:cond_0
|
|
new-instance p1, Ljava/lang/IllegalArgumentException;
|
|
|
|
const-string p2, "charset == null"
|
|
|
|
invoke-direct {p1, p2}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method public readString(Ljava/nio/charset/Charset;)Ljava/lang/String;
|
|
.locals 2
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
.line 189
|
|
iget-object v0, p0, Lokio/RealBufferedSource;->buffer:Lokio/Buffer;
|
|
|
|
iget-object v1, p0, Lokio/RealBufferedSource;->source:Lokio/Source;
|
|
|
|
invoke-virtual {v0, v1}, Lokio/Buffer;->writeAll(Lokio/Source;)J
|
|
|
|
.line 190
|
|
iget-object v0, p0, Lokio/RealBufferedSource;->buffer:Lokio/Buffer;
|
|
|
|
invoke-virtual {v0, p1}, Lokio/Buffer;->readString(Ljava/nio/charset/Charset;)Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
return-object p1
|
|
|
|
.line 187
|
|
:cond_0
|
|
new-instance p1, Ljava/lang/IllegalArgumentException;
|
|
|
|
const-string v0, "charset == null"
|
|
|
|
invoke-direct {p1, v0}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method public readUtf8()Ljava/lang/String;
|
|
.locals 2
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
.line 177
|
|
iget-object v0, p0, Lokio/RealBufferedSource;->buffer:Lokio/Buffer;
|
|
|
|
iget-object v1, p0, Lokio/RealBufferedSource;->source:Lokio/Source;
|
|
|
|
invoke-virtual {v0, v1}, Lokio/Buffer;->writeAll(Lokio/Source;)J
|
|
|
|
.line 178
|
|
iget-object v0, p0, Lokio/RealBufferedSource;->buffer:Lokio/Buffer;
|
|
|
|
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;
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
.line 182
|
|
invoke-virtual {p0, p1, p2}, Lokio/RealBufferedSource;->require(J)V
|
|
|
|
.line 183
|
|
iget-object v0, p0, Lokio/RealBufferedSource;->buffer:Lokio/Buffer;
|
|
|
|
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
|
|
.locals 3
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
const-wide/16 v0, 0x1
|
|
|
|
.line 221
|
|
invoke-virtual {p0, v0, v1}, Lokio/RealBufferedSource;->require(J)V
|
|
|
|
.line 223
|
|
iget-object v0, p0, Lokio/RealBufferedSource;->buffer:Lokio/Buffer;
|
|
|
|
const-wide/16 v1, 0x0
|
|
|
|
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_0
|
|
|
|
const-wide/16 v0, 0x2
|
|
|
|
.line 225
|
|
invoke-virtual {p0, v0, v1}, Lokio/RealBufferedSource;->require(J)V
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
and-int/lit16 v1, v0, 0xf0
|
|
|
|
const/16 v2, 0xe0
|
|
|
|
if-ne v1, v2, :cond_1
|
|
|
|
const-wide/16 v0, 0x3
|
|
|
|
.line 227
|
|
invoke-virtual {p0, v0, v1}, Lokio/RealBufferedSource;->require(J)V
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
and-int/lit16 v0, v0, 0xf8
|
|
|
|
const/16 v1, 0xf0
|
|
|
|
if-ne v0, v1, :cond_2
|
|
|
|
const-wide/16 v0, 0x4
|
|
|
|
.line 229
|
|
invoke-virtual {p0, v0, v1}, Lokio/RealBufferedSource;->require(J)V
|
|
|
|
.line 232
|
|
:cond_2
|
|
:goto_0
|
|
iget-object v0, p0, Lokio/RealBufferedSource;->buffer:Lokio/Buffer;
|
|
|
|
invoke-virtual {v0}, Lokio/Buffer;->readUtf8CodePoint()I
|
|
|
|
move-result v0
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public readUtf8Line()Ljava/lang/String;
|
|
.locals 5
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
const/16 v0, 0xa
|
|
|
|
.line 200
|
|
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_1
|
|
|
|
.line 203
|
|
iget-object v0, p0, Lokio/RealBufferedSource;->buffer:Lokio/Buffer;
|
|
|
|
iget-wide v0, v0, Lokio/Buffer;->size:J
|
|
|
|
const-wide/16 v2, 0x0
|
|
|
|
cmp-long v4, v0, v2
|
|
|
|
if-eqz v4, :cond_0
|
|
|
|
iget-object v0, p0, Lokio/RealBufferedSource;->buffer:Lokio/Buffer;
|
|
|
|
iget-wide v0, v0, Lokio/Buffer;->size:J
|
|
|
|
invoke-virtual {p0, v0, v1}, Lokio/RealBufferedSource;->readUtf8(J)Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 v0, 0x0
|
|
|
|
:goto_0
|
|
return-object v0
|
|
|
|
.line 206
|
|
:cond_1
|
|
iget-object v2, p0, Lokio/RealBufferedSource;->buffer:Lokio/Buffer;
|
|
|
|
invoke-virtual {v2, v0, v1}, Lokio/Buffer;->readUtf8Line(J)Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public readUtf8LineStrict()Ljava/lang/String;
|
|
.locals 9
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
const/16 v0, 0xa
|
|
|
|
.line 210
|
|
invoke-virtual {p0, v0}, Lokio/RealBufferedSource;->indexOf(B)J
|
|
|
|
move-result-wide v0
|
|
|
|
const-wide/16 v2, -0x1
|
|
|
|
cmp-long v4, v0, v2
|
|
|
|
if-eqz v4, :cond_0
|
|
|
|
.line 217
|
|
iget-object v2, p0, Lokio/RealBufferedSource;->buffer:Lokio/Buffer;
|
|
|
|
invoke-virtual {v2, v0, v1}, Lokio/Buffer;->readUtf8Line(J)Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
return-object v0
|
|
|
|
.line 212
|
|
:cond_0
|
|
new-instance v0, Lokio/Buffer;
|
|
|
|
invoke-direct {v0}, Lokio/Buffer;-><init>()V
|
|
|
|
.line 213
|
|
iget-object v1, p0, Lokio/RealBufferedSource;->buffer:Lokio/Buffer;
|
|
|
|
const-wide/16 v3, 0x0
|
|
|
|
const-wide/16 v5, 0x20
|
|
|
|
iget-object v2, p0, Lokio/RealBufferedSource;->buffer:Lokio/Buffer;
|
|
|
|
invoke-virtual {v2}, Lokio/Buffer;->size()J
|
|
|
|
move-result-wide v7
|
|
|
|
invoke-static {v5, v6, v7, v8}, Ljava/lang/Math;->min(JJ)J
|
|
|
|
move-result-wide v5
|
|
|
|
move-object v2, v0
|
|
|
|
invoke-virtual/range {v1 .. v6}, Lokio/Buffer;->copyTo(Lokio/Buffer;JJ)Lokio/Buffer;
|
|
|
|
.line 214
|
|
new-instance v1, Ljava/io/EOFException;
|
|
|
|
new-instance v2, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v3, "\\n not found: size="
|
|
|
|
invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
iget-object v3, p0, Lokio/RealBufferedSource;->buffer:Lokio/Buffer;
|
|
|
|
invoke-virtual {v3}, Lokio/Buffer;->size()J
|
|
|
|
move-result-wide v3
|
|
|
|
invoke-virtual {v2, v3, v4}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;
|
|
|
|
const-string v3, " content="
|
|
|
|
invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
.line 215
|
|
invoke-virtual {v0}, Lokio/Buffer;->readByteString()Lokio/ByteString;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Lokio/ByteString;->hex()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v2, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
const-string v0, "\u2026"
|
|
|
|
invoke-virtual {v2, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-direct {v1, v0}, Ljava/io/EOFException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw v1
|
|
.end method
|
|
|
|
.method public request(J)Z
|
|
.locals 5
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
const-wide/16 v0, 0x0
|
|
|
|
cmp-long v2, p1, v0
|
|
|
|
if-ltz v2, :cond_3
|
|
|
|
.line 64
|
|
iget-boolean v0, p0, Lokio/RealBufferedSource;->closed:Z
|
|
|
|
if-nez v0, :cond_2
|
|
|
|
.line 65
|
|
:cond_0
|
|
iget-object v0, p0, Lokio/RealBufferedSource;->buffer:Lokio/Buffer;
|
|
|
|
iget-wide v0, v0, Lokio/Buffer;->size:J
|
|
|
|
cmp-long v2, v0, p1
|
|
|
|
if-gez v2, :cond_1
|
|
|
|
.line 66
|
|
iget-object v0, p0, Lokio/RealBufferedSource;->source:Lokio/Source;
|
|
|
|
iget-object v1, p0, Lokio/RealBufferedSource;->buffer:Lokio/Buffer;
|
|
|
|
const-wide/16 v2, 0x2000
|
|
|
|
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_0
|
|
|
|
const/4 p1, 0x0
|
|
|
|
return p1
|
|
|
|
:cond_1
|
|
const/4 p1, 0x1
|
|
|
|
return p1
|
|
|
|
.line 64
|
|
:cond_2
|
|
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 63
|
|
:cond_3
|
|
new-instance v0, Ljava/lang/IllegalArgumentException;
|
|
|
|
new-instance v1, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v2, "byteCount < 0: "
|
|
|
|
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v1, p1, p2}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-direct {v0, p1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
.end method
|
|
|
|
.method public require(J)V
|
|
.locals 0
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
.line 59
|
|
invoke-virtual {p0, p1, p2}, Lokio/RealBufferedSource;->request(J)Z
|
|
|
|
move-result p1
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
new-instance p1, Ljava/io/EOFException;
|
|
|
|
invoke-direct {p1}, Ljava/io/EOFException;-><init>()V
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method public select(Lokio/Options;)I
|
|
.locals 7
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
.line 87
|
|
iget-boolean v0, p0, Lokio/RealBufferedSource;->closed:Z
|
|
|
|
if-nez v0, :cond_3
|
|
|
|
.line 90
|
|
:cond_0
|
|
iget-object v0, p0, Lokio/RealBufferedSource;->buffer:Lokio/Buffer;
|
|
|
|
invoke-virtual {v0, p1}, Lokio/Buffer;->selectPrefix(Lokio/Options;)I
|
|
|
|
move-result v0
|
|
|
|
const/4 v1, -0x1
|
|
|
|
if-ne v0, v1, :cond_1
|
|
|
|
return v1
|
|
|
|
.line 94
|
|
:cond_1
|
|
iget-object v2, p1, Lokio/Options;->byteStrings:[Lokio/ByteString;
|
|
|
|
aget-object v2, v2, v0
|
|
|
|
invoke-virtual {v2}, Lokio/ByteString;->size()I
|
|
|
|
move-result v2
|
|
|
|
int-to-long v2, v2
|
|
|
|
.line 95
|
|
iget-object v4, p0, Lokio/RealBufferedSource;->buffer:Lokio/Buffer;
|
|
|
|
iget-wide v4, v4, Lokio/Buffer;->size:J
|
|
|
|
cmp-long v6, v2, v4
|
|
|
|
if-gtz v6, :cond_2
|
|
|
|
.line 96
|
|
iget-object p1, p0, Lokio/RealBufferedSource;->buffer:Lokio/Buffer;
|
|
|
|
invoke-virtual {p1, v2, v3}, Lokio/Buffer;->skip(J)V
|
|
|
|
return v0
|
|
|
|
.line 101
|
|
:cond_2
|
|
iget-object v0, p0, Lokio/RealBufferedSource;->source:Lokio/Source;
|
|
|
|
iget-object v2, p0, Lokio/RealBufferedSource;->buffer:Lokio/Buffer;
|
|
|
|
const-wide/16 v3, 0x2000
|
|
|
|
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_0
|
|
|
|
return v1
|
|
|
|
.line 87
|
|
:cond_3
|
|
new-instance p1, Ljava/lang/IllegalStateException;
|
|
|
|
const-string v0, "closed"
|
|
|
|
invoke-direct {p1, v0}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method public skip(J)V
|
|
.locals 5
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
.line 302
|
|
iget-boolean v0, p0, Lokio/RealBufferedSource;->closed:Z
|
|
|
|
if-nez v0, :cond_3
|
|
|
|
:goto_0
|
|
const-wide/16 v0, 0x0
|
|
|
|
cmp-long v2, p1, v0
|
|
|
|
if-lez v2, :cond_2
|
|
|
|
.line 304
|
|
iget-object v2, p0, Lokio/RealBufferedSource;->buffer:Lokio/Buffer;
|
|
|
|
iget-wide v2, v2, Lokio/Buffer;->size:J
|
|
|
|
cmp-long v4, v2, v0
|
|
|
|
if-nez v4, :cond_1
|
|
|
|
iget-object v0, p0, Lokio/RealBufferedSource;->source:Lokio/Source;
|
|
|
|
iget-object v1, p0, Lokio/RealBufferedSource;->buffer:Lokio/Buffer;
|
|
|
|
const-wide/16 v2, 0x2000
|
|
|
|
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_0
|
|
|
|
goto :goto_1
|
|
|
|
.line 305
|
|
:cond_0
|
|
new-instance p1, Ljava/io/EOFException;
|
|
|
|
invoke-direct {p1}, Ljava/io/EOFException;-><init>()V
|
|
|
|
throw p1
|
|
|
|
.line 307
|
|
:cond_1
|
|
:goto_1
|
|
iget-object v0, p0, Lokio/RealBufferedSource;->buffer:Lokio/Buffer;
|
|
|
|
invoke-virtual {v0}, Lokio/Buffer;->size()J
|
|
|
|
move-result-wide v0
|
|
|
|
invoke-static {p1, p2, v0, v1}, Ljava/lang/Math;->min(JJ)J
|
|
|
|
move-result-wide v0
|
|
|
|
.line 308
|
|
iget-object v2, p0, Lokio/RealBufferedSource;->buffer:Lokio/Buffer;
|
|
|
|
invoke-virtual {v2, v0, v1}, Lokio/Buffer;->skip(J)V
|
|
|
|
sub-long/2addr p1, v0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_2
|
|
return-void
|
|
|
|
.line 302
|
|
:cond_3
|
|
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
|
|
|
|
.method public timeout()Lokio/Timeout;
|
|
.locals 1
|
|
|
|
.line 439
|
|
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;
|
|
.locals 2
|
|
|
|
.line 443
|
|
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-string v1, ")"
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
return-object v0
|
|
.end method
|