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

236 lines
5.5 KiB

.class public abstract Lcom/google/common/io/ByteSink;
.super Ljava/lang/Object;
.source "ByteSink.java"
# interfaces
.implements Lcom/google/common/io/OutputSupplier;
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Lcom/google/common/io/ByteSink$1;,
Lcom/google/common/io/ByteSink$AsCharSink;
}
.end annotation
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/lang/Object;",
"Lcom/google/common/io/OutputSupplier",
"<",
"Ljava/io/OutputStream;",
">;"
}
.end annotation
# direct methods
.method protected constructor <init>()V
.locals 0
.prologue
.line 52
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
# virtual methods
.method public asCharSink(Ljava/nio/charset/Charset;)Lcom/google/common/io/CharSink;
.locals 2
.prologue
.line 59
new-instance v0, Lcom/google/common/io/ByteSink$AsCharSink;
const/4 v1, 0x0
invoke-direct {v0, p0, p1, v1}, Lcom/google/common/io/ByteSink$AsCharSink;-><init>(Lcom/google/common/io/ByteSink;Ljava/nio/charset/Charset;Lcom/google/common/io/ByteSink$1;)V
return-object v0
.end method
.method public final getOutput()Ljava/io/OutputStream;
.locals 1
.annotation runtime Ljava/lang/Deprecated;
.end annotation
.prologue
.line 84
invoke-virtual {p0}, Lcom/google/common/io/ByteSink;->openStream()Ljava/io/OutputStream;
move-result-object v0
return-object v0
.end method
.method public bridge synthetic getOutput()Ljava/lang/Object;
.locals 1
.prologue
.line 47
invoke-virtual {p0}, Lcom/google/common/io/ByteSink;->getOutput()Ljava/io/OutputStream;
move-result-object v0
return-object v0
.end method
.method public openBufferedStream()Ljava/io/OutputStream;
.locals 2
.prologue
.line 100
invoke-virtual {p0}, Lcom/google/common/io/ByteSink;->openStream()Ljava/io/OutputStream;
move-result-object v0
.line 101
instance-of v1, v0, Ljava/io/BufferedOutputStream;
if-eqz v1, :cond_0
check-cast v0, Ljava/io/BufferedOutputStream;
:goto_0
return-object v0
:cond_0
new-instance v1, Ljava/io/BufferedOutputStream;
invoke-direct {v1, v0}, Ljava/io/BufferedOutputStream;-><init>(Ljava/io/OutputStream;)V
move-object v0, v1
goto :goto_0
.end method
.method public abstract openStream()Ljava/io/OutputStream;
.end method
.method public write([B)V
.locals 2
.prologue
.line 112
invoke-static {p1}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object;
.line 114
invoke-static {}, Lcom/google/common/io/Closer;->create()Lcom/google/common/io/Closer;
move-result-object v1
.line 116
:try_start_0
invoke-virtual {p0}, Lcom/google/common/io/ByteSink;->openStream()Ljava/io/OutputStream;
move-result-object v0
invoke-virtual {v1, v0}, Lcom/google/common/io/Closer;->register(Ljava/io/Closeable;)Ljava/io/Closeable;
move-result-object v0
check-cast v0, Ljava/io/OutputStream;
.line 117
invoke-virtual {v0, p1}, Ljava/io/OutputStream;->write([B)V
.line 118
invoke-virtual {v0}, Ljava/io/OutputStream;->flush()V
:try_end_0
.catch Ljava/lang/Throwable; {:try_start_0 .. :try_end_0} :catch_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
.line 122
invoke-virtual {v1}, Lcom/google/common/io/Closer;->close()V
.line 124
return-void
.line 119
:catch_0
move-exception v0
.line 120
:try_start_1
invoke-virtual {v1, 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 122
:catchall_0
move-exception v0
invoke-virtual {v1}, Lcom/google/common/io/Closer;->close()V
throw v0
.end method
.method public writeFrom(Ljava/io/InputStream;)J
.locals 4
.prologue
.line 134
invoke-static {p1}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object;
.line 136
invoke-static {}, Lcom/google/common/io/Closer;->create()Lcom/google/common/io/Closer;
move-result-object v1
.line 138
:try_start_0
invoke-virtual {p0}, Lcom/google/common/io/ByteSink;->openStream()Ljava/io/OutputStream;
move-result-object v0
invoke-virtual {v1, v0}, Lcom/google/common/io/Closer;->register(Ljava/io/Closeable;)Ljava/io/Closeable;
move-result-object v0
check-cast v0, Ljava/io/OutputStream;
.line 139
invoke-static {p1, v0}, Lcom/google/common/io/ByteStreams;->copy(Ljava/io/InputStream;Ljava/io/OutputStream;)J
move-result-wide v2
.line 140
invoke-virtual {v0}, Ljava/io/OutputStream;->flush()V
:try_end_0
.catch Ljava/lang/Throwable; {:try_start_0 .. :try_end_0} :catch_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
.line 145
invoke-virtual {v1}, Lcom/google/common/io/Closer;->close()V
return-wide v2
.line 142
:catch_0
move-exception v0
.line 143
:try_start_1
invoke-virtual {v1, 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 145
:catchall_0
move-exception v0
invoke-virtual {v1}, Lcom/google/common/io/Closer;->close()V
throw v0
.end method