156 lines
		
	
	
		
			4.2 KiB
		
	
	
	
		
			Smali
		
	
	
	
	
	
			
		
		
	
	
			156 lines
		
	
	
		
			4.2 KiB
		
	
	
	
		
			Smali
		
	
	
	
	
	
.class final Lcom/google/common/io/Files$FileByteSink;
 | 
						|
.super Lcom/google/common/io/ByteSink;
 | 
						|
.source "Files.java"
 | 
						|
 | 
						|
 | 
						|
# annotations
 | 
						|
.annotation system Ldalvik/annotation/EnclosingClass;
 | 
						|
    value = Lcom/google/common/io/Files;
 | 
						|
.end annotation
 | 
						|
 | 
						|
.annotation system Ldalvik/annotation/InnerClass;
 | 
						|
    accessFlags = 0x19
 | 
						|
    name = "FileByteSink"
 | 
						|
.end annotation
 | 
						|
 | 
						|
 | 
						|
# instance fields
 | 
						|
.field private final file:Ljava/io/File;
 | 
						|
 | 
						|
.field private final modes:Lcom/google/common/collect/ImmutableSet;
 | 
						|
    .annotation system Ldalvik/annotation/Signature;
 | 
						|
        value = {
 | 
						|
            "Lcom/google/common/collect/ImmutableSet<",
 | 
						|
            "Lcom/google/common/io/FileWriteMode;",
 | 
						|
            ">;"
 | 
						|
        }
 | 
						|
    .end annotation
 | 
						|
.end field
 | 
						|
 | 
						|
 | 
						|
# direct methods
 | 
						|
.method private varargs constructor <init>(Ljava/io/File;[Lcom/google/common/io/FileWriteMode;)V
 | 
						|
    .locals 0
 | 
						|
 | 
						|
    .line 2
 | 
						|
    invoke-direct {p0}, Lcom/google/common/io/ByteSink;-><init>()V
 | 
						|
 | 
						|
    .line 3
 | 
						|
    invoke-static {p1}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object;
 | 
						|
 | 
						|
    move-result-object p1
 | 
						|
 | 
						|
    check-cast p1, Ljava/io/File;
 | 
						|
 | 
						|
    iput-object p1, p0, Lcom/google/common/io/Files$FileByteSink;->file:Ljava/io/File;
 | 
						|
 | 
						|
    .line 4
 | 
						|
    invoke-static {p2}, Lcom/google/common/collect/ImmutableSet;->copyOf([Ljava/lang/Object;)Lcom/google/common/collect/ImmutableSet;
 | 
						|
 | 
						|
    move-result-object p1
 | 
						|
 | 
						|
    iput-object p1, p0, Lcom/google/common/io/Files$FileByteSink;->modes:Lcom/google/common/collect/ImmutableSet;
 | 
						|
 | 
						|
    return-void
 | 
						|
.end method
 | 
						|
 | 
						|
.method public synthetic constructor <init>(Ljava/io/File;[Lcom/google/common/io/FileWriteMode;Lcom/google/common/io/Files$1;)V
 | 
						|
    .locals 0
 | 
						|
 | 
						|
    .line 1
 | 
						|
    invoke-direct {p0, p1, p2}, Lcom/google/common/io/Files$FileByteSink;-><init>(Ljava/io/File;[Lcom/google/common/io/FileWriteMode;)V
 | 
						|
 | 
						|
    return-void
 | 
						|
.end method
 | 
						|
 | 
						|
 | 
						|
# virtual methods
 | 
						|
.method public openStream()Ljava/io/FileOutputStream;
 | 
						|
    .locals 4
 | 
						|
    .annotation system Ldalvik/annotation/Throws;
 | 
						|
        value = {
 | 
						|
            Ljava/io/IOException;
 | 
						|
        }
 | 
						|
    .end annotation
 | 
						|
 | 
						|
    .line 2
 | 
						|
    new-instance v0, Ljava/io/FileOutputStream;
 | 
						|
 | 
						|
    iget-object v1, p0, Lcom/google/common/io/Files$FileByteSink;->file:Ljava/io/File;
 | 
						|
 | 
						|
    iget-object v2, p0, Lcom/google/common/io/Files$FileByteSink;->modes:Lcom/google/common/collect/ImmutableSet;
 | 
						|
 | 
						|
    sget-object v3, Lcom/google/common/io/FileWriteMode;->APPEND:Lcom/google/common/io/FileWriteMode;
 | 
						|
 | 
						|
    invoke-virtual {v2, v3}, Lcom/google/common/collect/ImmutableCollection;->contains(Ljava/lang/Object;)Z
 | 
						|
 | 
						|
    move-result v2
 | 
						|
 | 
						|
    invoke-direct {v0, v1, v2}, Ljava/io/FileOutputStream;-><init>(Ljava/io/File;Z)V
 | 
						|
 | 
						|
    return-object v0
 | 
						|
.end method
 | 
						|
 | 
						|
.method public bridge synthetic openStream()Ljava/io/OutputStream;
 | 
						|
    .locals 1
 | 
						|
    .annotation system Ldalvik/annotation/Throws;
 | 
						|
        value = {
 | 
						|
            Ljava/io/IOException;
 | 
						|
        }
 | 
						|
    .end annotation
 | 
						|
 | 
						|
    .line 1
 | 
						|
    invoke-virtual {p0}, Lcom/google/common/io/Files$FileByteSink;->openStream()Ljava/io/FileOutputStream;
 | 
						|
 | 
						|
    move-result-object v0
 | 
						|
 | 
						|
    return-object v0
 | 
						|
.end method
 | 
						|
 | 
						|
.method public toString()Ljava/lang/String;
 | 
						|
    .locals 5
 | 
						|
 | 
						|
    .line 1
 | 
						|
    iget-object v0, p0, Lcom/google/common/io/Files$FileByteSink;->file:Ljava/io/File;
 | 
						|
 | 
						|
    invoke-static {v0}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;
 | 
						|
 | 
						|
    move-result-object v0
 | 
						|
 | 
						|
    iget-object v1, p0, Lcom/google/common/io/Files$FileByteSink;->modes:Lcom/google/common/collect/ImmutableSet;
 | 
						|
 | 
						|
    invoke-static {v1}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;
 | 
						|
 | 
						|
    move-result-object v1
 | 
						|
 | 
						|
    invoke-virtual {v0}, Ljava/lang/String;->length()I
 | 
						|
 | 
						|
    move-result v2
 | 
						|
 | 
						|
    add-int/lit8 v2, v2, 0x14
 | 
						|
 | 
						|
    invoke-virtual {v1}, Ljava/lang/String;->length()I
 | 
						|
 | 
						|
    move-result v3
 | 
						|
 | 
						|
    add-int/2addr v3, v2
 | 
						|
 | 
						|
    const-string v2, "Files.asByteSink("
 | 
						|
 | 
						|
    const-string v4, ", "
 | 
						|
 | 
						|
    invoke-static {v3, v2, v0, v4, v1}, Lcom/google/ads/mediation/a;->a(ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/StringBuilder;
 | 
						|
 | 
						|
    move-result-object v0
 | 
						|
 | 
						|
    const-string v1, ")"
 | 
						|
 | 
						|
    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
 | 
						|
 | 
						|
    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
 | 
						|
 | 
						|
    move-result-object v0
 | 
						|
 | 
						|
    return-object v0
 | 
						|
.end method
 |