.class public final Lcom/loc/bk; .super Ljava/lang/Object; .source "Util.java" # static fields .field public static final a:Ljava/nio/charset/Charset; .field static final b:Ljava/nio/charset/Charset; # direct methods .method static constructor ()V .locals 1 const-string v0, "US-ASCII" invoke-static {v0}, Ljava/nio/charset/Charset;->forName(Ljava/lang/String;)Ljava/nio/charset/Charset; move-result-object v0 sput-object v0, Lcom/loc/bk;->a:Ljava/nio/charset/Charset; const-string v0, "UTF-8" invoke-static {v0}, Ljava/nio/charset/Charset;->forName(Ljava/lang/String;)Ljava/nio/charset/Charset; move-result-object v0 sput-object v0, Lcom/loc/bk;->b:Ljava/nio/charset/Charset; return-void .end method .method static a(Ljava/io/Closeable;)V .locals 0 if-eqz p0, :cond_0 :try_start_0 invoke-interface {p0}, Ljava/io/Closeable;->close()V :try_end_0 .catch Ljava/lang/RuntimeException; {:try_start_0 .. :try_end_0} :catch_0 .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_1 return-void :catch_0 move-exception p0 throw p0 :catch_1 :cond_0 return-void .end method .method static a(Ljava/io/File;)V .locals 4 .annotation system Ldalvik/annotation/Throws; value = { Ljava/io/IOException; } .end annotation invoke-virtual {p0}, Ljava/io/File;->listFiles()[Ljava/io/File; move-result-object v0 if-eqz v0, :cond_3 array-length p0, v0 const/4 v1, 0x0 :goto_0 if-ge v1, p0, :cond_2 aget-object v2, v0, v1 invoke-virtual {v2}, Ljava/io/File;->isDirectory()Z move-result v3 if-eqz v3, :cond_0 invoke-static {v2}, Lcom/loc/bk;->a(Ljava/io/File;)V :cond_0 invoke-virtual {v2}, Ljava/io/File;->delete()Z move-result v3 if-eqz v3, :cond_1 add-int/lit8 v1, v1, 0x1 goto :goto_0 :cond_1 new-instance p0, Ljava/io/IOException; new-instance v0, Ljava/lang/StringBuilder; const-string v1, "failed to delete file: " invoke-direct {v0, v1}, Ljava/lang/StringBuilder;->(Ljava/lang/String;)V invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder; invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; move-result-object v0 invoke-direct {p0, v0}, Ljava/io/IOException;->(Ljava/lang/String;)V throw p0 :cond_2 return-void :cond_3 new-instance v0, Ljava/io/IOException; new-instance v1, Ljava/lang/StringBuilder; const-string v2, "not a readable directory: " invoke-direct {v1, v2}, Ljava/lang/StringBuilder;->(Ljava/lang/String;)V invoke-virtual {v1, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder; invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; move-result-object p0 invoke-direct {v0, p0}, Ljava/io/IOException;->(Ljava/lang/String;)V throw v0 .end method