208 lines
6.2 KiB
Smali
208 lines
6.2 KiB
Smali
.class public final Landroidx/core/util/AtomicFileKt;
|
|
.super Ljava/lang/Object;
|
|
.source "AtomicFile.kt"
|
|
|
|
|
|
# direct methods
|
|
.method public static final readBytes(Landroid/util/AtomicFile;)[B
|
|
.locals 1
|
|
.annotation build Landroidx/annotation/RequiresApi;
|
|
value = 0x11
|
|
.end annotation
|
|
|
|
const-string v0, "$this$readBytes"
|
|
|
|
invoke-static {p0, v0}, Ly/m/c/j;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-virtual {p0}, Landroid/util/AtomicFile;->readFully()[B
|
|
|
|
move-result-object p0
|
|
|
|
const-string v0, "readFully()"
|
|
|
|
invoke-static {p0, v0}, Ly/m/c/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static final readText(Landroid/util/AtomicFile;Ljava/nio/charset/Charset;)Ljava/lang/String;
|
|
.locals 1
|
|
.annotation build Landroidx/annotation/RequiresApi;
|
|
value = 0x11
|
|
.end annotation
|
|
|
|
const-string v0, "$this$readText"
|
|
|
|
invoke-static {p0, v0}, Ly/m/c/j;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const-string v0, "charset"
|
|
|
|
invoke-static {p1, v0}, Ly/m/c/j;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-virtual {p0}, Landroid/util/AtomicFile;->readFully()[B
|
|
|
|
move-result-object p0
|
|
|
|
const-string v0, "readFully()"
|
|
|
|
invoke-static {p0, v0}, Ly/m/c/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
new-instance v0, Ljava/lang/String;
|
|
|
|
invoke-direct {v0, p0, p1}, Ljava/lang/String;-><init>([BLjava/nio/charset/Charset;)V
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public static synthetic readText$default(Landroid/util/AtomicFile;Ljava/nio/charset/Charset;ILjava/lang/Object;)Ljava/lang/String;
|
|
.locals 0
|
|
|
|
and-int/lit8 p2, p2, 0x1
|
|
|
|
if-eqz p2, :cond_0
|
|
|
|
sget-object p1, Ly/s/a;->a:Ljava/nio/charset/Charset;
|
|
|
|
:cond_0
|
|
invoke-static {p0, p1}, Landroidx/core/util/AtomicFileKt;->readText(Landroid/util/AtomicFile;Ljava/nio/charset/Charset;)Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static final tryWrite(Landroid/util/AtomicFile;Lkotlin/jvm/functions/Function1;)V
|
|
.locals 2
|
|
.annotation build Landroidx/annotation/RequiresApi;
|
|
value = 0x11
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Landroid/util/AtomicFile;",
|
|
"Lkotlin/jvm/functions/Function1<",
|
|
"-",
|
|
"Ljava/io/FileOutputStream;",
|
|
"Lkotlin/Unit;",
|
|
">;)V"
|
|
}
|
|
.end annotation
|
|
|
|
const-string v0, "$this$tryWrite"
|
|
|
|
invoke-static {p0, v0}, Ly/m/c/j;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const-string v0, "block"
|
|
|
|
invoke-static {p1, v0}, Ly/m/c/j;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-virtual {p0}, Landroid/util/AtomicFile;->startWrite()Ljava/io/FileOutputStream;
|
|
|
|
move-result-object v0
|
|
|
|
:try_start_0
|
|
const-string/jumbo v1, "stream"
|
|
|
|
invoke-static {v0, v1}, Ly/m/c/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-interface {p1, v0}, Lkotlin/jvm/functions/Function1;->invoke(Ljava/lang/Object;)Ljava/lang/Object;
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
invoke-virtual {p0, v0}, Landroid/util/AtomicFile;->finishWrite(Ljava/io/FileOutputStream;)V
|
|
|
|
return-void
|
|
|
|
:catchall_0
|
|
move-exception p1
|
|
|
|
invoke-virtual {p0, v0}, Landroid/util/AtomicFile;->failWrite(Ljava/io/FileOutputStream;)V
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method public static final writeBytes(Landroid/util/AtomicFile;[B)V
|
|
.locals 2
|
|
.annotation build Landroidx/annotation/RequiresApi;
|
|
value = 0x11
|
|
.end annotation
|
|
|
|
const-string v0, "$this$writeBytes"
|
|
|
|
invoke-static {p0, v0}, Ly/m/c/j;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const-string v0, "array"
|
|
|
|
invoke-static {p1, v0}, Ly/m/c/j;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-virtual {p0}, Landroid/util/AtomicFile;->startWrite()Ljava/io/FileOutputStream;
|
|
|
|
move-result-object v0
|
|
|
|
:try_start_0
|
|
const-string/jumbo v1, "stream"
|
|
|
|
invoke-static {v0, v1}, Ly/m/c/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-virtual {v0, p1}, Ljava/io/FileOutputStream;->write([B)V
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
invoke-virtual {p0, v0}, Landroid/util/AtomicFile;->finishWrite(Ljava/io/FileOutputStream;)V
|
|
|
|
return-void
|
|
|
|
:catchall_0
|
|
move-exception p1
|
|
|
|
invoke-virtual {p0, v0}, Landroid/util/AtomicFile;->failWrite(Ljava/io/FileOutputStream;)V
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method public static final writeText(Landroid/util/AtomicFile;Ljava/lang/String;Ljava/nio/charset/Charset;)V
|
|
.locals 1
|
|
.annotation build Landroidx/annotation/RequiresApi;
|
|
value = 0x11
|
|
.end annotation
|
|
|
|
const-string v0, "$this$writeText"
|
|
|
|
invoke-static {p0, v0}, Ly/m/c/j;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const-string/jumbo v0, "text"
|
|
|
|
invoke-static {p1, v0}, Ly/m/c/j;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const-string v0, "charset"
|
|
|
|
invoke-static {p2, v0}, Ly/m/c/j;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-virtual {p1, p2}, Ljava/lang/String;->getBytes(Ljava/nio/charset/Charset;)[B
|
|
|
|
move-result-object p1
|
|
|
|
const-string p2, "(this as java.lang.String).getBytes(charset)"
|
|
|
|
invoke-static {p1, p2}, Ly/m/c/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-static {p0, p1}, Landroidx/core/util/AtomicFileKt;->writeBytes(Landroid/util/AtomicFile;[B)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static synthetic writeText$default(Landroid/util/AtomicFile;Ljava/lang/String;Ljava/nio/charset/Charset;ILjava/lang/Object;)V
|
|
.locals 0
|
|
|
|
and-int/lit8 p3, p3, 0x2
|
|
|
|
if-eqz p3, :cond_0
|
|
|
|
sget-object p2, Ly/s/a;->a:Ljava/nio/charset/Charset;
|
|
|
|
:cond_0
|
|
invoke-static {p0, p1, p2}, Landroidx/core/util/AtomicFileKt;->writeText(Landroid/util/AtomicFile;Ljava/lang/String;Ljava/nio/charset/Charset;)V
|
|
|
|
return-void
|
|
.end method
|