You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1900 lines
48 KiB
1900 lines
48 KiB
2 years ago
|
.class public final Lcom/google/common/io/Files;
|
||
|
.super Ljava/lang/Object;
|
||
|
.source "Files.java"
|
||
|
|
||
|
|
||
|
# annotations
|
||
|
.annotation build Lcom/google/common/annotations/Beta;
|
||
|
.end annotation
|
||
|
|
||
|
.annotation system Ldalvik/annotation/MemberClasses;
|
||
|
value = {
|
||
|
Lcom/google/common/io/Files$FilePredicate;,
|
||
|
Lcom/google/common/io/Files$FileByteSink;,
|
||
|
Lcom/google/common/io/Files$FileByteSource;
|
||
|
}
|
||
|
.end annotation
|
||
|
|
||
|
|
||
|
# static fields
|
||
|
.field private static final FILE_TREE_TRAVERSER:Lcom/google/common/collect/TreeTraverser;
|
||
|
.annotation system Ldalvik/annotation/Signature;
|
||
|
value = {
|
||
|
"Lcom/google/common/collect/TreeTraverser",
|
||
|
"<",
|
||
|
"Ljava/io/File;",
|
||
|
">;"
|
||
|
}
|
||
|
.end annotation
|
||
|
.end field
|
||
|
|
||
|
.field private static final TEMP_DIR_ATTEMPTS:I = 0x2710
|
||
|
|
||
|
|
||
|
# direct methods
|
||
|
.method static constructor <clinit>()V
|
||
|
.locals 1
|
||
|
|
||
|
.prologue
|
||
|
.line 984
|
||
|
new-instance v0, Lcom/google/common/io/Files$2;
|
||
|
|
||
|
invoke-direct {v0}, Lcom/google/common/io/Files$2;-><init>()V
|
||
|
|
||
|
sput-object v0, Lcom/google/common/io/Files;->FILE_TREE_TRAVERSER:Lcom/google/common/collect/TreeTraverser;
|
||
|
|
||
|
return-void
|
||
|
.end method
|
||
|
|
||
|
.method private constructor <init>()V
|
||
|
.locals 0
|
||
|
|
||
|
.prologue
|
||
|
.line 71
|
||
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
||
|
|
||
|
return-void
|
||
|
.end method
|
||
|
|
||
|
.method public static append(Ljava/lang/CharSequence;Ljava/io/File;Ljava/nio/charset/Charset;)V
|
||
|
.locals 1
|
||
|
|
||
|
.prologue
|
||
|
.line 492
|
||
|
const/4 v0, 0x1
|
||
|
|
||
|
invoke-static {p0, p1, p2, v0}, Lcom/google/common/io/Files;->write(Ljava/lang/CharSequence;Ljava/io/File;Ljava/nio/charset/Charset;Z)V
|
||
|
|
||
|
.line 493
|
||
|
return-void
|
||
|
.end method
|
||
|
|
||
|
.method public static varargs asByteSink(Ljava/io/File;[Lcom/google/common/io/FileWriteMode;)Lcom/google/common/io/ByteSink;
|
||
|
.locals 2
|
||
|
|
||
|
.prologue
|
||
|
.line 186
|
||
|
new-instance v0, Lcom/google/common/io/Files$FileByteSink;
|
||
|
|
||
|
const/4 v1, 0x0
|
||
|
|
||
|
invoke-direct {v0, p0, p1, v1}, Lcom/google/common/io/Files$FileByteSink;-><init>(Ljava/io/File;[Lcom/google/common/io/FileWriteMode;Lcom/google/common/io/Files$1;)V
|
||
|
|
||
|
return-object v0
|
||
|
.end method
|
||
|
|
||
|
.method public static asByteSource(Ljava/io/File;)Lcom/google/common/io/ByteSource;
|
||
|
.locals 2
|
||
|
|
||
|
.prologue
|
||
|
.line 113
|
||
|
new-instance v0, Lcom/google/common/io/Files$FileByteSource;
|
||
|
|
||
|
const/4 v1, 0x0
|
||
|
|
||
|
invoke-direct {v0, p0, v1}, Lcom/google/common/io/Files$FileByteSource;-><init>(Ljava/io/File;Lcom/google/common/io/Files$1;)V
|
||
|
|
||
|
return-object v0
|
||
|
.end method
|
||
|
|
||
|
.method public static varargs asCharSink(Ljava/io/File;Ljava/nio/charset/Charset;[Lcom/google/common/io/FileWriteMode;)Lcom/google/common/io/CharSink;
|
||
|
.locals 1
|
||
|
|
||
|
.prologue
|
||
|
.line 232
|
||
|
invoke-static {p0, p2}, Lcom/google/common/io/Files;->asByteSink(Ljava/io/File;[Lcom/google/common/io/FileWriteMode;)Lcom/google/common/io/ByteSink;
|
||
|
|
||
|
move-result-object v0
|
||
|
|
||
|
invoke-virtual {v0, p1}, Lcom/google/common/io/ByteSink;->asCharSink(Ljava/nio/charset/Charset;)Lcom/google/common/io/CharSink;
|
||
|
|
||
|
move-result-object v0
|
||
|
|
||
|
return-object v0
|
||
|
.end method
|
||
|
|
||
|
.method public static asCharSource(Ljava/io/File;Ljava/nio/charset/Charset;)Lcom/google/common/io/CharSource;
|
||
|
.locals 1
|
||
|
|
||
|
.prologue
|
||
|
.line 217
|
||
|
invoke-static {p0}, Lcom/google/common/io/Files;->asByteSource(Ljava/io/File;)Lcom/google/common/io/ByteSource;
|
||
|
|
||
|
move-result-object v0
|
||
|
|
||
|
invoke-virtual {v0, p1}, Lcom/google/common/io/ByteSource;->asCharSource(Ljava/nio/charset/Charset;)Lcom/google/common/io/CharSource;
|
||
|
|
||
|
move-result-object v0
|
||
|
|
||
|
return-object v0
|
||
|
.end method
|
||
|
|
||
|
.method public static copy(Lcom/google/common/io/InputSupplier;Ljava/io/File;)V
|
||
|
.locals 2
|
||
|
.annotation system Ldalvik/annotation/Signature;
|
||
|
value = {
|
||
|
"(",
|
||
|
"Lcom/google/common/io/InputSupplier",
|
||
|
"<+",
|
||
|
"Ljava/io/InputStream;",
|
||
|
">;",
|
||
|
"Ljava/io/File;",
|
||
|
")V"
|
||
|
}
|
||
|
.end annotation
|
||
|
|
||
|
.annotation runtime Ljava/lang/Deprecated;
|
||
|
.end annotation
|
||
|
|
||
|
.prologue
|
||
|
.line 384
|
||
|
invoke-static {p0}, Lcom/google/common/io/ByteStreams;->asByteSource(Lcom/google/common/io/InputSupplier;)Lcom/google/common/io/ByteSource;
|
||
|
|
||
|
move-result-object v0
|
||
|
|
||
|
const/4 v1, 0x0
|
||
|
|
||
|
new-array v1, v1, [Lcom/google/common/io/FileWriteMode;
|
||
|
|
||
|
invoke-static {p1, v1}, Lcom/google/common/io/Files;->asByteSink(Ljava/io/File;[Lcom/google/common/io/FileWriteMode;)Lcom/google/common/io/ByteSink;
|
||
|
|
||
|
move-result-object v1
|
||
|
|
||
|
invoke-virtual {v0, v1}, Lcom/google/common/io/ByteSource;->copyTo(Lcom/google/common/io/ByteSink;)J
|
||
|
|
||
|
.line 385
|
||
|
return-void
|
||
|
.end method
|
||
|
|
||
|
.method public static copy(Lcom/google/common/io/InputSupplier;Ljava/io/File;Ljava/nio/charset/Charset;)V
|
||
|
.locals 2
|
||
|
.annotation system Ldalvik/annotation/Signature;
|
||
|
value = {
|
||
|
"<R::",
|
||
|
"Ljava/lang/Readable;",
|
||
|
":",
|
||
|
"Ljava/io/Closeable;",
|
||
|
">(",
|
||
|
"Lcom/google/common/io/InputSupplier",
|
||
|
"<TR;>;",
|
||
|
"Ljava/io/File;",
|
||
|
"Ljava/nio/charset/Charset;",
|
||
|
")V"
|
||
|
}
|
||
|
.end annotation
|
||
|
|
||
|
.annotation runtime Ljava/lang/Deprecated;
|
||
|
.end annotation
|
||
|
|
||
|
.prologue
|
||
|
.line 462
|
||
|
invoke-static {p0}, Lcom/google/common/io/CharStreams;->asCharSource(Lcom/google/common/io/InputSupplier;)Lcom/google/common/io/CharSource;
|
||
|
|
||
|
move-result-object v0
|
||
|
|
||
|
const/4 v1, 0x0
|
||
|
|
||
|
new-array v1, v1, [Lcom/google/common/io/FileWriteMode;
|
||
|
|
||
|
invoke-static {p1, p2, v1}, Lcom/google/common/io/Files;->asCharSink(Ljava/io/File;Ljava/nio/charset/Charset;[Lcom/google/common/io/FileWriteMode;)Lcom/google/common/io/CharSink;
|
||
|
|
||
|
move-result-object v1
|
||
|
|
||
|
invoke-virtual {v0, v1}, Lcom/google/common/io/CharSource;->copyTo(Lcom/google/common/io/CharSink;)J
|
||
|
|
||
|
.line 463
|
||
|
return-void
|
||
|
.end method
|
||
|
|
||
|
.method public static copy(Ljava/io/File;Lcom/google/common/io/OutputSupplier;)V
|
||
|
.locals 2
|
||
|
.annotation system Ldalvik/annotation/Signature;
|
||
|
value = {
|
||
|
"(",
|
||
|
"Ljava/io/File;",
|
||
|
"Lcom/google/common/io/OutputSupplier",
|
||
|
"<+",
|
||
|
"Ljava/io/OutputStream;",
|
||
|
">;)V"
|
||
|
}
|
||
|
.end annotation
|
||
|
|
||
|
.annotation runtime Ljava/lang/Deprecated;
|
||
|
.end annotation
|
||
|
|
||
|
.prologue
|
||
|
.line 412
|
||
|
invoke-static {p0}, Lcom/google/common/io/Files;->asByteSource(Ljava/io/File;)Lcom/google/common/io/ByteSource;
|
||
|
|
||
|
move-result-object v0
|
||
|
|
||
|
invoke-static {p1}, Lcom/google/common/io/ByteStreams;->asByteSink(Lcom/google/common/io/OutputSupplier;)Lcom/google/common/io/ByteSink;
|
||
|
|
||
|
move-result-object v1
|
||
|
|
||
|
invoke-virtual {v0, v1}, Lcom/google/common/io/ByteSource;->copyTo(Lcom/google/common/io/ByteSink;)J
|
||
|
|
||
|
.line 413
|
||
|
return-void
|
||
|
.end method
|
||
|
|
||
|
.method public static copy(Ljava/io/File;Ljava/io/File;)V
|
||
|
.locals 5
|
||
|
|
||
|
.prologue
|
||
|
const/4 v1, 0x1
|
||
|
|
||
|
const/4 v2, 0x0
|
||
|
|
||
|
.line 440
|
||
|
invoke-virtual {p0, p1}, Ljava/io/File;->equals(Ljava/lang/Object;)Z
|
||
|
|
||
|
move-result v0
|
||
|
|
||
|
if-nez v0, :cond_0
|
||
|
|
||
|
move v0, v1
|
||
|
|
||
|
:goto_0
|
||
|
const-string v3, "Source %s and destination %s must be different"
|
||
|
|
||
|
const/4 v4, 0x2
|
||
|
|
||
|
new-array v4, v4, [Ljava/lang/Object;
|
||
|
|
||
|
aput-object p0, v4, v2
|
||
|
|
||
|
aput-object p1, v4, v1
|
||
|
|
||
|
invoke-static {v0, v3, v4}, Lcom/google/common/base/Preconditions;->checkArgument(ZLjava/lang/String;[Ljava/lang/Object;)V
|
||
|
|
||
|
.line 442
|
||
|
invoke-static {p0}, Lcom/google/common/io/Files;->asByteSource(Ljava/io/File;)Lcom/google/common/io/ByteSource;
|
||
|
|
||
|
move-result-object v0
|
||
|
|
||
|
new-array v1, v2, [Lcom/google/common/io/FileWriteMode;
|
||
|
|
||
|
invoke-static {p1, v1}, Lcom/google/common/io/Files;->asByteSink(Ljava/io/File;[Lcom/google/common/io/FileWriteMode;)Lcom/google/common/io/ByteSink;
|
||
|
|
||
|
move-result-object v1
|
||
|
|
||
|
invoke-virtual {v0, v1}, Lcom/google/common/io/ByteSource;->copyTo(Lcom/google/common/io/ByteSink;)J
|
||
|
|
||
|
.line 443
|
||
|
return-void
|
||
|
|
||
|
:cond_0
|
||
|
move v0, v2
|
||
|
|
||
|
.line 440
|
||
|
goto :goto_0
|
||
|
.end method
|
||
|
|
||
|
.method public static copy(Ljava/io/File;Ljava/io/OutputStream;)V
|
||
|
.locals 1
|
||
|
|
||
|
.prologue
|
||
|
.line 423
|
||
|
invoke-static {p0}, Lcom/google/common/io/Files;->asByteSource(Ljava/io/File;)Lcom/google/common/io/ByteSource;
|
||
|
|
||
|
move-result-object v0
|
||
|
|
||
|
invoke-virtual {v0, p1}, Lcom/google/common/io/ByteSource;->copyTo(Ljava/io/OutputStream;)J
|
||
|
|
||
|
.line 424
|
||
|
return-void
|
||
|
.end method
|
||
|
|
||
|
.method public static copy(Ljava/io/File;Ljava/nio/charset/Charset;Lcom/google/common/io/OutputSupplier;)V
|
||
|
.locals 2
|
||
|
.annotation system Ldalvik/annotation/Signature;
|
||
|
value = {
|
||
|
"<W::",
|
||
|
"Ljava/lang/Appendable;",
|
||
|
":",
|
||
|
"Ljava/io/Closeable;",
|
||
|
">(",
|
||
|
"Ljava/io/File;",
|
||
|
"Ljava/nio/charset/Charset;",
|
||
|
"Lcom/google/common/io/OutputSupplier",
|
||
|
"<TW;>;)V"
|
||
|
}
|
||
|
.end annotation
|
||
|
|
||
|
.annotation runtime Ljava/lang/Deprecated;
|
||
|
.end annotation
|
||
|
|
||
|
.prologue
|
||
|
.line 528
|
||
|
invoke-static {p0, p1}, Lcom/google/common/io/Files;->asCharSource(Ljava/io/File;Ljava/nio/charset/Charset;)Lcom/google/common/io/CharSource;
|
||
|
|
||
|
move-result-object v0
|
||
|
|
||
|
invoke-static {p2}, Lcom/google/common/io/CharStreams;->asCharSink(Lcom/google/common/io/OutputSupplier;)Lcom/google/common/io/CharSink;
|
||
|
|
||
|
move-result-object v1
|
||
|
|
||
|
invoke-virtual {v0, v1}, Lcom/google/common/io/CharSource;->copyTo(Lcom/google/common/io/CharSink;)J
|
||
|
|
||
|
.line 529
|
||
|
return-void
|
||
|
.end method
|
||
|
|
||
|
.method public static copy(Ljava/io/File;Ljava/nio/charset/Charset;Ljava/lang/Appendable;)V
|
||
|
.locals 1
|
||
|
|
||
|
.prologue
|
||
|
.line 543
|
||
|
invoke-static {p0, p1}, Lcom/google/common/io/Files;->asCharSource(Ljava/io/File;Ljava/nio/charset/Charset;)Lcom/google/common/io/CharSource;
|
||
|
|
||
|
move-result-object v0
|
||
|
|
||
|
invoke-virtual {v0, p2}, Lcom/google/common/io/CharSource;->copyTo(Ljava/lang/Appendable;)J
|
||
|
|
||
|
.line 544
|
||
|
return-void
|
||
|
.end method
|
||
|
|
||
|
.method public static createParentDirs(Ljava/io/File;)V
|
||
|
.locals 3
|
||
|
|
||
|
.prologue
|
||
|
.line 631
|
||
|
invoke-static {p0}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object;
|
||
|
|
||
|
.line 632
|
||
|
invoke-virtual {p0}, Ljava/io/File;->getCanonicalFile()Ljava/io/File;
|
||
|
|
||
|
move-result-object v0
|
||
|
|
||
|
invoke-virtual {v0}, Ljava/io/File;->getParentFile()Ljava/io/File;
|
||
|
|
||
|
move-result-object v0
|
||
|
|
||
|
.line 633
|
||
|
if-nez v0, :cond_1
|
||
|
|
||
|
.line 647
|
||
|
:cond_0
|
||
|
return-void
|
||
|
|
||
|
.line 643
|
||
|
:cond_1
|
||
|
invoke-virtual {v0}, Ljava/io/File;->mkdirs()Z
|
||
|
|
||
|
.line 644
|
||
|
invoke-virtual {v0}, Ljava/io/File;->isDirectory()Z
|
||
|
|
||
|
move-result v0
|
||
|
|
||
|
if-nez v0, :cond_0
|
||
|
|
||
|
.line 645
|
||
|
new-instance v0, Ljava/io/IOException;
|
||
|
|
||
|
new-instance v1, Ljava/lang/StringBuilder;
|
||
|
|
||
|
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
|
||
|
|
||
|
const-string v2, "Unable to create parent directories of "
|
||
|
|
||
|
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
||
|
|
||
|
move-result-object v1
|
||
|
|
||
|
invoke-virtual {v1, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
|
||
|
|
||
|
move-result-object v1
|
||
|
|
||
|
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
||
|
|
||
|
move-result-object v1
|
||
|
|
||
|
invoke-direct {v0, v1}, Ljava/io/IOException;-><init>(Ljava/lang/String;)V
|
||
|
|
||
|
throw v0
|
||
|
.end method
|
||
|
|
||
|
.method public static createTempDir()Ljava/io/File;
|
||
|
.locals 5
|
||
|
|
||
|
.prologue
|
||
|
.line 591
|
||
|
new-instance v1, Ljava/io/File;
|
||
|
|
||
|
const-string v0, "java.io.tmpdir"
|
||
|
|
||
|
invoke-static {v0}, Ljava/lang/System;->getProperty(Ljava/lang/String;)Ljava/lang/String;
|
||
|
|
||
|
move-result-object v0
|
||
|
|
||
|
invoke-direct {v1, v0}, Ljava/io/File;-><init>(Ljava/lang/String;)V
|
||
|
|
||
|
.line 592
|
||
|
new-instance v0, Ljava/lang/StringBuilder;
|
||
|
|
||
|
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
|
||
|
|
||
|
invoke-static {}, Ljava/lang/System;->currentTimeMillis()J
|
||
|
|
||
|
move-result-wide v2
|
||
|
|
||
|
invoke-virtual {v0, v2, v3}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;
|
||
|
|
||
|
move-result-object v0
|
||
|
|
||
|
const-string v2, "-"
|
||
|
|
||
|
invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
||
|
|
||
|
move-result-object v0
|
||
|
|
||
|
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
||
|
|
||
|
move-result-object v2
|
||
|
|
||
|
.line 594
|
||
|
const/4 v0, 0x0
|
||
|
|
||
|
:goto_0
|
||
|
const/16 v3, 0x2710
|
||
|
|
||
|
if-ge v0, v3, :cond_1
|
||
|
|
||
|
.line 595
|
||
|
new-instance v3, Ljava/io/File;
|
||
|
|
||
|
new-instance v4, Ljava/lang/StringBuilder;
|
||
|
|
||
|
invoke-direct {v4}, Ljava/lang/StringBuilder;-><init>()V
|
||
|
|
||
|
invoke-virtual {v4, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
||
|
|
||
|
move-result-object v4
|
||
|
|
||
|
invoke-virtual {v4, v0}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
|
||
|
|
||
|
move-result-object v4
|
||
|
|
||
|
invoke-virtual {v4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
||
|
|
||
|
move-result-object v4
|
||
|
|
||
|
invoke-direct {v3, v1, v4}, Ljava/io/File;-><init>(Ljava/io/File;Ljava/lang/String;)V
|
||
|
|
||
|
.line 596
|
||
|
invoke-virtual {v3}, Ljava/io/File;->mkdir()Z
|
||
|
|
||
|
move-result v4
|
||
|
|
||
|
if-eqz v4, :cond_0
|
||
|
|
||
|
.line 597
|
||
|
return-object v3
|
||
|
|
||
|
.line 594
|
||
|
:cond_0
|
||
|
add-int/lit8 v0, v0, 0x1
|
||
|
|
||
|
goto :goto_0
|
||
|
|
||
|
.line 600
|
||
|
:cond_1
|
||
|
new-instance v0, Ljava/lang/IllegalStateException;
|
||
|
|
||
|
new-instance v1, Ljava/lang/StringBuilder;
|
||
|
|
||
|
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
|
||
|
|
||
|
const-string v3, "Failed to create directory within 10000 attempts (tried "
|
||
|
|
||
|
invoke-virtual {v1, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
||
|
|
||
|
move-result-object v1
|
||
|
|
||
|
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
||
|
|
||
|
move-result-object v1
|
||
|
|
||
|
const-string v3, "0 to "
|
||
|
|
||
|
invoke-virtual {v1, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
||
|
|
||
|
move-result-object v1
|
||
|
|
||
|
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
||
|
|
||
|
move-result-object v1
|
||
|
|
||
|
const/16 v2, 0x270f
|
||
|
|
||
|
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
|
||
|
|
||
|
move-result-object v1
|
||
|
|
||
|
const/16 v2, 0x29
|
||
|
|
||
|
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;
|
||
|
|
||
|
move-result-object v1
|
||
|
|
||
|
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
||
|
|
||
|
move-result-object v1
|
||
|
|
||
|
invoke-direct {v0, v1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
|
||
|
|
||
|
throw v0
|
||
|
.end method
|
||
|
|
||
|
.method public static equal(Ljava/io/File;Ljava/io/File;)Z
|
||
|
.locals 8
|
||
|
|
||
|
.prologue
|
||
|
const-wide/16 v6, 0x0
|
||
|
|
||
|
.line 552
|
||
|
invoke-static {p0}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object;
|
||
|
|
||
|
.line 553
|
||
|
invoke-static {p1}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object;
|
||
|
|
||
|
.line 554
|
||
|
if-eq p0, p1, :cond_0
|
||
|
|
||
|
invoke-virtual {p0, p1}, Ljava/io/File;->equals(Ljava/lang/Object;)Z
|
||
|
|
||
|
move-result v0
|
||
|
|
||
|
if-eqz v0, :cond_1
|
||
|
|
||
|
.line 555
|
||
|
:cond_0
|
||
|
const/4 v0, 0x1
|
||
|
|
||
|
.line 568
|
||
|
:goto_0
|
||
|
return v0
|
||
|
|
||
|
.line 563
|
||
|
:cond_1
|
||
|
invoke-virtual {p0}, Ljava/io/File;->length()J
|
||
|
|
||
|
move-result-wide v0
|
||
|
|
||
|
.line 564
|
||
|
invoke-virtual {p1}, Ljava/io/File;->length()J
|
||
|
|
||
|
move-result-wide v2
|
||
|
|
||
|
.line 565
|
||
|
cmp-long v4, v0, v6
|
||
|
|
||
|
if-eqz v4, :cond_2
|
||
|
|
||
|
cmp-long v4, v2, v6
|
||
|
|
||
|
if-eqz v4, :cond_2
|
||
|
|
||
|
cmp-long v0, v0, v2
|
||
|
|
||
|
if-eqz v0, :cond_2
|
||
|
|
||
|
.line 566
|
||
|
const/4 v0, 0x0
|
||
|
|
||
|
goto :goto_0
|
||
|
|
||
|
.line 568
|
||
|
:cond_2
|
||
|
invoke-static {p0}, Lcom/google/common/io/Files;->asByteSource(Ljava/io/File;)Lcom/google/common/io/ByteSource;
|
||
|
|
||
|
move-result-object v0
|
||
|
|
||
|
invoke-static {p1}, Lcom/google/common/io/Files;->asByteSource(Ljava/io/File;)Lcom/google/common/io/ByteSource;
|
||
|
|
||
|
move-result-object v1
|
||
|
|
||
|
invoke-virtual {v0, v1}, Lcom/google/common/io/ByteSource;->contentEquals(Lcom/google/common/io/ByteSource;)Z
|
||
|
|
||
|
move-result v0
|
||
|
|
||
|
goto :goto_0
|
||
|
.end method
|
||
|
|
||
|
.method public static fileTreeTraverser()Lcom/google/common/collect/TreeTraverser;
|
||
|
.locals 1
|
||
|
.annotation system Ldalvik/annotation/Signature;
|
||
|
value = {
|
||
|
"()",
|
||
|
"Lcom/google/common/collect/TreeTraverser",
|
||
|
"<",
|
||
|
"Ljava/io/File;",
|
||
|
">;"
|
||
|
}
|
||
|
.end annotation
|
||
|
|
||
|
.prologue
|
||
|
.line 981
|
||
|
sget-object v0, Lcom/google/common/io/Files;->FILE_TREE_TRAVERSER:Lcom/google/common/collect/TreeTraverser;
|
||
|
|
||
|
return-object v0
|
||
|
.end method
|
||
|
|
||
|
.method public static getFileExtension(Ljava/lang/String;)Ljava/lang/String;
|
||
|
.locals 3
|
||
|
|
||
|
.prologue
|
||
|
.line 947
|
||
|
invoke-static {p0}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object;
|
||
|
|
||
|
.line 948
|
||
|
new-instance v0, Ljava/io/File;
|
||
|
|
||
|
invoke-direct {v0, p0}, Ljava/io/File;-><init>(Ljava/lang/String;)V
|
||
|
|
||
|
invoke-virtual {v0}, Ljava/io/File;->getName()Ljava/lang/String;
|
||
|
|
||
|
move-result-object v0
|
||
|
|
||
|
.line 949
|
||
|
const/16 v1, 0x2e
|
||
|
|
||
|
invoke-virtual {v0, v1}, Ljava/lang/String;->lastIndexOf(I)I
|
||
|
|
||
|
move-result v1
|
||
|
|
||
|
.line 950
|
||
|
const/4 v2, -0x1
|
||
|
|
||
|
if-ne v1, v2, :cond_0
|
||
|
|
||
|
const-string v0, ""
|
||
|
|
||
|
:goto_0
|
||
|
return-object v0
|
||
|
|
||
|
:cond_0
|
||
|
add-int/lit8 v1, v1, 0x1
|
||
|
|
||
|
invoke-virtual {v0, v1}, Ljava/lang/String;->substring(I)Ljava/lang/String;
|
||
|
|
||
|
move-result-object v0
|
||
|
|
||
|
goto :goto_0
|
||
|
.end method
|
||
|
|
||
|
.method public static getNameWithoutExtension(Ljava/lang/String;)Ljava/lang/String;
|
||
|
.locals 3
|
||
|
|
||
|
.prologue
|
||
|
.line 964
|
||
|
invoke-static {p0}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object;
|
||
|
|
||
|
.line 965
|
||
|
new-instance v0, Ljava/io/File;
|
||
|
|
||
|
invoke-direct {v0, p0}, Ljava/io/File;-><init>(Ljava/lang/String;)V
|
||
|
|
||
|
invoke-virtual {v0}, Ljava/io/File;->getName()Ljava/lang/String;
|
||
|
|
||
|
move-result-object v0
|
||
|
|
||
|
.line 966
|
||
|
const/16 v1, 0x2e
|
||
|
|
||
|
invoke-virtual {v0, v1}, Ljava/lang/String;->lastIndexOf(I)I
|
||
|
|
||
|
move-result v1
|
||
|
|
||
|
.line 967
|
||
|
const/4 v2, -0x1
|
||
|
|
||
|
if-ne v1, v2, :cond_0
|
||
|
|
||
|
:goto_0
|
||
|
return-object v0
|
||
|
|
||
|
:cond_0
|
||
|
const/4 v2, 0x0
|
||
|
|
||
|
invoke-virtual {v0, v2, v1}, Ljava/lang/String;->substring(II)Ljava/lang/String;
|
||
|
|
||
|
move-result-object v0
|
||
|
|
||
|
goto :goto_0
|
||
|
.end method
|
||
|
|
||
|
.method public static hash(Ljava/io/File;Lcom/google/common/hash/HashFunction;)Lcom/google/common/hash/HashCode;
|
||
|
.locals 1
|
||
|
|
||
|
.prologue
|
||
|
.line 771
|
||
|
invoke-static {p0}, Lcom/google/common/io/Files;->asByteSource(Ljava/io/File;)Lcom/google/common/io/ByteSource;
|
||
|
|
||
|
move-result-object v0
|
||
|
|
||
|
invoke-virtual {v0, p1}, Lcom/google/common/io/ByteSource;->hash(Lcom/google/common/hash/HashFunction;)Lcom/google/common/hash/HashCode;
|
||
|
|
||
|
move-result-object v0
|
||
|
|
||
|
return-object v0
|
||
|
.end method
|
||
|
|
||
|
.method public static isDirectory()Lcom/google/common/base/Predicate;
|
||
|
.locals 1
|
||
|
.annotation system Ldalvik/annotation/Signature;
|
||
|
value = {
|
||
|
"()",
|
||
|
"Lcom/google/common/base/Predicate",
|
||
|
"<",
|
||
|
"Ljava/io/File;",
|
||
|
">;"
|
||
|
}
|
||
|
.end annotation
|
||
|
|
||
|
.prologue
|
||
|
.line 1010
|
||
|
sget-object v0, Lcom/google/common/io/Files$FilePredicate;->IS_DIRECTORY:Lcom/google/common/io/Files$FilePredicate;
|
||
|
|
||
|
return-object v0
|
||
|
.end method
|
||
|
|
||
|
.method public static isFile()Lcom/google/common/base/Predicate;
|
||
|
.locals 1
|
||
|
.annotation system Ldalvik/annotation/Signature;
|
||
|
value = {
|
||
|
"()",
|
||
|
"Lcom/google/common/base/Predicate",
|
||
|
"<",
|
||
|
"Ljava/io/File;",
|
||
|
">;"
|
||
|
}
|
||
|
.end annotation
|
||
|
|
||
|
.prologue
|
||
|
.line 1019
|
||
|
sget-object v0, Lcom/google/common/io/Files$FilePredicate;->IS_FILE:Lcom/google/common/io/Files$FilePredicate;
|
||
|
|
||
|
return-object v0
|
||
|
.end method
|
||
|
|
||
|
.method public static map(Ljava/io/File;)Ljava/nio/MappedByteBuffer;
|
||
|
.locals 1
|
||
|
|
||
|
.prologue
|
||
|
.line 791
|
||
|
invoke-static {p0}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object;
|
||
|
|
||
|
.line 792
|
||
|
sget-object v0, Ljava/nio/channels/FileChannel$MapMode;->READ_ONLY:Ljava/nio/channels/FileChannel$MapMode;
|
||
|
|
||
|
invoke-static {p0, v0}, Lcom/google/common/io/Files;->map(Ljava/io/File;Ljava/nio/channels/FileChannel$MapMode;)Ljava/nio/MappedByteBuffer;
|
||
|
|
||
|
move-result-object v0
|
||
|
|
||
|
return-object v0
|
||
|
.end method
|
||
|
|
||
|
.method public static map(Ljava/io/File;Ljava/nio/channels/FileChannel$MapMode;)Ljava/nio/MappedByteBuffer;
|
||
|
.locals 2
|
||
|
|
||
|
.prologue
|
||
|
.line 815
|
||
|
invoke-static {p0}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object;
|
||
|
|
||
|
.line 816
|
||
|
invoke-static {p1}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object;
|
||
|
|
||
|
.line 817
|
||
|
invoke-virtual {p0}, Ljava/io/File;->exists()Z
|
||
|
|
||
|
move-result v0
|
||
|
|
||
|
if-nez v0, :cond_0
|
||
|
|
||
|
.line 818
|
||
|
new-instance v0, Ljava/io/FileNotFoundException;
|
||
|
|
||
|
invoke-virtual {p0}, Ljava/io/File;->toString()Ljava/lang/String;
|
||
|
|
||
|
move-result-object v1
|
||
|
|
||
|
invoke-direct {v0, v1}, Ljava/io/FileNotFoundException;-><init>(Ljava/lang/String;)V
|
||
|
|
||
|
throw v0
|
||
|
|
||
|
.line 820
|
||
|
:cond_0
|
||
|
invoke-virtual {p0}, Ljava/io/File;->length()J
|
||
|
|
||
|
move-result-wide v0
|
||
|
|
||
|
invoke-static {p0, p1, v0, v1}, Lcom/google/common/io/Files;->map(Ljava/io/File;Ljava/nio/channels/FileChannel$MapMode;J)Ljava/nio/MappedByteBuffer;
|
||
|
|
||
|
move-result-object v0
|
||
|
|
||
|
return-object v0
|
||
|
.end method
|
||
|
|
||
|
.method public static map(Ljava/io/File;Ljava/nio/channels/FileChannel$MapMode;J)Ljava/nio/MappedByteBuffer;
|
||
|
.locals 4
|
||
|
|
||
|
.prologue
|
||
|
.line 846
|
||
|
invoke-static {p0}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object;
|
||
|
|
||
|
.line 847
|
||
|
invoke-static {p1}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object;
|
||
|
|
||
|
.line 849
|
||
|
invoke-static {}, Lcom/google/common/io/Closer;->create()Lcom/google/common/io/Closer;
|
||
|
|
||
|
move-result-object v1
|
||
|
|
||
|
.line 851
|
||
|
:try_start_0
|
||
|
new-instance v2, Ljava/io/RandomAccessFile;
|
||
|
|
||
|
sget-object v0, Ljava/nio/channels/FileChannel$MapMode;->READ_ONLY:Ljava/nio/channels/FileChannel$MapMode;
|
||
|
|
||
|
if-ne p1, v0, :cond_0
|
||
|
|
||
|
const-string v0, "r"
|
||
|
|
||
|
:goto_0
|
||
|
invoke-direct {v2, p0, v0}, Ljava/io/RandomAccessFile;-><init>(Ljava/io/File;Ljava/lang/String;)V
|
||
|
|
||
|
invoke-virtual {v1, v2}, Lcom/google/common/io/Closer;->register(Ljava/io/Closeable;)Ljava/io/Closeable;
|
||
|
|
||
|
move-result-object v0
|
||
|
|
||
|
check-cast v0, Ljava/io/RandomAccessFile;
|
||
|
|
||
|
.line 853
|
||
|
invoke-static {v0, p1, p2, p3}, Lcom/google/common/io/Files;->map(Ljava/io/RandomAccessFile;Ljava/nio/channels/FileChannel$MapMode;J)Ljava/nio/MappedByteBuffer;
|
||
|
:try_end_0
|
||
|
.catch Ljava/lang/Throwable; {:try_start_0 .. :try_end_0} :catch_0
|
||
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
||
|
|
||
|
move-result-object v0
|
||
|
|
||
|
.line 857
|
||
|
invoke-virtual {v1}, Lcom/google/common/io/Closer;->close()V
|
||
|
|
||
|
return-object v0
|
||
|
|
||
|
.line 851
|
||
|
:cond_0
|
||
|
:try_start_1
|
||
|
const-string v0, "rw"
|
||
|
:try_end_1
|
||
|
.catch Ljava/lang/Throwable; {:try_start_1 .. :try_end_1} :catch_0
|
||
|
.catchall {:try_start_1 .. :try_end_1} :catchall_0
|
||
|
|
||
|
goto :goto_0
|
||
|
|
||
|
.line 854
|
||
|
:catch_0
|
||
|
move-exception v0
|
||
|
|
||
|
.line 855
|
||
|
:try_start_2
|
||
|
invoke-virtual {v1, v0}, Lcom/google/common/io/Closer;->rethrow(Ljava/lang/Throwable;)Ljava/lang/RuntimeException;
|
||
|
|
||
|
move-result-object v0
|
||
|
|
||
|
throw v0
|
||
|
:try_end_2
|
||
|
.catchall {:try_start_2 .. :try_end_2} :catchall_0
|
||
|
|
||
|
.line 857
|
||
|
:catchall_0
|
||
|
move-exception v0
|
||
|
|
||
|
invoke-virtual {v1}, Lcom/google/common/io/Closer;->close()V
|
||
|
|
||
|
throw v0
|
||
|
.end method
|
||
|
|
||
|
.method private static map(Ljava/io/RandomAccessFile;Ljava/nio/channels/FileChannel$MapMode;J)Ljava/nio/MappedByteBuffer;
|
||
|
.locals 8
|
||
|
|
||
|
.prologue
|
||
|
.line 863
|
||
|
invoke-static {}, Lcom/google/common/io/Closer;->create()Lcom/google/common/io/Closer;
|
||
|
|
||
|
move-result-object v6
|
||
|
|
||
|
.line 865
|
||
|
:try_start_0
|
||
|
invoke-virtual {p0}, Ljava/io/RandomAccessFile;->getChannel()Ljava/nio/channels/FileChannel;
|
||
|
|
||
|
move-result-object v0
|
||
|
|
||
|
invoke-virtual {v6, v0}, Lcom/google/common/io/Closer;->register(Ljava/io/Closeable;)Ljava/io/Closeable;
|
||
|
|
||
|
move-result-object v0
|
||
|
|
||
|
check-cast v0, Ljava/nio/channels/FileChannel;
|
||
|
|
||
|
.line 866
|
||
|
const-wide/16 v2, 0x0
|
||
|
|
||
|
move-object v1, p1
|
||
|
|
||
|
move-wide v4, p2
|
||
|
|
||
|
invoke-virtual/range {v0 .. v5}, Ljava/nio/channels/FileChannel;->map(Ljava/nio/channels/FileChannel$MapMode;JJ)Ljava/nio/MappedByteBuffer;
|
||
|
:try_end_0
|
||
|
.catch Ljava/lang/Throwable; {:try_start_0 .. :try_end_0} :catch_0
|
||
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
||
|
|
||
|
move-result-object v0
|
||
|
|
||
|
.line 870
|
||
|
invoke-virtual {v6}, Lcom/google/common/io/Closer;->close()V
|
||
|
|
||
|
return-object v0
|
||
|
|
||
|
.line 867
|
||
|
:catch_0
|
||
|
move-exception v0
|
||
|
|
||
|
.line 868
|
||
|
:try_start_1
|
||
|
invoke-virtual {v6, v0}, Lcom/google/common/io/Closer;->rethrow(Ljava/lang/Throwable;)Ljava/lang/RuntimeException;
|
||
|
|
||
|
move-result-object v0
|
||
|
|
||
|
throw v0
|
||
|
:try_end_1
|
||
|
.catchall {:try_start_1 .. :try_end_1} :catchall_0
|
||
|
|
||
|
.line 870
|
||
|
:catchall_0
|
||
|
move-exception v0
|
||
|
|
||
|
invoke-virtual {v6}, Lcom/google/common/io/Closer;->close()V
|
||
|
|
||
|
throw v0
|
||
|
.end method
|
||
|
|
||
|
.method private static modes(Z)[Lcom/google/common/io/FileWriteMode;
|
||
|
.locals 3
|
||
|
|
||
|
.prologue
|
||
|
const/4 v2, 0x0
|
||
|
|
||
|
.line 284
|
||
|
if-eqz p0, :cond_0
|
||
|
|
||
|
const/4 v0, 0x1
|
||
|
|
||
|
new-array v0, v0, [Lcom/google/common/io/FileWriteMode;
|
||
|
|
||
|
sget-object v1, Lcom/google/common/io/FileWriteMode;->APPEND:Lcom/google/common/io/FileWriteMode;
|
||
|
|
||
|
aput-object v1, v0, v2
|
||
|
|
||
|
:goto_0
|
||
|
return-object v0
|
||
|
|
||
|
:cond_0
|
||
|
new-array v0, v2, [Lcom/google/common/io/FileWriteMode;
|
||
|
|
||
|
goto :goto_0
|
||
|
.end method
|
||
|
|
||
|
.method public static move(Ljava/io/File;Ljava/io/File;)V
|
||
|
.locals 5
|
||
|
|
||
|
.prologue
|
||
|
const/4 v1, 0x1
|
||
|
|
||
|
const/4 v2, 0x0
|
||
|
|
||
|
.line 661
|
||
|
invoke-static {p0}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object;
|
||
|
|
||
|
.line 662
|
||
|
invoke-static {p1}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object;
|
||
|
|
||
|
.line 663
|
||
|
invoke-virtual {p0, p1}, Ljava/io/File;->equals(Ljava/lang/Object;)Z
|
||
|
|
||
|
move-result v0
|
||
|
|
||
|
if-nez v0, :cond_0
|
||
|
|
||
|
move v0, v1
|
||
|
|
||
|
:goto_0
|
||
|
const-string v3, "Source %s and destination %s must be different"
|
||
|
|
||
|
const/4 v4, 0x2
|
||
|
|
||
|
new-array v4, v4, [Ljava/lang/Object;
|
||
|
|
||
|
aput-object p0, v4, v2
|
||
|
|
||
|
aput-object p1, v4, v1
|
||
|
|
||
|
invoke-static {v0, v3, v4}, Lcom/google/common/base/Preconditions;->checkArgument(ZLjava/lang/String;[Ljava/lang/Object;)V
|
||
|
|
||
|
.line 666
|
||
|
invoke-virtual {p0, p1}, Ljava/io/File;->renameTo(Ljava/io/File;)Z
|
||
|
|
||
|
move-result v0
|
||
|
|
||
|
if-nez v0, :cond_2
|
||
|
|
||
|
.line 667
|
||
|
invoke-static {p0, p1}, Lcom/google/common/io/Files;->copy(Ljava/io/File;Ljava/io/File;)V
|
||
|
|
||
|
.line 668
|
||
|
invoke-virtual {p0}, Ljava/io/File;->delete()Z
|
||
|
|
||
|
move-result v0
|
||
|
|
||
|
if-nez v0, :cond_2
|
||
|
|
||
|
.line 669
|
||
|
invoke-virtual {p1}, Ljava/io/File;->delete()Z
|
||
|
|
||
|
move-result v0
|
||
|
|
||
|
if-nez v0, :cond_1
|
||
|
|
||
|
.line 670
|
||
|
new-instance v0, Ljava/io/IOException;
|
||
|
|
||
|
new-instance v1, Ljava/lang/StringBuilder;
|
||
|
|
||
|
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
|
||
|
|
||
|
const-string v2, "Unable to delete "
|
||
|
|
||
|
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
||
|
|
||
|
move-result-object v1
|
||
|
|
||
|
invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
|
||
|
|
||
|
move-result-object v1
|
||
|
|
||
|
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
||
|
|
||
|
move-result-object v1
|
||
|
|
||
|
invoke-direct {v0, v1}, Ljava/io/IOException;-><init>(Ljava/lang/String;)V
|
||
|
|
||
|
throw v0
|
||
|
|
||
|
:cond_0
|
||
|
move v0, v2
|
||
|
|
||
|
.line 663
|
||
|
goto :goto_0
|
||
|
|
||
|
.line 672
|
||
|
:cond_1
|
||
|
new-instance v0, Ljava/io/IOException;
|
||
|
|
||
|
new-instance v1, Ljava/lang/StringBuilder;
|
||
|
|
||
|
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
|
||
|
|
||
|
const-string v2, "Unable to delete "
|
||
|
|
||
|
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
||
|
|
||
|
move-result-object v1
|
||
|
|
||
|
invoke-virtual {v1, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
|
||
|
|
||
|
move-result-object v1
|
||
|
|
||
|
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
||
|
|
||
|
move-result-object v1
|
||
|
|
||
|
invoke-direct {v0, v1}, Ljava/io/IOException;-><init>(Ljava/lang/String;)V
|
||
|
|
||
|
throw v0
|
||
|
|
||
|
.line 675
|
||
|
:cond_2
|
||
|
return-void
|
||
|
.end method
|
||
|
|
||
|
.method public static newInputStreamSupplier(Ljava/io/File;)Lcom/google/common/io/InputSupplier;
|
||
|
.locals 1
|
||
|
.annotation system Ldalvik/annotation/Signature;
|
||
|
value = {
|
||
|
"(",
|
||
|
"Ljava/io/File;",
|
||
|
")",
|
||
|
"Lcom/google/common/io/InputSupplier",
|
||
|
"<",
|
||
|
"Ljava/io/FileInputStream;",
|
||
|
">;"
|
||
|
}
|
||
|
.end annotation
|
||
|
|
||
|
.annotation runtime Ljava/lang/Deprecated;
|
||
|
.end annotation
|
||
|
|
||
|
.prologue
|
||
|
.line 247
|
||
|
invoke-static {p0}, Lcom/google/common/io/Files;->asByteSource(Ljava/io/File;)Lcom/google/common/io/ByteSource;
|
||
|
|
||
|
move-result-object v0
|
||
|
|
||
|
invoke-static {v0}, Lcom/google/common/io/ByteStreams;->asInputSupplier(Lcom/google/common/io/ByteSource;)Lcom/google/common/io/InputSupplier;
|
||
|
|
||
|
move-result-object v0
|
||
|
|
||
|
return-object v0
|
||
|
.end method
|
||
|
|
||
|
.method public static newOutputStreamSupplier(Ljava/io/File;)Lcom/google/common/io/OutputSupplier;
|
||
|
.locals 1
|
||
|
.annotation system Ldalvik/annotation/Signature;
|
||
|
value = {
|
||
|
"(",
|
||
|
"Ljava/io/File;",
|
||
|
")",
|
||
|
"Lcom/google/common/io/OutputSupplier",
|
||
|
"<",
|
||
|
"Ljava/io/FileOutputStream;",
|
||
|
">;"
|
||
|
}
|
||
|
.end annotation
|
||
|
|
||
|
.annotation runtime Ljava/lang/Deprecated;
|
||
|
.end annotation
|
||
|
|
||
|
.prologue
|
||
|
.line 262
|
||
|
const/4 v0, 0x0
|
||
|
|
||
|
invoke-static {p0, v0}, Lcom/google/common/io/Files;->newOutputStreamSupplier(Ljava/io/File;Z)Lcom/google/common/io/OutputSupplier;
|
||
|
|
||
|
move-result-object v0
|
||
|
|
||
|
return-object v0
|
||
|
.end method
|
||
|
|
||
|
.method public static newOutputStreamSupplier(Ljava/io/File;Z)Lcom/google/common/io/OutputSupplier;
|
||
|
.locals 1
|
||
|
.annotation system Ldalvik/annotation/Signature;
|
||
|
value = {
|
||
|
"(",
|
||
|
"Ljava/io/File;",
|
||
|
"Z)",
|
||
|
"Lcom/google/common/io/OutputSupplier",
|
||
|
"<",
|
||
|
"Ljava/io/FileOutputStream;",
|
||
|
">;"
|
||
|
}
|
||
|
.end annotation
|
||
|
|
||
|
.annotation runtime Ljava/lang/Deprecated;
|
||
|
.end annotation
|
||
|
|
||
|
.prologue
|
||
|
.line 280
|
||
|
invoke-static {p1}, Lcom/google/common/io/Files;->modes(Z)[Lcom/google/common/io/FileWriteMode;
|
||
|
|
||
|
move-result-object v0
|
||
|
|
||
|
invoke-static {p0, v0}, Lcom/google/common/io/Files;->asByteSink(Ljava/io/File;[Lcom/google/common/io/FileWriteMode;)Lcom/google/common/io/ByteSink;
|
||
|
|
||
|
move-result-object v0
|
||
|
|
||
|
invoke-static {v0}, Lcom/google/common/io/ByteStreams;->asOutputSupplier(Lcom/google/common/io/ByteSink;)Lcom/google/common/io/OutputSupplier;
|
||
|
|
||
|
move-result-object v0
|
||
|
|
||
|
return-object v0
|
||
|
.end method
|
||
|
|
||
|
.method public static newReader(Ljava/io/File;Ljava/nio/charset/Charset;)Ljava/io/BufferedReader;
|
||
|
.locals 3
|
||
|
|
||
|
.prologue
|
||
|
.line 84
|
||
|
invoke-static {p0}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object;
|
||
|
|
||
|
.line 85
|
||
|
invoke-static {p1}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object;
|
||
|
|
||
|
.line 86
|
||
|
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
|
||
|
|
||
|
invoke-direct {v1, v2, p1}, Ljava/io/InputStreamReader;-><init>(Ljava/io/InputStream;Ljava/nio/charset/Charset;)V
|
||
|
|
||
|
invoke-direct {v0, v1}, Ljava/io/BufferedReader;-><init>(Ljava/io/Reader;)V
|
||
|
|
||
|
return-object v0
|
||
|
.end method
|
||
|
|
||
|
.method public static newReaderSupplier(Ljava/io/File;Ljava/nio/charset/Charset;)Lcom/google/common/io/InputSupplier;
|
||
|
.locals 1
|
||
|
.annotation system Ldalvik/annotation/Signature;
|
||
|
value = {
|
||
|
"(",
|
||
|
"Ljava/io/File;",
|
||
|
"Ljava/nio/charset/Charset;",
|
||
|
")",
|
||
|
"Lcom/google/common/io/InputSupplier",
|
||
|
"<",
|
||
|
"Ljava/io/InputStreamReader;",
|
||
|
">;"
|
||
|
}
|
||
|
.end annotation
|
||
|
|
||
|
.annotation runtime Ljava/lang/Deprecated;
|
||
|
.end annotation
|
||
|
|
||
|
.prologue
|
||
|
.line 303
|
||
|
invoke-static {p0, p1}, Lcom/google/common/io/Files;->asCharSource(Ljava/io/File;Ljava/nio/charset/Charset;)Lcom/google/common/io/CharSource;
|
||
|
|
||
|
move-result-object v0
|
||
|
|
||
|
invoke-static {v0}, Lcom/google/common/io/CharStreams;->asInputSupplier(Lcom/google/common/io/CharSource;)Lcom/google/common/io/InputSupplier;
|
||
|
|
||
|
move-result-object v0
|
||
|
|
||
|
return-object v0
|
||
|
.end method
|
||
|
|
||
|
.method public static newWriter(Ljava/io/File;Ljava/nio/charset/Charset;)Ljava/io/BufferedWriter;
|
||
|
.locals 3
|
||
|
|
||
|
.prologue
|
||
|
.line 101
|
||
|
invoke-static {p0}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object;
|
||
|
|
||
|
.line 102
|
||
|
invoke-static {p1}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object;
|
||
|
|
||
|
.line 103
|
||
|
new-instance v0, Ljava/io/BufferedWriter;
|
||
|
|
||
|
new-instance v1, Ljava/io/OutputStreamWriter;
|
||
|
|
||
|
new-instance v2, Ljava/io/FileOutputStream;
|
||
|
|
||
|
invoke-direct {v2, p0}, Ljava/io/FileOutputStream;-><init>(Ljava/io/File;)V
|
||
|
|
||
|
invoke-direct {v1, v2, p1}, Ljava/io/OutputStreamWriter;-><init>(Ljava/io/OutputStream;Ljava/nio/charset/Charset;)V
|
||
|
|
||
|
invoke-direct {v0, v1}, Ljava/io/BufferedWriter;-><init>(Ljava/io/Writer;)V
|
||
|
|
||
|
return-object v0
|
||
|
.end method
|
||
|
|
||
|
.method public static newWriterSupplier(Ljava/io/File;Ljava/nio/charset/Charset;)Lcom/google/common/io/OutputSupplier;
|
||
|
.locals 1
|
||
|
.annotation system Ldalvik/annotation/Signature;
|
||
|
value = {
|
||
|
"(",
|
||
|
"Ljava/io/File;",
|
||
|
"Ljava/nio/charset/Charset;",
|
||
|
")",
|
||
|
"Lcom/google/common/io/OutputSupplier",
|
||
|
"<",
|
||
|
"Ljava/io/OutputStreamWriter;",
|
||
|
">;"
|
||
|
}
|
||
|
.end annotation
|
||
|
|
||
|
.annotation runtime Ljava/lang/Deprecated;
|
||
|
.end annotation
|
||
|
|
||
|
.prologue
|
||
|
.line 320
|
||
|
const/4 v0, 0x0
|
||
|
|
||
|
invoke-static {p0, p1, v0}, Lcom/google/common/io/Files;->newWriterSupplier(Ljava/io/File;Ljava/nio/charset/Charset;Z)Lcom/google/common/io/OutputSupplier;
|
||
|
|
||
|
move-result-object v0
|
||
|
|
||
|
return-object v0
|
||
|
.end method
|
||
|
|
||
|
.method public static newWriterSupplier(Ljava/io/File;Ljava/nio/charset/Charset;Z)Lcom/google/common/io/OutputSupplier;
|
||
|
.locals 1
|
||
|
.annotation system Ldalvik/annotation/Signature;
|
||
|
value = {
|
||
|
"(",
|
||
|
"Ljava/io/File;",
|
||
|
"Ljava/nio/charset/Charset;",
|
||
|
"Z)",
|
||
|
"Lcom/google/common/io/OutputSupplier",
|
||
|
"<",
|
||
|
"Ljava/io/OutputStreamWriter;",
|
||
|
">;"
|
||
|
}
|
||
|
.end annotation
|
||
|
|
||
|
.annotation runtime Ljava/lang/Deprecated;
|
||
|
.end annotation
|
||
|
|
||
|
.prologue
|
||
|
.line 340
|
||
|
invoke-static {p2}, Lcom/google/common/io/Files;->modes(Z)[Lcom/google/common/io/FileWriteMode;
|
||
|
|
||
|
move-result-object v0
|
||
|
|
||
|
invoke-static {p0, p1, v0}, Lcom/google/common/io/Files;->asCharSink(Ljava/io/File;Ljava/nio/charset/Charset;[Lcom/google/common/io/FileWriteMode;)Lcom/google/common/io/CharSink;
|
||
|
|
||
|
move-result-object v0
|
||
|
|
||
|
invoke-static {v0}, Lcom/google/common/io/CharStreams;->asOutputSupplier(Lcom/google/common/io/CharSink;)Lcom/google/common/io/OutputSupplier;
|
||
|
|
||
|
move-result-object v0
|
||
|
|
||
|
return-object v0
|
||
|
.end method
|
||
|
|
||
|
.method public static readBytes(Ljava/io/File;Lcom/google/common/io/ByteProcessor;)Ljava/lang/Object;
|
||
|
.locals 1
|
||
|
.annotation system Ldalvik/annotation/Signature;
|
||
|
value = {
|
||
|
"<T:",
|
||
|
"Ljava/lang/Object;",
|
||
|
">(",
|
||
|
"Ljava/io/File;",
|
||
|
"Lcom/google/common/io/ByteProcessor",
|
||
|
"<TT;>;)TT;"
|
||
|
}
|
||
|
.end annotation
|
||
|
|
||
|
.prologue
|
||
|
.line 757
|
||
|
invoke-static {p0}, Lcom/google/common/io/Files;->newInputStreamSupplier(Ljava/io/File;)Lcom/google/common/io/InputSupplier;
|
||
|
|
||
|
move-result-object v0
|
||
|
|
||
|
invoke-static {v0, p1}, Lcom/google/common/io/ByteStreams;->readBytes(Lcom/google/common/io/InputSupplier;Lcom/google/common/io/ByteProcessor;)Ljava/lang/Object;
|
||
|
|
||
|
move-result-object v0
|
||
|
|
||
|
return-object v0
|
||
|
.end method
|
||
|
|
||
|
.method static readFile(Ljava/io/InputStream;J)[B
|
||
|
.locals 3
|
||
|
|
||
|
.prologue
|
||
|
.line 164
|
||
|
const-wide/32 v0, 0x7fffffff
|
||
|
|
||
|
cmp-long v0, p1, v0
|
||
|
|
||
|
if-lez v0, :cond_0
|
||
|
|
||
|
.line 165
|
||
|
new-instance v0, Ljava/lang/OutOfMemoryError;
|
||
|
|
||
|
new-instance v1, Ljava/lang/StringBuilder;
|
||
|
|
||
|
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
|
||
|
|
||
|
const-string v2, "file is too large to fit in a byte array: "
|
||
|
|
||
|
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
||
|
|
||
|
move-result-object v1
|
||
|
|
||
|
invoke-virtual {v1, p1, p2}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;
|
||
|
|
||
|
move-result-object v1
|
||
|
|
||
|
const-string v2, " bytes"
|
||
|
|
||
|
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
||
|
|
||
|
move-result-object v1
|
||
|
|
||
|
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
||
|
|
||
|
move-result-object v1
|
||
|
|
||
|
invoke-direct {v0, v1}, Ljava/lang/OutOfMemoryError;-><init>(Ljava/lang/String;)V
|
||
|
|
||
|
throw v0
|
||
|
|
||
|
.line 171
|
||
|
:cond_0
|
||
|
const-wide/16 v0, 0x0
|
||
|
|
||
|
cmp-long v0, p1, v0
|
||
|
|
||
|
if-nez v0, :cond_1
|
||
|
|
||
|
invoke-static {p0}, Lcom/google/common/io/ByteStreams;->toByteArray(Ljava/io/InputStream;)[B
|
||
|
|
||
|
move-result-object v0
|
||
|
|
||
|
:goto_0
|
||
|
return-object v0
|
||
|
|
||
|
:cond_1
|
||
|
long-to-int v0, p1
|
||
|
|
||
|
invoke-static {p0, v0}, Lcom/google/common/io/ByteStreams;->toByteArray(Ljava/io/InputStream;I)[B
|
||
|
|
||
|
move-result-object v0
|
||
|
|
||
|
goto :goto_0
|
||
|
.end method
|
||
|
|
||
|
.method public static readFirstLine(Ljava/io/File;Ljava/nio/charset/Charset;)Ljava/lang/String;
|
||
|
.locals 1
|
||
|
|
||
|
.prologue
|
||
|
.line 690
|
||
|
invoke-static {p0, p1}, Lcom/google/common/io/Files;->asCharSource(Ljava/io/File;Ljava/nio/charset/Charset;)Lcom/google/common/io/CharSource;
|
||
|
|
||
|
move-result-object v0
|
||
|
|
||
|
invoke-virtual {v0}, Lcom/google/common/io/CharSource;->readFirstLine()Ljava/lang/String;
|
||
|
|
||
|
move-result-object v0
|
||
|
|
||
|
return-object v0
|
||
|
.end method
|
||
|
|
||
|
.method public static readLines(Ljava/io/File;Ljava/nio/charset/Charset;Lcom/google/common/io/LineProcessor;)Ljava/lang/Object;
|
||
|
.locals 1
|
||
|
.annotation system Ldalvik/annotation/Signature;
|
||
|
value = {
|
||
|
"<T:",
|
||
|
"Ljava/lang/Object;",
|
||
|
">(",
|
||
|
"Ljava/io/File;",
|
||
|
"Ljava/nio/charset/Charset;",
|
||
|
"Lcom/google/common/io/LineProcessor",
|
||
|
"<TT;>;)TT;"
|
||
|
}
|
||
|
.end annotation
|
||
|
|
||
|
.prologue
|
||
|
.line 741
|
||
|
invoke-static {p0, p1}, Lcom/google/common/io/Files;->newReaderSupplier(Ljava/io/File;Ljava/nio/charset/Charset;)Lcom/google/common/io/InputSupplier;
|
||
|
|
||
|
move-result-object v0
|
||
|
|
||
|
invoke-static {v0, p2}, Lcom/google/common/io/CharStreams;->readLines(Lcom/google/common/io/InputSupplier;Lcom/google/common/io/LineProcessor;)Ljava/lang/Object;
|
||
|
|
||
|
move-result-object v0
|
||
|
|
||
|
return-object v0
|
||
|
.end method
|
||
|
|
||
|
.method public static readLines(Ljava/io/File;Ljava/nio/charset/Charset;)Ljava/util/List;
|
||
|
.locals 1
|
||
|
.annotation system Ldalvik/annotation/Signature;
|
||
|
value = {
|
||
|
"(",
|
||
|
"Ljava/io/File;",
|
||
|
"Ljava/nio/charset/Charset;",
|
||
|
")",
|
||
|
"Ljava/util/List",
|
||
|
"<",
|
||
|
"Ljava/lang/String;",
|
||
|
">;"
|
||
|
}
|
||
|
.end annotation
|
||
|
|
||
|
.prologue
|
||
|
.line 712
|
||
|
new-instance v0, Lcom/google/common/io/Files$1;
|
||
|
|
||
|
invoke-direct {v0}, Lcom/google/common/io/Files$1;-><init>()V
|
||
|
|
||
|
invoke-static {p0, p1, v0}, Lcom/google/common/io/Files;->readLines(Ljava/io/File;Ljava/nio/charset/Charset;Lcom/google/common/io/LineProcessor;)Ljava/lang/Object;
|
||
|
|
||
|
move-result-object v0
|
||
|
|
||
|
check-cast v0, Ljava/util/List;
|
||
|
|
||
|
return-object v0
|
||
|
.end method
|
||
|
|
||
|
.method public static simplifyPath(Ljava/lang/String;)Ljava/lang/String;
|
||
|
.locals 5
|
||
|
|
||
|
.prologue
|
||
|
const/16 v4, 0x2f
|
||
|
|
||
|
.line 896
|
||
|
invoke-static {p0}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object;
|
||
|
|
||
|
.line 897
|
||
|
invoke-virtual {p0}, Ljava/lang/String;->length()I
|
||
|
|
||
|
move-result v0
|
||
|
|
||
|
if-nez v0, :cond_1
|
||
|
|
||
|
.line 898
|
||
|
const-string v0, "."
|
||
|
|
||
|
.line 936
|
||
|
:cond_0
|
||
|
:goto_0
|
||
|
return-object v0
|
||
|
|
||
|
.line 902
|
||
|
:cond_1
|
||
|
invoke-static {v4}, Lcom/google/common/base/Splitter;->on(C)Lcom/google/common/base/Splitter;
|
||
|
|
||
|
move-result-object v0
|
||
|
|
||
|
invoke-virtual {v0}, Lcom/google/common/base/Splitter;->omitEmptyStrings()Lcom/google/common/base/Splitter;
|
||
|
|
||
|
move-result-object v0
|
||
|
|
||
|
invoke-virtual {v0, p0}, Lcom/google/common/base/Splitter;->split(Ljava/lang/CharSequence;)Ljava/lang/Iterable;
|
||
|
|
||
|
move-result-object v0
|
||
|
|
||
|
.line 904
|
||
|
new-instance v1, Ljava/util/ArrayList;
|
||
|
|
||
|
invoke-direct {v1}, Ljava/util/ArrayList;-><init>()V
|
||
|
|
||
|
.line 907
|
||
|
invoke-interface {v0}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
|
||
|
|
||
|
move-result-object v2
|
||
|
|
||
|
:cond_2
|
||
|
:goto_1
|
||
|
invoke-interface {v2}, Ljava/util/Iterator;->hasNext()Z
|
||
|
|
||
|
move-result v0
|
||
|
|
||
|
if-eqz v0, :cond_5
|
||
|
|
||
|
invoke-interface {v2}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
||
|
|
||
|
move-result-object v0
|
||
|
|
||
|
check-cast v0, Ljava/lang/String;
|
||
|
|
||
|
.line 908
|
||
|
const-string v3, "."
|
||
|
|
||
|
invoke-virtual {v0, v3}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
||
|
|
||
|
move-result v3
|
||
|
|
||
|
if-nez v3, :cond_2
|
||
|
|
||
|
.line 910
|
||
|
const-string v3, ".."
|
||
|
|
||
|
invoke-virtual {v0, v3}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
||
|
|
||
|
move-result v3
|
||
|
|
||
|
if-eqz v3, :cond_4
|
||
|
|
||
|
.line 911
|
||
|
invoke-interface {v1}, Ljava/util/List;->size()I
|
||
|
|
||
|
move-result v0
|
||
|
|
||
|
if-lez v0, :cond_3
|
||
|
|
||
|
invoke-interface {v1}, Ljava/util/List;->size()I
|
||
|
|
||
|
move-result v0
|
||
|
|
||
|
add-int/lit8 v0, v0, -0x1
|
||
|
|
||
|
invoke-interface {v1, v0}, Ljava/util/List;->get(I)Ljava/lang/Object;
|
||
|
|
||
|
move-result-object v0
|
||
|
|
||
|
check-cast v0, Ljava/lang/String;
|
||
|
|
||
|
const-string v3, ".."
|
||
|
|
||
|
invoke-virtual {v0, v3}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
||
|
|
||
|
move-result v0
|
||
|
|
||
|
if-nez v0, :cond_3
|
||
|
|
||
|
.line 912
|
||
|
invoke-interface {v1}, Ljava/util/List;->size()I
|
||
|
|
||
|
move-result v0
|
||
|
|
||
|
add-int/lit8 v0, v0, -0x1
|
||
|
|
||
|
invoke-interface {v1, v0}, Ljava/util/List;->remove(I)Ljava/lang/Object;
|
||
|
|
||
|
goto :goto_1
|
||
|
|
||
|
.line 914
|
||
|
:cond_3
|
||
|
const-string v0, ".."
|
||
|
|
||
|
invoke-interface {v1, v0}, Ljava/util/List;->add(Ljava/lang/Object;)Z
|
||
|
|
||
|
goto :goto_1
|
||
|
|
||
|
.line 917
|
||
|
:cond_4
|
||
|
invoke-interface {v1, v0}, Ljava/util/List;->add(Ljava/lang/Object;)Z
|
||
|
|
||
|
goto :goto_1
|
||
|
|
||
|
.line 922
|
||
|
:cond_5
|
||
|
invoke-static {v4}, Lcom/google/common/base/Joiner;->on(C)Lcom/google/common/base/Joiner;
|
||
|
|
||
|
move-result-object v0
|
||
|
|
||
|
invoke-virtual {v0, v1}, Lcom/google/common/base/Joiner;->join(Ljava/lang/Iterable;)Ljava/lang/String;
|
||
|
|
||
|
move-result-object v0
|
||
|
|
||
|
.line 923
|
||
|
const/4 v1, 0x0
|
||
|
|
||
|
invoke-virtual {p0, v1}, Ljava/lang/String;->charAt(I)C
|
||
|
|
||
|
move-result v1
|
||
|
|
||
|
if-ne v1, v4, :cond_6
|
||
|
|
||
|
.line 924
|
||
|
new-instance v1, Ljava/lang/StringBuilder;
|
||
|
|
||
|
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
|
||
|
|
||
|
const-string v2, "/"
|
||
|
|
||
|
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
||
|
|
||
|
move-result-object v1
|
||
|
|
||
|
invoke-virtual {v1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
||
|
|
||
|
move-result-object v0
|
||
|
|
||
|
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
||
|
|
||
|
move-result-object v0
|
||
|
|
||
|
.line 927
|
||
|
:cond_6
|
||
|
:goto_2
|
||
|
const-string v1, "/../"
|
||
|
|
||
|
invoke-virtual {v0, v1}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z
|
||
|
|
||
|
move-result v1
|
||
|
|
||
|
if-eqz v1, :cond_7
|
||
|
|
||
|
.line 928
|
||
|
const/4 v1, 0x3
|
||
|
|
||
|
invoke-virtual {v0, v1}, Ljava/lang/String;->substring(I)Ljava/lang/String;
|
||
|
|
||
|
move-result-object v0
|
||
|
|
||
|
goto :goto_2
|
||
|
|
||
|
.line 930
|
||
|
:cond_7
|
||
|
const-string v1, "/.."
|
||
|
|
||
|
invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
||
|
|
||
|
move-result v1
|
||
|
|
||
|
if-eqz v1, :cond_8
|
||
|
|
||
|
.line 931
|
||
|
const-string v0, "/"
|
||
|
|
||
|
goto/16 :goto_0
|
||
|
|
||
|
.line 932
|
||
|
:cond_8
|
||
|
const-string v1, ""
|
||
|
|
||
|
invoke-virtual {v1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
||
|
|
||
|
move-result v1
|
||
|
|
||
|
if-eqz v1, :cond_0
|
||
|
|
||
|
.line 933
|
||
|
const-string v0, "."
|
||
|
|
||
|
goto/16 :goto_0
|
||
|
.end method
|
||
|
|
||
|
.method public static toByteArray(Ljava/io/File;)[B
|
||
|
.locals 1
|
||
|
|
||
|
.prologue
|
||
|
.line 353
|
||
|
invoke-static {p0}, Lcom/google/common/io/Files;->asByteSource(Ljava/io/File;)Lcom/google/common/io/ByteSource;
|
||
|
|
||
|
move-result-object v0
|
||
|
|
||
|
invoke-virtual {v0}, Lcom/google/common/io/ByteSource;->read()[B
|
||
|
|
||
|
move-result-object v0
|
||
|
|
||
|
return-object v0
|
||
|
.end method
|
||
|
|
||
|
.method public static toString(Ljava/io/File;Ljava/nio/charset/Charset;)Ljava/lang/String;
|
||
|
.locals 1
|
||
|
|
||
|
.prologue
|
||
|
.line 367
|
||
|
invoke-static {p0, p1}, Lcom/google/common/io/Files;->asCharSource(Ljava/io/File;Ljava/nio/charset/Charset;)Lcom/google/common/io/CharSource;
|
||
|
|
||
|
move-result-object v0
|
||
|
|
||
|
invoke-virtual {v0}, Lcom/google/common/io/CharSource;->read()Ljava/lang/String;
|
||
|
|
||
|
move-result-object v0
|
||
|
|
||
|
return-object v0
|
||
|
.end method
|
||
|
|
||
|
.method public static touch(Ljava/io/File;)V
|
||
|
.locals 3
|
||
|
|
||
|
.prologue
|
||
|
.line 613
|
||
|
invoke-static {p0}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object;
|
||
|
|
||
|
.line 614
|
||
|
invoke-virtual {p0}, Ljava/io/File;->createNewFile()Z
|
||
|
|
||
|
move-result v0
|
||
|
|
||
|
if-nez v0, :cond_0
|
||
|
|
||
|
invoke-static {}, Ljava/lang/System;->currentTimeMillis()J
|
||
|
|
||
|
move-result-wide v0
|
||
|
|
||
|
invoke-virtual {p0, v0, v1}, Ljava/io/File;->setLastModified(J)Z
|
||
|
|
||
|
move-result v0
|
||
|
|
||
|
if-nez v0, :cond_0
|
||
|
|
||
|
.line 616
|
||
|
new-instance v0, Ljava/io/IOException;
|
||
|
|
||
|
new-instance v1, Ljava/lang/StringBuilder;
|
||
|
|
||
|
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
|
||
|
|
||
|
const-string v2, "Unable to update modification time of "
|
||
|
|
||
|
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
||
|
|
||
|
move-result-object v1
|
||
|
|
||
|
invoke-virtual {v1, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
|
||
|
|
||
|
move-result-object v1
|
||
|
|
||
|
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
||
|
|
||
|
move-result-object v1
|
||
|
|
||
|
invoke-direct {v0, v1}, Ljava/io/IOException;-><init>(Ljava/lang/String;)V
|
||
|
|
||
|
throw v0
|
||
|
|
||
|
.line 618
|
||
|
:cond_0
|
||
|
return-void
|
||
|
.end method
|
||
|
|
||
|
.method public static write(Ljava/lang/CharSequence;Ljava/io/File;Ljava/nio/charset/Charset;)V
|
||
|
.locals 1
|
||
|
|
||
|
.prologue
|
||
|
.line 477
|
||
|
const/4 v0, 0x0
|
||
|
|
||
|
new-array v0, v0, [Lcom/google/common/io/FileWriteMode;
|
||
|
|
||
|
invoke-static {p1, p2, v0}, Lcom/google/common/io/Files;->asCharSink(Ljava/io/File;Ljava/nio/charset/Charset;[Lcom/google/common/io/FileWriteMode;)Lcom/google/common/io/CharSink;
|
||
|
|
||
|
move-result-object v0
|
||
|
|
||
|
invoke-virtual {v0, p0}, Lcom/google/common/io/CharSink;->write(Ljava/lang/CharSequence;)V
|
||
|
|
||
|
.line 478
|
||
|
return-void
|
||
|
.end method
|
||
|
|
||
|
.method private static write(Ljava/lang/CharSequence;Ljava/io/File;Ljava/nio/charset/Charset;Z)V
|
||
|
.locals 1
|
||
|
|
||
|
.prologue
|
||
|
.line 508
|
||
|
invoke-static {p3}, Lcom/google/common/io/Files;->modes(Z)[Lcom/google/common/io/FileWriteMode;
|
||
|
|
||
|
move-result-object v0
|
||
|
|
||
|
invoke-static {p1, p2, v0}, Lcom/google/common/io/Files;->asCharSink(Ljava/io/File;Ljava/nio/charset/Charset;[Lcom/google/common/io/FileWriteMode;)Lcom/google/common/io/CharSink;
|
||
|
|
||
|
move-result-object v0
|
||
|
|
||
|
invoke-virtual {v0, p0}, Lcom/google/common/io/CharSink;->write(Ljava/lang/CharSequence;)V
|
||
|
|
||
|
.line 509
|
||
|
return-void
|
||
|
.end method
|
||
|
|
||
|
.method public static write([BLjava/io/File;)V
|
||
|
.locals 1
|
||
|
|
||
|
.prologue
|
||
|
.line 395
|
||
|
const/4 v0, 0x0
|
||
|
|
||
|
new-array v0, v0, [Lcom/google/common/io/FileWriteMode;
|
||
|
|
||
|
invoke-static {p1, v0}, Lcom/google/common/io/Files;->asByteSink(Ljava/io/File;[Lcom/google/common/io/FileWriteMode;)Lcom/google/common/io/ByteSink;
|
||
|
|
||
|
move-result-object v0
|
||
|
|
||
|
invoke-virtual {v0, p0}, Lcom/google/common/io/ByteSink;->write([B)V
|
||
|
|
||
|
.line 396
|
||
|
return-void
|
||
|
.end method
|