今奥全景相机
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.

156 lines
3.4 KiB

.class public final Lcom/google/common/io/Closeables;
.super Ljava/lang/Object;
.source "Closeables.java"
# annotations
.annotation build Lcom/google/common/annotations/Beta;
.end annotation
# static fields
.field static final logger:Ljava/util/logging/Logger;
.annotation build Lcom/google/common/annotations/VisibleForTesting;
.end annotation
.end field
# direct methods
.method static constructor <clinit>()V
.locals 1
.prologue
.line 39
const-class v0, Lcom/google/common/io/Closeables;
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/google/common/io/Closeables;->logger:Ljava/util/logging/Logger;
return-void
.end method
.method private constructor <init>()V
.locals 0
.prologue
.line 42
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
.method public static close(Ljava/io/Closeable;Z)V
.locals 4
.param p0 # Ljava/io/Closeable;
.annotation runtime Ljavax/annotation/Nullable;
.end annotation
.end param
.prologue
.line 75
if-nez p0, :cond_0
.line 88
:goto_0
return-void
.line 79
:cond_0
:try_start_0
invoke-interface {p0}, Ljava/io/Closeable;->close()V
:try_end_0
.catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0
goto :goto_0
.line 80
:catch_0
move-exception v0
.line 81
if-eqz p1, :cond_1
.line 82
sget-object v1, Lcom/google/common/io/Closeables;->logger:Ljava/util/logging/Logger;
sget-object v2, Ljava/util/logging/Level;->WARNING:Ljava/util/logging/Level;
const-string v3, "IOException thrown while closing Closeable."
invoke-virtual {v1, v2, v3, v0}, Ljava/util/logging/Logger;->log(Ljava/util/logging/Level;Ljava/lang/String;Ljava/lang/Throwable;)V
goto :goto_0
.line 85
:cond_1
throw v0
.end method
.method public static closeQuietly(Ljava/io/InputStream;)V
.locals 2
.param p0 # Ljava/io/InputStream;
.annotation runtime Ljavax/annotation/Nullable;
.end annotation
.end param
.prologue
.line 106
const/4 v0, 0x1
:try_start_0
invoke-static {p0, v0}, Lcom/google/common/io/Closeables;->close(Ljava/io/Closeable;Z)V
:try_end_0
.catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0
.line 110
return-void
.line 107
:catch_0
move-exception v0
.line 108
new-instance v1, Ljava/lang/AssertionError;
invoke-direct {v1, v0}, Ljava/lang/AssertionError;-><init>(Ljava/lang/Object;)V
throw v1
.end method
.method public static closeQuietly(Ljava/io/Reader;)V
.locals 2
.param p0 # Ljava/io/Reader;
.annotation runtime Ljavax/annotation/Nullable;
.end annotation
.end param
.prologue
.line 127
const/4 v0, 0x1
:try_start_0
invoke-static {p0, v0}, Lcom/google/common/io/Closeables;->close(Ljava/io/Closeable;Z)V
:try_end_0
.catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0
.line 131
return-void
.line 128
:catch_0
move-exception v0
.line 129
new-instance v1, Ljava/lang/AssertionError;
invoke-direct {v1, v0}, Ljava/lang/AssertionError;-><init>(Ljava/lang/Object;)V
throw v1
.end method