2022-06-10 21:38:30 +09:00

185 lines
4.4 KiB
Smali

.class public final Lokhttp3/internal/cache2/FileOperator;
.super Ljava/lang/Object;
.source "FileOperator.kt"
# annotations
.annotation runtime Lkotlin/Metadata;
bv = {}
d1 = {
"\u0000&\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\u0010\t\n\u0000\n\u0002\u0018\u0002\n\u0002\u0008\u0002\n\u0002\u0018\u0002\n\u0002\u0008\u0003\n\u0002\u0018\u0002\n\u0002\u0008\u0005\u0008\u0000\u0018\u00002\u00020\u0001B\u000f\u0012\u0006\u0010\u000c\u001a\u00020\u000b\u00a2\u0006\u0004\u0008\u000e\u0010\u000fJ\u001e\u0010\u0008\u001a\u00020\u00072\u0006\u0010\u0003\u001a\u00020\u00022\u0006\u0010\u0005\u001a\u00020\u00042\u0006\u0010\u0006\u001a\u00020\u0002J\u001e\u0010\n\u001a\u00020\u00072\u0006\u0010\u0003\u001a\u00020\u00022\u0006\u0010\t\u001a\u00020\u00042\u0006\u0010\u0006\u001a\u00020\u0002R\u0014\u0010\u000c\u001a\u00020\u000b8\u0002X\u0082\u0004\u00a2\u0006\u0006\n\u0004\u0008\u000c\u0010\r\u00a8\u0006\u0010"
}
d2 = {
"Lokhttp3/internal/cache2/FileOperator;",
"",
"",
"pos",
"Lzj/m;",
"source",
"byteCount",
"Lkotlin/d1;",
"write",
"sink",
"read",
"Ljava/nio/channels/FileChannel;",
"fileChannel",
"Ljava/nio/channels/FileChannel;",
"<init>",
"(Ljava/nio/channels/FileChannel;)V",
"okhttp"
}
k = 0x1
mv = {
0x1,
0x4,
0x0
}
.end annotation
# instance fields
.field private final fileChannel:Ljava/nio/channels/FileChannel;
# direct methods
.method public constructor <init>(Ljava/nio/channels/FileChannel;)V
.locals 1
.param p1 # Ljava/nio/channels/FileChannel;
.annotation build Lorg/jetbrains/annotations/NotNull;
.end annotation
.end param
const-string v0, "fileChannel"
invoke-static {p1, v0}, Lkotlin/jvm/internal/f0;->p(Ljava/lang/Object;Ljava/lang/String;)V
.line 1
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
iput-object p1, p0, Lokhttp3/internal/cache2/FileOperator;->fileChannel:Ljava/nio/channels/FileChannel;
return-void
.end method
# virtual methods
.method public final read(JLzj/m;J)V
.locals 9
.param p3 # Lzj/m;
.annotation build Lorg/jetbrains/annotations/NotNull;
.end annotation
.end param
const-string v0, "sink"
invoke-static {p3, v0}, Lkotlin/jvm/internal/f0;->p(Ljava/lang/Object;Ljava/lang/String;)V
const-wide/16 v0, 0x0
cmp-long v2, p4, v0
if-ltz v2, :cond_1
:goto_0
cmp-long v2, p4, v0
if-lez v2, :cond_0
.line 1
iget-object v3, p0, Lokhttp3/internal/cache2/FileOperator;->fileChannel:Ljava/nio/channels/FileChannel;
move-wide v4, p1
move-wide v6, p4
move-object v8, p3
invoke-virtual/range {v3 .. v8}, Ljava/nio/channels/FileChannel;->transferTo(JJLjava/nio/channels/WritableByteChannel;)J
move-result-wide v2
add-long/2addr p1, v2
sub-long/2addr p4, v2
goto :goto_0
:cond_0
return-void
.line 2
:cond_1
new-instance p1, Ljava/lang/IndexOutOfBoundsException;
invoke-direct {p1}, Ljava/lang/IndexOutOfBoundsException;-><init>()V
throw p1
.end method
.method public final write(JLzj/m;J)V
.locals 9
.param p3 # Lzj/m;
.annotation build Lorg/jetbrains/annotations/NotNull;
.end annotation
.end param
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
const-string v0, "source"
invoke-static {p3, v0}, Lkotlin/jvm/internal/f0;->p(Ljava/lang/Object;Ljava/lang/String;)V
const-wide/16 v0, 0x0
cmp-long v2, p4, v0
if-ltz v2, :cond_1
.line 1
invoke-virtual {p3}, Lzj/m;->size()J
move-result-wide v2
cmp-long v2, p4, v2
if-gtz v2, :cond_1
:goto_0
cmp-long v2, p4, v0
if-lez v2, :cond_0
.line 2
iget-object v3, p0, Lokhttp3/internal/cache2/FileOperator;->fileChannel:Ljava/nio/channels/FileChannel;
move-object v4, p3
move-wide v5, p1
move-wide v7, p4
invoke-virtual/range {v3 .. v8}, Ljava/nio/channels/FileChannel;->transferFrom(Ljava/nio/channels/ReadableByteChannel;JJ)J
move-result-wide v2
add-long/2addr p1, v2
sub-long/2addr p4, v2
goto :goto_0
:cond_0
return-void
.line 3
:cond_1
new-instance p1, Ljava/lang/IndexOutOfBoundsException;
invoke-direct {p1}, Ljava/lang/IndexOutOfBoundsException;-><init>()V
throw p1
.end method