Closeables.smali
.class public final Lcom/facebook/common/internal/Closeables;
.super Ljava/lang/Object;
.source "SourceFile"
# static fields
.field public static final logger:Ljava/util/logging/Logger;
.annotation build Lcom/facebook/common/internal/VisibleForTesting;
.end annotation
.end field
# direct methods
.method public static constructor <clinit>()V
.registers 1
.line 1
const-class v0, Lcom/facebook/common/internal/Closeables;
.line 2
invoke-virtual {v0}, Ljava/lang/Class;->getName()Ljava/lang/String;
move-result-object v0
invoke-static {v0}, Ljava/util/logging/Logger;->getLogger(Ljava/lang/String;)Ljava/util/logging/Logger;
move-result-object v0
sput-object v0, Lcom/facebook/common/internal/Closeables;->logger:Ljava/util/logging/Logger;
return-void
.end method
.method private constructor <init>()V
.registers 1
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
.method public static close(Ljava/io/Closeable;Z)V
.registers 4
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
if-nez p0, :cond_3
return-void
.line 1
:cond_3
:try_start_3
invoke-interface {p0}, Ljava/io/Closeable;->close()V
:try_end_6
.catch Ljava/io/IOException; {:try_start_3 .. :try_end_6} :catch_7
goto :goto_13
:catch_7
move-exception p0
if-eqz p1, :cond_14
.line 2
sget-object p1, Lcom/facebook/common/internal/Closeables;->logger:Ljava/util/logging/Logger;
sget-object v0, Ljava/util/logging/Level;->WARNING:Ljava/util/logging/Level;
const-string v1, "IOException thrown while closing Closeable."
invoke-virtual {p1, v0, v1, p0}, Ljava/util/logging/Logger;->log(Ljava/util/logging/Level;Ljava/lang/String;Ljava/lang/Throwable;)V
:goto_13
return-void
.line 3
:cond_14
throw p0
.end method
.method public static closeQuietly(Ljava/io/InputStream;)V
.registers 2
const/4 v0, 0x1
.line 1
:try_start_1
invoke-static {p0, v0}, Lcom/facebook/common/internal/Closeables;->close(Ljava/io/Closeable;Z)V
:try_end_4
.catch Ljava/io/IOException; {:try_start_1 .. :try_end_4} :catch_5
return-void
:catch_5
move-exception p0
.line 2
new-instance v0, Ljava/lang/AssertionError;
invoke-direct {v0, p0}, Ljava/lang/AssertionError;-><init>(Ljava/lang/Object;)V
throw v0
.end method
.method public static closeQuietly(Ljava/io/Reader;)V
.registers 2
const/4 v0, 0x1
.line 3
:try_start_1
invoke-static {p0, v0}, Lcom/facebook/common/internal/Closeables;->close(Ljava/io/Closeable;Z)V
:try_end_4
.catch Ljava/io/IOException; {:try_start_1 .. :try_end_4} :catch_5
return-void
:catch_5
move-exception p0
.line 4
new-instance v0, Ljava/lang/AssertionError;
invoke-direct {v0, p0}, Ljava/lang/AssertionError;-><init>(Ljava/lang/Object;)V
throw v0
.end method