Rabbit-R1/switch port/smali/smali_classes3/kotlin/io/FilesKt__FileReadWriteKt.smali

1577 lines
44 KiB
Smali
Raw Normal View History

2024-05-21 16:08:36 -05:00
.class Lkotlin/io/FilesKt__FileReadWriteKt;
.super Lkotlin/io/FilesKt__FilePathComponentsKt;
.source "FileReadWrite.kt"
# annotations
.annotation system Ldalvik/annotation/SourceDebugExtension;
value = "SMAP\nFileReadWrite.kt\nKotlin\n*S Kotlin\n*F\n+ 1 FileReadWrite.kt\nkotlin/io/FilesKt__FileReadWriteKt\n+ 2 fake.kt\nkotlin/jvm/internal/FakeKt\n*L\n1#1,232:1\n1#2:233\n*E\n"
.end annotation
.annotation runtime Lkotlin/Metadata;
d1 = {
"\u0000z\n\u0000\n\u0002\u0010\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0012\n\u0002\u0008\u0002\n\u0002\u0010\u000e\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0008\n\u0000\n\u0002\u0018\u0002\n\u0002\u0008\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0008\u0005\n\u0002\u0018\u0002\n\u0002\u0008\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0008\u0002\n\u0002\u0010 \n\u0002\u0008\u0002\n\u0002\u0018\u0002\n\u0002\u0008\u0003\n\u0002\u0018\u0002\n\u0002\u0008\u0004\n\u0002\u0018\u0002\n\u0000\u001a\u0012\u0010\u0000\u001a\u00020\u0001*\u00020\u00022\u0006\u0010\u0003\u001a\u00020\u0004\u001a\u001c\u0010\u0005\u001a\u00020\u0001*\u00020\u00022\u0006\u0010\u0006\u001a\u00020\u00072\u0008\u0008\u0002\u0010\u0008\u001a\u00020\t\u001a!\u0010\n\u001a\u00020\u000b*\u00020\u00022\u0008\u0008\u0002\u0010\u0008\u001a\u00020\t2\u0008\u0008\u0002\u0010\u000c\u001a\u00020\rH\u0087\u0008\u001a!\u0010\u000e\u001a\u00020\u000f*\u00020\u00022\u0008\u0008\u0002\u0010\u0008\u001a\u00020\t2\u0008\u0008\u0002\u0010\u000c\u001a\u00020\rH\u0087\u0008\u001aB\u0010\u0010\u001a\u00020\u0001*\u00020\u000226\u0010\u0011\u001a2\u0012\u0013\u0012\u00110\u0004\u00a2\u0006\u000c\u0008\u0013\u0012\u0008\u0008\u0014\u0012\u0004\u0008\u0008(\u0015\u0012\u0013\u0012\u00110\r\u00a2\u0006\u000c\u0008\u0013\u0012\u0008\u0008\u0014\u0012\u0004\u0008\u0008(\u0016\u0012\u0004\u0012\u00020\u00010\u0012\u001aJ\u0010\u0010\u001a\u00020\u0001*\u00020\u00022\u0006\u0010\u0017\u001a\u00020\r26\u0010\u0011\u001a2\u0012\u0013\u0012\u00110\u0004\u00a2\u0006\u000c\u0008\u0013\u0012\u0008\u0008\u0014\u0012\u0004\u0008\u0008(\u0015\u0012\u0013\u0012\u00110\r\u00a2\u0006\u000c\u0008\u0013\u0012\u0008\u0008\u0014\u0012\u0004\u0008\u0008(\u0016\u0012\u0004\u0012\u00020\u00010\u0012\u001a7\u0010\u0018\u001a\u00020\u0001*\u00020\u00022\u0008\u0008\u0002\u0010\u0008\u001a\u00020\t2!\u0010\u0011\u001a\u001d\u0012\u0013\u0012\u00110\u0007\u00a2\u0006\u000c\u0008\u0013\u0012\u0008\u0008\u0014\u0012\u0004\u0008\u0008(\u001a\u0012\u0004\u0012\u00020\u00010\u0019\u001a\r\u0010\u001b\u001a\u00020\u001c*\u00020\u0002H\u0087\u0008\u001a\r\u0010\u001d\u001a\u00020\u001e*\u00020\u0002H\u0087\u0008\u001a\u0017\u0010\u001f\u001a\u00020 *\u00020\u00022\u0008\u0008\u0002\u0010\u0008\u001a\u00020\tH\u0087\u0008\u001a\n\u0010!\u001a\u00020\u0004*\u00020\u0002\u001a\u001a\u0010\"\u001a\u0008\u0012\u0004\u0012\u00020\u00070#*\u00020\u00022\u0008\u0008\u0002\u0010\u0008\u001a\u00020\t\u001a\u0014\u0010$\u001a\u00020\u0007*\u00020\u00022\u0008\u0008\u0002\u0010\u0008\u001a\u00020\t\u001a\u0017\u0010%\u001a\u00020&*\u00020\u00022\u0008\u0008\u0002\u0010\u0008\u001a\u00020\tH\u0087\u0008\u001a?\u0010\'\u001a\u0002H(\"\u0004\u0008\u0000\u0010(*\u00020\u00022\u0008\u0008\u0002\u0010\u0008\u001a\u00020\t2\u0018\u0010)\u001a\u0014\u0012\n\u0012\u0008\u0012\u0004\u0012\u00020\u00070*\u0012\u0004\u0012\u0002H(0\u0019H\u0086\u0008\u00f8\u0001\u0000\u00a2\u0006\u0002\u0010+\u001a\u0012\u0010,\u001a\u00020\u0001*\u00020\u00022\u0006\u0010\u0003\u001a\u00020\u0004\u001a\u001c\u0010-\u001a\u00020\u0001*\u00020\u00022\u0006\u0010\u0006\u001a\u00020\u00072\u0008\u0008\u0002\u0010\u0008\u001a\u00020\t\u001a\u0017\u0010.\u001a\u00020/*\u00020\u00022\u0008\u0008\u0002\u0010\u0008\u001a\u00020\tH\u0087\u0008\u0082\u0002\u0007\n\u0005\u0008\u009920\u0001\u00a8\u00060"
}
d2 = {
"appendBytes",
"",
"Ljava/io/File;",
"array",
"",
"appendText",
"text",
"",
"charset",
"Ljava/nio/charset/Charset;",
"bufferedReader",
"Ljava/io/BufferedReader;",
"bufferSize",
"",
"bufferedWriter",
"Ljava/io/BufferedWriter;",
"forEachBlock",
"action",
"Lkotlin/Function2;",
"Lkotlin/ParameterName;",
"name",
"buffer",
"bytesRead",
"blockSize",
"forEachLine",
"Lkotlin/Function1;",
"line",
"inputStream",
"Ljava/io/FileInputStream;",
"outputStream",
"Ljava/io/FileOutputStream;",
"printWriter",
"Ljava/io/PrintWriter;",
"readBytes",
"readLines",
"",
"readText",
"reader",
"Ljava/io/InputStreamReader;",
"useLines",
"T",
"block",
"Lkotlin/sequences/Sequence;",
"(Ljava/io/File;Ljava/nio/charset/Charset;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;",
"writeBytes",
"writeText",
"writer",
"Ljava/io/OutputStreamWriter;",
"kotlin-stdlib"
}
k = 0x5
mv = {
0x1,
0x9,
0x0
}
xi = 0x31
xs = "kotlin/io/FilesKt"
.end annotation
# direct methods
.method public constructor <init>()V
.locals 0
invoke-direct {p0}, Lkotlin/io/FilesKt__FilePathComponentsKt;-><init>()V
return-void
.end method
.method public static final appendBytes(Ljava/io/File;[B)V
.locals 2
const-string v0, "<this>"
invoke-static {p0, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
const-string v0, "array"
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
.line 115
new-instance v0, Ljava/io/FileOutputStream;
const/4 v1, 0x1
invoke-direct {v0, p0, v1}, Ljava/io/FileOutputStream;-><init>(Ljava/io/File;Z)V
check-cast v0, Ljava/io/Closeable;
:try_start_0
move-object p0, v0
check-cast p0, Ljava/io/FileOutputStream;
invoke-virtual {p0, p1}, Ljava/io/FileOutputStream;->write([B)V
sget-object p0, Lkotlin/Unit;->INSTANCE:Lkotlin/Unit;
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
const/4 p0, 0x0
invoke-static {v0, p0}, Lkotlin/io/CloseableKt;->closeFinally(Ljava/io/Closeable;Ljava/lang/Throwable;)V
return-void
:catchall_0
move-exception p0
:try_start_1
throw p0
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_1
:catchall_1
move-exception p1
invoke-static {v0, p0}, Lkotlin/io/CloseableKt;->closeFinally(Ljava/io/Closeable;Ljava/lang/Throwable;)V
throw p1
.end method
.method public static final appendText(Ljava/io/File;Ljava/lang/String;Ljava/nio/charset/Charset;)V
.locals 1
const-string v0, "<this>"
invoke-static {p0, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
const-string v0, "text"
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
const-string v0, "charset"
invoke-static {p2, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
.line 142
invoke-virtual {p1, p2}, Ljava/lang/String;->getBytes(Ljava/nio/charset/Charset;)[B
move-result-object p1
const-string p2, "getBytes(...)"
invoke-static {p1, p2}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
invoke-static {p0, p1}, Lkotlin/io/FilesKt;->appendBytes(Ljava/io/File;[B)V
return-void
.end method
.method public static synthetic appendText$default(Ljava/io/File;Ljava/lang/String;Ljava/nio/charset/Charset;ILjava/lang/Object;)V
.locals 0
and-int/lit8 p3, p3, 0x2
if-eqz p3, :cond_0
.line 142
sget-object p2, Lkotlin/text/Charsets;->UTF_8:Ljava/nio/charset/Charset;
:cond_0
invoke-static {p0, p1, p2}, Lkotlin/io/FilesKt;->appendText(Ljava/io/File;Ljava/lang/String;Ljava/nio/charset/Charset;)V
return-void
.end method
.method private static final bufferedReader(Ljava/io/File;Ljava/nio/charset/Charset;I)Ljava/io/BufferedReader;
.locals 2
const-string v0, "<this>"
invoke-static {p0, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
const-string v0, "charset"
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
.line 31
new-instance v0, Ljava/io/InputStreamReader;
new-instance v1, Ljava/io/FileInputStream;
invoke-direct {v1, p0}, Ljava/io/FileInputStream;-><init>(Ljava/io/File;)V
check-cast v1, Ljava/io/InputStream;
invoke-direct {v0, v1, p1}, Ljava/io/InputStreamReader;-><init>(Ljava/io/InputStream;Ljava/nio/charset/Charset;)V
check-cast v0, Ljava/io/Reader;
instance-of p0, v0, Ljava/io/BufferedReader;
if-eqz p0, :cond_0
check-cast v0, Ljava/io/BufferedReader;
goto :goto_0
:cond_0
new-instance p0, Ljava/io/BufferedReader;
invoke-direct {p0, v0, p2}, Ljava/io/BufferedReader;-><init>(Ljava/io/Reader;I)V
move-object v0, p0
:goto_0
return-object v0
.end method
.method static synthetic bufferedReader$default(Ljava/io/File;Ljava/nio/charset/Charset;IILjava/lang/Object;)Ljava/io/BufferedReader;
.locals 0
and-int/lit8 p4, p3, 0x1
if-eqz p4, :cond_0
.line 30
sget-object p1, Lkotlin/text/Charsets;->UTF_8:Ljava/nio/charset/Charset;
:cond_0
and-int/lit8 p3, p3, 0x2
if-eqz p3, :cond_1
const/16 p2, 0x2000
:cond_1
const-string p3, "<this>"
invoke-static {p0, p3}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
const-string p3, "charset"
invoke-static {p1, p3}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
.line 31
new-instance p3, Ljava/io/InputStreamReader;
new-instance p4, Ljava/io/FileInputStream;
invoke-direct {p4, p0}, Ljava/io/FileInputStream;-><init>(Ljava/io/File;)V
check-cast p4, Ljava/io/InputStream;
invoke-direct {p3, p4, p1}, Ljava/io/InputStreamReader;-><init>(Ljava/io/InputStream;Ljava/nio/charset/Charset;)V
check-cast p3, Ljava/io/Reader;
instance-of p0, p3, Ljava/io/BufferedReader;
if-eqz p0, :cond_2
check-cast p3, Ljava/io/BufferedReader;
goto :goto_0
:cond_2
new-instance p0, Ljava/io/BufferedReader;
invoke-direct {p0, p3, p2}, Ljava/io/BufferedReader;-><init>(Ljava/io/Reader;I)V
move-object p3, p0
:goto_0
return-object p3
.end method
.method private static final bufferedWriter(Ljava/io/File;Ljava/nio/charset/Charset;I)Ljava/io/BufferedWriter;
.locals 2
const-string v0, "<this>"
invoke-static {p0, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
const-string v0, "charset"
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
.line 47
new-instance v0, Ljava/io/OutputStreamWriter;
new-instance v1, Ljava/io/FileOutputStream;
invoke-direct {v1, p0}, Ljava/io/FileOutputStream;-><init>(Ljava/io/File;)V
check-cast v1, Ljava/io/OutputStream;
invoke-direct {v0, v1, p1}, Ljava/io/OutputStreamWriter;-><init>(Ljava/io/OutputStream;Ljava/nio/charset/Charset;)V
check-cast v0, Ljava/io/Writer;
instance-of p0, v0, Ljava/io/BufferedWriter;
if-eqz p0, :cond_0
check-cast v0, Ljava/io/BufferedWriter;
goto :goto_0
:cond_0
new-instance p0, Ljava/io/BufferedWriter;
invoke-direct {p0, v0, p2}, Ljava/io/BufferedWriter;-><init>(Ljava/io/Writer;I)V
move-object v0, p0
:goto_0
return-object v0
.end method
.method static synthetic bufferedWriter$default(Ljava/io/File;Ljava/nio/charset/Charset;IILjava/lang/Object;)Ljava/io/BufferedWriter;
.locals 0
and-int/lit8 p4, p3, 0x1
if-eqz p4, :cond_0
.line 46
sget-object p1, Lkotlin/text/Charsets;->UTF_8:Ljava/nio/charset/Charset;
:cond_0
and-int/lit8 p3, p3, 0x2
if-eqz p3, :cond_1
const/16 p2, 0x2000
:cond_1
const-string p3, "<this>"
invoke-static {p0, p3}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
const-string p3, "charset"
invoke-static {p1, p3}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
.line 47
new-instance p3, Ljava/io/OutputStreamWriter;
new-instance p4, Ljava/io/FileOutputStream;
invoke-direct {p4, p0}, Ljava/io/FileOutputStream;-><init>(Ljava/io/File;)V
check-cast p4, Ljava/io/OutputStream;
invoke-direct {p3, p4, p1}, Ljava/io/OutputStreamWriter;-><init>(Ljava/io/OutputStream;Ljava/nio/charset/Charset;)V
check-cast p3, Ljava/io/Writer;
instance-of p0, p3, Ljava/io/BufferedWriter;
if-eqz p0, :cond_2
check-cast p3, Ljava/io/BufferedWriter;
goto :goto_0
:cond_2
new-instance p0, Ljava/io/BufferedWriter;
invoke-direct {p0, p3, p2}, Ljava/io/BufferedWriter;-><init>(Ljava/io/Writer;I)V
move-object p3, p0
:goto_0
return-object p3
.end method
.method public static final forEachBlock(Ljava/io/File;ILkotlin/jvm/functions/Function2;)V
.locals 2
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/io/File;",
"I",
"Lkotlin/jvm/functions/Function2<",
"-[B-",
"Ljava/lang/Integer;",
"Lkotlin/Unit;",
">;)V"
}
.end annotation
const-string v0, "<this>"
invoke-static {p0, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
const-string v0, "action"
invoke-static {p2, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
const/16 v0, 0x200
.line 165
invoke-static {p1, v0}, Lkotlin/ranges/RangesKt;->coerceAtLeast(II)I
move-result p1
new-array p1, p1, [B
new-instance v0, Ljava/io/FileInputStream;
.line 167
invoke-direct {v0, p0}, Ljava/io/FileInputStream;-><init>(Ljava/io/File;)V
check-cast v0, Ljava/io/Closeable;
:try_start_0
move-object p0, v0
check-cast p0, Ljava/io/FileInputStream;
.line 169
:goto_0
invoke-virtual {p0, p1}, Ljava/io/FileInputStream;->read([B)I
move-result v1
if-gtz v1, :cond_0
.line 176
sget-object p0, Lkotlin/Unit;->INSTANCE:Lkotlin/Unit;
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
const/4 p0, 0x0
.line 167
invoke-static {v0, p0}, Lkotlin/io/CloseableKt;->closeFinally(Ljava/io/Closeable;Ljava/lang/Throwable;)V
return-void
.line 173
:cond_0
:try_start_1
invoke-static {v1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v1
invoke-interface {p2, p1, v1}, Lkotlin/jvm/functions/Function2;->invoke(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
goto :goto_0
:catchall_0
move-exception p0
.line 167
:try_start_2
throw p0
:try_end_2
.catchall {:try_start_2 .. :try_end_2} :catchall_1
:catchall_1
move-exception p1
invoke-static {v0, p0}, Lkotlin/io/CloseableKt;->closeFinally(Ljava/io/Closeable;Ljava/lang/Throwable;)V
throw p1
.end method
.method public static final forEachBlock(Ljava/io/File;Lkotlin/jvm/functions/Function2;)V
.locals 1
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/io/File;",
"Lkotlin/jvm/functions/Function2<",
"-[B-",
"Ljava/lang/Integer;",
"Lkotlin/Unit;",
">;)V"
}
.end annotation
const-string v0, "<this>"
invoke-static {p0, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
const-string v0, "action"
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
const/16 v0, 0x1000
.line 153
invoke-static {p0, v0, p1}, Lkotlin/io/FilesKt;->forEachBlock(Ljava/io/File;ILkotlin/jvm/functions/Function2;)V
return-void
.end method
.method public static final forEachLine(Ljava/io/File;Ljava/nio/charset/Charset;Lkotlin/jvm/functions/Function1;)V
.locals 3
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/io/File;",
"Ljava/nio/charset/Charset;",
"Lkotlin/jvm/functions/Function1<",
"-",
"Ljava/lang/String;",
"Lkotlin/Unit;",
">;)V"
}
.end annotation
const-string v0, "<this>"
invoke-static {p0, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
const-string v0, "charset"
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
const-string v0, "action"
invoke-static {p2, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
.line 190
new-instance v0, Ljava/io/BufferedReader;
new-instance v1, Ljava/io/InputStreamReader;
new-instance v2, Ljava/io/FileInputStream;
invoke-direct {v2, p0}, Ljava/io/FileInputStream;-><init>(Ljava/io/File;)V
check-cast v2, Ljava/io/InputStream;
invoke-direct {v1, v2, p1}, Ljava/io/InputStreamReader;-><init>(Ljava/io/InputStream;Ljava/nio/charset/Charset;)V
check-cast v1, Ljava/io/Reader;
invoke-direct {v0, v1}, Ljava/io/BufferedReader;-><init>(Ljava/io/Reader;)V
check-cast v0, Ljava/io/Reader;
invoke-static {v0, p2}, Lkotlin/io/TextStreamsKt;->forEachLine(Ljava/io/Reader;Lkotlin/jvm/functions/Function1;)V
return-void
.end method
.method public static synthetic forEachLine$default(Ljava/io/File;Ljava/nio/charset/Charset;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)V
.locals 0
and-int/lit8 p3, p3, 0x1
if-eqz p3, :cond_0
.line 188
sget-object p1, Lkotlin/text/Charsets;->UTF_8:Ljava/nio/charset/Charset;
:cond_0
invoke-static {p0, p1, p2}, Lkotlin/io/FilesKt;->forEachLine(Ljava/io/File;Ljava/nio/charset/Charset;Lkotlin/jvm/functions/Function1;)V
return-void
.end method
.method private static final inputStream(Ljava/io/File;)Ljava/io/FileInputStream;
.locals 1
const-string v0, "<this>"
invoke-static {p0, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
.line 198
new-instance v0, Ljava/io/FileInputStream;
invoke-direct {v0, p0}, Ljava/io/FileInputStream;-><init>(Ljava/io/File;)V
return-object v0
.end method
.method private static final outputStream(Ljava/io/File;)Ljava/io/FileOutputStream;
.locals 1
const-string v0, "<this>"
invoke-static {p0, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
.line 206
new-instance v0, Ljava/io/FileOutputStream;
invoke-direct {v0, p0}, Ljava/io/FileOutputStream;-><init>(Ljava/io/File;)V
return-object v0
.end method
.method private static final printWriter(Ljava/io/File;Ljava/nio/charset/Charset;)Ljava/io/PrintWriter;
.locals 3
const-string v0, "<this>"
invoke-static {p0, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
const-string v0, "charset"
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
.line 54
new-instance v0, Ljava/io/PrintWriter;
new-instance v1, Ljava/io/OutputStreamWriter;
new-instance v2, Ljava/io/FileOutputStream;
invoke-direct {v2, p0}, Ljava/io/FileOutputStream;-><init>(Ljava/io/File;)V
check-cast v2, Ljava/io/OutputStream;
invoke-direct {v1, v2, p1}, Ljava/io/OutputStreamWriter;-><init>(Ljava/io/OutputStream;Ljava/nio/charset/Charset;)V
check-cast v1, Ljava/io/Writer;
instance-of p0, v1, Ljava/io/BufferedWriter;
if-eqz p0, :cond_0
check-cast v1, Ljava/io/BufferedWriter;
goto :goto_0
:cond_0
new-instance p0, Ljava/io/BufferedWriter;
const/16 p1, 0x2000
invoke-direct {p0, v1, p1}, Ljava/io/BufferedWriter;-><init>(Ljava/io/Writer;I)V
move-object v1, p0
:goto_0
check-cast v1, Ljava/io/Writer;
invoke-direct {v0, v1}, Ljava/io/PrintWriter;-><init>(Ljava/io/Writer;)V
return-object v0
.end method
.method static synthetic printWriter$default(Ljava/io/File;Ljava/nio/charset/Charset;ILjava/lang/Object;)Ljava/io/PrintWriter;
.locals 1
and-int/lit8 p2, p2, 0x1
if-eqz p2, :cond_0
.line 53
sget-object p1, Lkotlin/text/Charsets;->UTF_8:Ljava/nio/charset/Charset;
:cond_0
const-string p2, "<this>"
invoke-static {p0, p2}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
const-string p2, "charset"
invoke-static {p1, p2}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
.line 54
new-instance p2, Ljava/io/PrintWriter;
new-instance p3, Ljava/io/OutputStreamWriter;
new-instance v0, Ljava/io/FileOutputStream;
invoke-direct {v0, p0}, Ljava/io/FileOutputStream;-><init>(Ljava/io/File;)V
check-cast v0, Ljava/io/OutputStream;
invoke-direct {p3, v0, p1}, Ljava/io/OutputStreamWriter;-><init>(Ljava/io/OutputStream;Ljava/nio/charset/Charset;)V
check-cast p3, Ljava/io/Writer;
instance-of p0, p3, Ljava/io/BufferedWriter;
if-eqz p0, :cond_1
check-cast p3, Ljava/io/BufferedWriter;
goto :goto_0
:cond_1
new-instance p0, Ljava/io/BufferedWriter;
const/16 p1, 0x2000
invoke-direct {p0, p3, p1}, Ljava/io/BufferedWriter;-><init>(Ljava/io/Writer;I)V
move-object p3, p0
:goto_0
check-cast p3, Ljava/io/Writer;
invoke-direct {p2, p3}, Ljava/io/PrintWriter;-><init>(Ljava/io/Writer;)V
return-object p2
.end method
.method public static final readBytes(Ljava/io/File;)[B
.locals 11
const-string v0, "<this>"
invoke-static {p0, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
new-instance v0, Ljava/io/FileInputStream;
.line 63
invoke-direct {v0, p0}, Ljava/io/FileInputStream;-><init>(Ljava/io/File;)V
check-cast v0, Ljava/io/Closeable;
:try_start_0
move-object v1, v0
check-cast v1, Ljava/io/FileInputStream;
.line 65
invoke-virtual {p0}, Ljava/io/File;->length()J
move-result-wide v2
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
const-wide/32 v4, 0x7fffffff
cmp-long v4, v2, v4
const-string v5, "File "
if-gtz v4, :cond_4
long-to-int v2, v2
.line 68
:try_start_1
new-array v3, v2, [B
const/4 v4, 0x0
move v6, v2
move v7, v4
:goto_0
if-lez v6, :cond_0
.line 70
invoke-virtual {v1, v3, v7, v6}, Ljava/io/FileInputStream;->read([BII)I
move-result v8
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
if-ltz v8, :cond_0
sub-int/2addr v6, v8
add-int/2addr v7, v8
goto :goto_0
:cond_0
const-string v8, "copyOf(...)"
const/4 v9, 0x0
if-lez v6, :cond_1
.line 75
:try_start_2
invoke-static {v3, v7}, Ljava/util/Arrays;->copyOf([BI)[B
move-result-object v3
invoke-static {v3, v8}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
goto :goto_1
.line 77
:cond_1
invoke-virtual {v1}, Ljava/io/FileInputStream;->read()I
move-result v6
const/4 v7, -0x1
if-ne v6, v7, :cond_2
goto :goto_1
.line 84
:cond_2
new-instance v7, Lkotlin/io/ExposingBufferByteArrayOutputStream;
const/16 v10, 0x2001
invoke-direct {v7, v10}, Lkotlin/io/ExposingBufferByteArrayOutputStream;-><init>(I)V
.line 85
invoke-virtual {v7, v6}, Lkotlin/io/ExposingBufferByteArrayOutputStream;->write(I)V
.line 86
check-cast v1, Ljava/io/InputStream;
move-object v6, v7
check-cast v6, Ljava/io/OutputStream;
const/4 v10, 0x2
invoke-static {v1, v6, v4, v10, v9}, Lkotlin/io/ByteStreamsKt;->copyTo$default(Ljava/io/InputStream;Ljava/io/OutputStream;IILjava/lang/Object;)J
.line 88
invoke-virtual {v7}, Lkotlin/io/ExposingBufferByteArrayOutputStream;->size()I
move-result v1
add-int/2addr v1, v2
if-ltz v1, :cond_3
.line 91
invoke-virtual {v7}, Lkotlin/io/ExposingBufferByteArrayOutputStream;->getBuffer()[B
move-result-object p0
.line 92
invoke-static {v3, v1}, Ljava/util/Arrays;->copyOf([BI)[B
move-result-object v1
invoke-static {v1, v8}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
.line 94
invoke-virtual {v7}, Lkotlin/io/ExposingBufferByteArrayOutputStream;->size()I
move-result v3
.line 91
invoke-static {p0, v1, v2, v4, v3}, Lkotlin/collections/ArraysKt;->copyInto([B[BIII)[B
move-result-object v3
:try_end_2
.catchall {:try_start_2 .. :try_end_2} :catchall_0
.line 63
:goto_1
invoke-static {v0, v9}, Lkotlin/io/CloseableKt;->closeFinally(Ljava/io/Closeable;Ljava/lang/Throwable;)V
return-object v3
.line 89
:cond_3
:try_start_3
new-instance v1, Ljava/lang/OutOfMemoryError;
new-instance v2, Ljava/lang/StringBuilder;
invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V
invoke-virtual {v2, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v2
invoke-virtual {v2, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
move-result-object p0
const-string v2, " is too big to fit in memory."
invoke-virtual {p0, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object p0
invoke-virtual {p0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p0
invoke-direct {v1, p0}, Ljava/lang/OutOfMemoryError;-><init>(Ljava/lang/String;)V
throw v1
.line 66
:cond_4
new-instance v1, Ljava/lang/OutOfMemoryError;
new-instance v4, Ljava/lang/StringBuilder;
invoke-direct {v4, v5}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
invoke-virtual {v4, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
move-result-object p0
const-string v4, " is too big ("
invoke-virtual {p0, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object p0
invoke-virtual {p0, v2, v3}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;
move-result-object p0
const-string v2, " bytes) to fit in memory."
invoke-virtual {p0, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object p0
invoke-virtual {p0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p0
invoke-direct {v1, p0}, Ljava/lang/OutOfMemoryError;-><init>(Ljava/lang/String;)V
throw v1
:try_end_3
.catchall {:try_start_3 .. :try_end_3} :catchall_0
:catchall_0
move-exception p0
.line 63
:try_start_4
throw p0
:try_end_4
.catchall {:try_start_4 .. :try_end_4} :catchall_1
:catchall_1
move-exception v1
invoke-static {v0, p0}, Lkotlin/io/CloseableKt;->closeFinally(Ljava/io/Closeable;Ljava/lang/Throwable;)V
throw v1
.end method
.method public static final readLines(Ljava/io/File;Ljava/nio/charset/Charset;)Ljava/util/List;
.locals 2
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/io/File;",
"Ljava/nio/charset/Charset;",
")",
"Ljava/util/List<",
"Ljava/lang/String;",
">;"
}
.end annotation
const-string v0, "<this>"
invoke-static {p0, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
const-string v0, "charset"
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
.line 218
new-instance v0, Ljava/util/ArrayList;
invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V
.line 219
new-instance v1, Lkotlin/io/FilesKt__FileReadWriteKt$readLines$1;
invoke-direct {v1, v0}, Lkotlin/io/FilesKt__FileReadWriteKt$readLines$1;-><init>(Ljava/util/ArrayList;)V
check-cast v1, Lkotlin/jvm/functions/Function1;
invoke-static {p0, p1, v1}, Lkotlin/io/FilesKt;->forEachLine(Ljava/io/File;Ljava/nio/charset/Charset;Lkotlin/jvm/functions/Function1;)V
.line 220
check-cast v0, Ljava/util/List;
return-object v0
.end method
.method public static synthetic readLines$default(Ljava/io/File;Ljava/nio/charset/Charset;ILjava/lang/Object;)Ljava/util/List;
.locals 0
and-int/lit8 p2, p2, 0x1
if-eqz p2, :cond_0
.line 217
sget-object p1, Lkotlin/text/Charsets;->UTF_8:Ljava/nio/charset/Charset;
:cond_0
invoke-static {p0, p1}, Lkotlin/io/FilesKt;->readLines(Ljava/io/File;Ljava/nio/charset/Charset;)Ljava/util/List;
move-result-object p0
return-object p0
.end method
.method public static final readText(Ljava/io/File;Ljava/nio/charset/Charset;)Ljava/lang/String;
.locals 2
const-string v0, "<this>"
invoke-static {p0, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
const-string v0, "charset"
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
.line 125
new-instance v0, Ljava/io/InputStreamReader;
new-instance v1, Ljava/io/FileInputStream;
invoke-direct {v1, p0}, Ljava/io/FileInputStream;-><init>(Ljava/io/File;)V
check-cast v1, Ljava/io/InputStream;
invoke-direct {v0, v1, p1}, Ljava/io/InputStreamReader;-><init>(Ljava/io/InputStream;Ljava/nio/charset/Charset;)V
check-cast v0, Ljava/io/Closeable;
:try_start_0
move-object p0, v0
check-cast p0, Ljava/io/InputStreamReader;
check-cast p0, Ljava/io/Reader;
invoke-static {p0}, Lkotlin/io/TextStreamsKt;->readText(Ljava/io/Reader;)Ljava/lang/String;
move-result-object p0
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
const/4 p1, 0x0
invoke-static {v0, p1}, Lkotlin/io/CloseableKt;->closeFinally(Ljava/io/Closeable;Ljava/lang/Throwable;)V
return-object p0
:catchall_0
move-exception p0
:try_start_1
throw p0
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_1
:catchall_1
move-exception p1
invoke-static {v0, p0}, Lkotlin/io/CloseableKt;->closeFinally(Ljava/io/Closeable;Ljava/lang/Throwable;)V
throw p1
.end method
.method public static synthetic readText$default(Ljava/io/File;Ljava/nio/charset/Charset;ILjava/lang/Object;)Ljava/lang/String;
.locals 0
and-int/lit8 p2, p2, 0x1
if-eqz p2, :cond_0
.line 125
sget-object p1, Lkotlin/text/Charsets;->UTF_8:Ljava/nio/charset/Charset;
:cond_0
invoke-static {p0, p1}, Lkotlin/io/FilesKt;->readText(Ljava/io/File;Ljava/nio/charset/Charset;)Ljava/lang/String;
move-result-object p0
return-object p0
.end method
.method private static final reader(Ljava/io/File;Ljava/nio/charset/Charset;)Ljava/io/InputStreamReader;
.locals 2
const-string v0, "<this>"
invoke-static {p0, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
const-string v0, "charset"
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
.line 22
new-instance v0, Ljava/io/InputStreamReader;
new-instance v1, Ljava/io/FileInputStream;
invoke-direct {v1, p0}, Ljava/io/FileInputStream;-><init>(Ljava/io/File;)V
check-cast v1, Ljava/io/InputStream;
invoke-direct {v0, v1, p1}, Ljava/io/InputStreamReader;-><init>(Ljava/io/InputStream;Ljava/nio/charset/Charset;)V
return-object v0
.end method
.method static synthetic reader$default(Ljava/io/File;Ljava/nio/charset/Charset;ILjava/lang/Object;)Ljava/io/InputStreamReader;
.locals 0
and-int/lit8 p2, p2, 0x1
if-eqz p2, :cond_0
.line 21
sget-object p1, Lkotlin/text/Charsets;->UTF_8:Ljava/nio/charset/Charset;
:cond_0
const-string p2, "<this>"
invoke-static {p0, p2}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
const-string p2, "charset"
invoke-static {p1, p2}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
.line 22
new-instance p2, Ljava/io/InputStreamReader;
new-instance p3, Ljava/io/FileInputStream;
invoke-direct {p3, p0}, Ljava/io/FileInputStream;-><init>(Ljava/io/File;)V
check-cast p3, Ljava/io/InputStream;
invoke-direct {p2, p3, p1}, Ljava/io/InputStreamReader;-><init>(Ljava/io/InputStream;Ljava/nio/charset/Charset;)V
return-object p2
.end method
.method public static final useLines(Ljava/io/File;Ljava/nio/charset/Charset;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
.locals 2
.annotation system Ldalvik/annotation/Signature;
value = {
"<T:",
"Ljava/lang/Object;",
">(",
"Ljava/io/File;",
"Ljava/nio/charset/Charset;",
"Lkotlin/jvm/functions/Function1<",
"-",
"Lkotlin/sequences/Sequence<",
"Ljava/lang/String;",
">;+TT;>;)TT;"
}
.end annotation
const-string v0, "<this>"
invoke-static {p0, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
const-string v0, "charset"
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
const-string v0, "block"
invoke-static {p2, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
.line 231
new-instance v0, Ljava/io/InputStreamReader;
new-instance v1, Ljava/io/FileInputStream;
invoke-direct {v1, p0}, Ljava/io/FileInputStream;-><init>(Ljava/io/File;)V
check-cast v1, Ljava/io/InputStream;
invoke-direct {v0, v1, p1}, Ljava/io/InputStreamReader;-><init>(Ljava/io/InputStream;Ljava/nio/charset/Charset;)V
check-cast v0, Ljava/io/Reader;
instance-of p0, v0, Ljava/io/BufferedReader;
if-eqz p0, :cond_0
check-cast v0, Ljava/io/BufferedReader;
goto :goto_0
:cond_0
new-instance p0, Ljava/io/BufferedReader;
const/16 p1, 0x2000
invoke-direct {p0, v0, p1}, Ljava/io/BufferedReader;-><init>(Ljava/io/Reader;I)V
move-object v0, p0
:goto_0
check-cast v0, Ljava/io/Closeable;
const/4 p0, 0x0
const/4 p1, 0x1
:try_start_0
move-object v1, v0
check-cast v1, Ljava/io/BufferedReader;
invoke-static {v1}, Lkotlin/io/TextStreamsKt;->lineSequence(Ljava/io/BufferedReader;)Lkotlin/sequences/Sequence;
move-result-object v1
invoke-interface {p2, v1}, Lkotlin/jvm/functions/Function1;->invoke(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object p2
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
invoke-static {p1}, Lkotlin/jvm/internal/InlineMarker;->finallyStart(I)V
invoke-static {p1, p1, p0}, Lkotlin/internal/PlatformImplementationsKt;->apiVersionIsAtLeast(III)Z
move-result p0
if-eqz p0, :cond_1
const/4 p0, 0x0
invoke-static {v0, p0}, Lkotlin/io/CloseableKt;->closeFinally(Ljava/io/Closeable;Ljava/lang/Throwable;)V
goto :goto_1
:cond_1
invoke-interface {v0}, Ljava/io/Closeable;->close()V
:goto_1
invoke-static {p1}, Lkotlin/jvm/internal/InlineMarker;->finallyEnd(I)V
return-object p2
:catchall_0
move-exception p2
:try_start_1
throw p2
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_1
:catchall_1
move-exception v1
invoke-static {p1}, Lkotlin/jvm/internal/InlineMarker;->finallyStart(I)V
invoke-static {p1, p1, p0}, Lkotlin/internal/PlatformImplementationsKt;->apiVersionIsAtLeast(III)Z
move-result p0
if-nez p0, :cond_2
:try_start_2
invoke-interface {v0}, Ljava/io/Closeable;->close()V
:try_end_2
.catchall {:try_start_2 .. :try_end_2} :catchall_2
goto :goto_2
:cond_2
invoke-static {v0, p2}, Lkotlin/io/CloseableKt;->closeFinally(Ljava/io/Closeable;Ljava/lang/Throwable;)V
:catchall_2
:goto_2
invoke-static {p1}, Lkotlin/jvm/internal/InlineMarker;->finallyEnd(I)V
throw v1
.end method
.method public static synthetic useLines$default(Ljava/io/File;Ljava/nio/charset/Charset;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)Ljava/lang/Object;
.locals 1
const/4 p4, 0x1
and-int/2addr p3, p4
if-eqz p3, :cond_0
.line 230
sget-object p1, Lkotlin/text/Charsets;->UTF_8:Ljava/nio/charset/Charset;
:cond_0
const-string p3, "<this>"
invoke-static {p0, p3}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
const-string p3, "charset"
invoke-static {p1, p3}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
const-string p3, "block"
invoke-static {p2, p3}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
.line 231
new-instance p3, Ljava/io/InputStreamReader;
new-instance v0, Ljava/io/FileInputStream;
invoke-direct {v0, p0}, Ljava/io/FileInputStream;-><init>(Ljava/io/File;)V
check-cast v0, Ljava/io/InputStream;
invoke-direct {p3, v0, p1}, Ljava/io/InputStreamReader;-><init>(Ljava/io/InputStream;Ljava/nio/charset/Charset;)V
check-cast p3, Ljava/io/Reader;
instance-of p0, p3, Ljava/io/BufferedReader;
if-eqz p0, :cond_1
check-cast p3, Ljava/io/BufferedReader;
goto :goto_0
:cond_1
new-instance p0, Ljava/io/BufferedReader;
const/16 p1, 0x2000
invoke-direct {p0, p3, p1}, Ljava/io/BufferedReader;-><init>(Ljava/io/Reader;I)V
move-object p3, p0
:goto_0
check-cast p3, Ljava/io/Closeable;
const/4 p0, 0x0
:try_start_0
move-object p1, p3
check-cast p1, Ljava/io/BufferedReader;
invoke-static {p1}, Lkotlin/io/TextStreamsKt;->lineSequence(Ljava/io/BufferedReader;)Lkotlin/sequences/Sequence;
move-result-object p1
invoke-interface {p2, p1}, Lkotlin/jvm/functions/Function1;->invoke(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object p1
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
invoke-static {p4}, Lkotlin/jvm/internal/InlineMarker;->finallyStart(I)V
invoke-static {p4, p4, p0}, Lkotlin/internal/PlatformImplementationsKt;->apiVersionIsAtLeast(III)Z
move-result p0
if-eqz p0, :cond_2
const/4 p0, 0x0
invoke-static {p3, p0}, Lkotlin/io/CloseableKt;->closeFinally(Ljava/io/Closeable;Ljava/lang/Throwable;)V
goto :goto_1
:cond_2
invoke-interface {p3}, Ljava/io/Closeable;->close()V
:goto_1
invoke-static {p4}, Lkotlin/jvm/internal/InlineMarker;->finallyEnd(I)V
return-object p1
:catchall_0
move-exception p1
:try_start_1
throw p1
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_1
:catchall_1
move-exception p2
invoke-static {p4}, Lkotlin/jvm/internal/InlineMarker;->finallyStart(I)V
invoke-static {p4, p4, p0}, Lkotlin/internal/PlatformImplementationsKt;->apiVersionIsAtLeast(III)Z
move-result p0
if-nez p0, :cond_3
:try_start_2
invoke-interface {p3}, Ljava/io/Closeable;->close()V
:try_end_2
.catchall {:try_start_2 .. :try_end_2} :catchall_2
goto :goto_2
:cond_3
invoke-static {p3, p1}, Lkotlin/io/CloseableKt;->closeFinally(Ljava/io/Closeable;Ljava/lang/Throwable;)V
:catchall_2
:goto_2
invoke-static {p4}, Lkotlin/jvm/internal/InlineMarker;->finallyEnd(I)V
throw p2
.end method
.method public static final writeBytes(Ljava/io/File;[B)V
.locals 1
const-string v0, "<this>"
invoke-static {p0, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
const-string v0, "array"
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
.line 108
new-instance v0, Ljava/io/FileOutputStream;
invoke-direct {v0, p0}, Ljava/io/FileOutputStream;-><init>(Ljava/io/File;)V
check-cast v0, Ljava/io/Closeable;
:try_start_0
move-object p0, v0
check-cast p0, Ljava/io/FileOutputStream;
invoke-virtual {p0, p1}, Ljava/io/FileOutputStream;->write([B)V
sget-object p0, Lkotlin/Unit;->INSTANCE:Lkotlin/Unit;
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
const/4 p0, 0x0
invoke-static {v0, p0}, Lkotlin/io/CloseableKt;->closeFinally(Ljava/io/Closeable;Ljava/lang/Throwable;)V
return-void
:catchall_0
move-exception p0
:try_start_1
throw p0
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_1
:catchall_1
move-exception p1
invoke-static {v0, p0}, Lkotlin/io/CloseableKt;->closeFinally(Ljava/io/Closeable;Ljava/lang/Throwable;)V
throw p1
.end method
.method public static final writeText(Ljava/io/File;Ljava/lang/String;Ljava/nio/charset/Charset;)V
.locals 1
const-string v0, "<this>"
invoke-static {p0, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
const-string v0, "text"
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
const-string v0, "charset"
invoke-static {p2, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
.line 134
invoke-virtual {p1, p2}, Ljava/lang/String;->getBytes(Ljava/nio/charset/Charset;)[B
move-result-object p1
const-string p2, "getBytes(...)"
invoke-static {p1, p2}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
invoke-static {p0, p1}, Lkotlin/io/FilesKt;->writeBytes(Ljava/io/File;[B)V
return-void
.end method
.method public static synthetic writeText$default(Ljava/io/File;Ljava/lang/String;Ljava/nio/charset/Charset;ILjava/lang/Object;)V
.locals 0
and-int/lit8 p3, p3, 0x2
if-eqz p3, :cond_0
.line 134
sget-object p2, Lkotlin/text/Charsets;->UTF_8:Ljava/nio/charset/Charset;
:cond_0
invoke-static {p0, p1, p2}, Lkotlin/io/FilesKt;->writeText(Ljava/io/File;Ljava/lang/String;Ljava/nio/charset/Charset;)V
return-void
.end method
.method private static final writer(Ljava/io/File;Ljava/nio/charset/Charset;)Ljava/io/OutputStreamWriter;
.locals 2
const-string v0, "<this>"
invoke-static {p0, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
const-string v0, "charset"
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
.line 38
new-instance v0, Ljava/io/OutputStreamWriter;
new-instance v1, Ljava/io/FileOutputStream;
invoke-direct {v1, p0}, Ljava/io/FileOutputStream;-><init>(Ljava/io/File;)V
check-cast v1, Ljava/io/OutputStream;
invoke-direct {v0, v1, p1}, Ljava/io/OutputStreamWriter;-><init>(Ljava/io/OutputStream;Ljava/nio/charset/Charset;)V
return-object v0
.end method
.method static synthetic writer$default(Ljava/io/File;Ljava/nio/charset/Charset;ILjava/lang/Object;)Ljava/io/OutputStreamWriter;
.locals 0
and-int/lit8 p2, p2, 0x1
if-eqz p2, :cond_0
.line 37
sget-object p1, Lkotlin/text/Charsets;->UTF_8:Ljava/nio/charset/Charset;
:cond_0
const-string p2, "<this>"
invoke-static {p0, p2}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
const-string p2, "charset"
invoke-static {p1, p2}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
.line 38
new-instance p2, Ljava/io/OutputStreamWriter;
new-instance p3, Ljava/io/FileOutputStream;
invoke-direct {p3, p0}, Ljava/io/FileOutputStream;-><init>(Ljava/io/File;)V
check-cast p3, Ljava/io/OutputStream;
invoke-direct {p2, p3, p1}, Ljava/io/OutputStreamWriter;-><init>(Ljava/io/OutputStream;Ljava/nio/charset/Charset;)V
return-object p2
.end method