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.
664 lines
16 KiB
664 lines
16 KiB
.class public abstract Lcom/google/common/io/CharSource; |
|
.super Ljava/lang/Object; |
|
.source "CharSource.java" |
|
|
|
# interfaces |
|
.implements Lcom/google/common/io/InputSupplier; |
|
|
|
|
|
# annotations |
|
.annotation system Ldalvik/annotation/MemberClasses; |
|
value = { |
|
Lcom/google/common/io/CharSource$ConcatenatedCharSource;, |
|
Lcom/google/common/io/CharSource$EmptyCharSource;, |
|
Lcom/google/common/io/CharSource$CharSequenceCharSource; |
|
} |
|
.end annotation |
|
|
|
.annotation system Ldalvik/annotation/Signature; |
|
value = { |
|
"Ljava/lang/Object;", |
|
"Lcom/google/common/io/InputSupplier", |
|
"<", |
|
"Ljava/io/Reader;", |
|
">;" |
|
} |
|
.end annotation |
|
|
|
|
|
# direct methods |
|
.method protected constructor <init>()V |
|
.locals 0 |
|
|
|
.prologue |
|
.line 70 |
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V |
|
|
|
return-void |
|
.end method |
|
|
|
.method public static concat(Ljava/lang/Iterable;)Lcom/google/common/io/CharSource; |
|
.locals 1 |
|
.annotation system Ldalvik/annotation/Signature; |
|
value = { |
|
"(", |
|
"Ljava/lang/Iterable", |
|
"<+", |
|
"Lcom/google/common/io/CharSource;", |
|
">;)", |
|
"Lcom/google/common/io/CharSource;" |
|
} |
|
.end annotation |
|
|
|
.prologue |
|
.line 279 |
|
new-instance v0, Lcom/google/common/io/CharSource$ConcatenatedCharSource; |
|
|
|
invoke-direct {v0, p0}, Lcom/google/common/io/CharSource$ConcatenatedCharSource;-><init>(Ljava/lang/Iterable;)V |
|
|
|
return-object v0 |
|
.end method |
|
|
|
.method public static concat(Ljava/util/Iterator;)Lcom/google/common/io/CharSource; |
|
.locals 1 |
|
.annotation system Ldalvik/annotation/Signature; |
|
value = { |
|
"(", |
|
"Ljava/util/Iterator", |
|
"<+", |
|
"Lcom/google/common/io/CharSource;", |
|
">;)", |
|
"Lcom/google/common/io/CharSource;" |
|
} |
|
.end annotation |
|
|
|
.prologue |
|
.line 301 |
|
invoke-static {p0}, Lcom/google/common/collect/ImmutableList;->copyOf(Ljava/util/Iterator;)Lcom/google/common/collect/ImmutableList; |
|
|
|
move-result-object v0 |
|
|
|
invoke-static {v0}, Lcom/google/common/io/CharSource;->concat(Ljava/lang/Iterable;)Lcom/google/common/io/CharSource; |
|
|
|
move-result-object v0 |
|
|
|
return-object v0 |
|
.end method |
|
|
|
.method public static varargs concat([Lcom/google/common/io/CharSource;)Lcom/google/common/io/CharSource; |
|
.locals 1 |
|
|
|
.prologue |
|
.line 317 |
|
invoke-static {p0}, Lcom/google/common/collect/ImmutableList;->copyOf([Ljava/lang/Object;)Lcom/google/common/collect/ImmutableList; |
|
|
|
move-result-object v0 |
|
|
|
invoke-static {v0}, Lcom/google/common/io/CharSource;->concat(Ljava/lang/Iterable;)Lcom/google/common/io/CharSource; |
|
|
|
move-result-object v0 |
|
|
|
return-object v0 |
|
.end method |
|
|
|
.method public static empty()Lcom/google/common/io/CharSource; |
|
.locals 1 |
|
|
|
.prologue |
|
.line 337 |
|
invoke-static {}, Lcom/google/common/io/CharSource$EmptyCharSource;->access$000()Lcom/google/common/io/CharSource$EmptyCharSource; |
|
|
|
move-result-object v0 |
|
|
|
return-object v0 |
|
.end method |
|
|
|
.method public static wrap(Ljava/lang/CharSequence;)Lcom/google/common/io/CharSource; |
|
.locals 1 |
|
|
|
.prologue |
|
.line 328 |
|
new-instance v0, Lcom/google/common/io/CharSource$CharSequenceCharSource; |
|
|
|
invoke-direct {v0, p0}, Lcom/google/common/io/CharSource$CharSequenceCharSource;-><init>(Ljava/lang/CharSequence;)V |
|
|
|
return-object v0 |
|
.end method |
|
|
|
|
|
# virtual methods |
|
.method public copyTo(Lcom/google/common/io/CharSink;)J |
|
.locals 3 |
|
|
|
.prologue |
|
.line 140 |
|
invoke-static {p1}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object; |
|
|
|
.line 142 |
|
invoke-static {}, Lcom/google/common/io/Closer;->create()Lcom/google/common/io/Closer; |
|
|
|
move-result-object v2 |
|
|
|
.line 144 |
|
:try_start_0 |
|
invoke-virtual {p0}, Lcom/google/common/io/CharSource;->openStream()Ljava/io/Reader; |
|
|
|
move-result-object v0 |
|
|
|
invoke-virtual {v2, v0}, Lcom/google/common/io/Closer;->register(Ljava/io/Closeable;)Ljava/io/Closeable; |
|
|
|
move-result-object v0 |
|
|
|
check-cast v0, Ljava/io/Reader; |
|
|
|
.line 145 |
|
invoke-virtual {p1}, Lcom/google/common/io/CharSink;->openStream()Ljava/io/Writer; |
|
|
|
move-result-object v1 |
|
|
|
invoke-virtual {v2, v1}, Lcom/google/common/io/Closer;->register(Ljava/io/Closeable;)Ljava/io/Closeable; |
|
|
|
move-result-object v1 |
|
|
|
check-cast v1, Ljava/io/Writer; |
|
|
|
.line 146 |
|
invoke-static {v0, v1}, Lcom/google/common/io/CharStreams;->copy(Ljava/lang/Readable;Ljava/lang/Appendable;)J |
|
:try_end_0 |
|
.catch Ljava/lang/Throwable; {:try_start_0 .. :try_end_0} :catch_0 |
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0 |
|
|
|
move-result-wide v0 |
|
|
|
.line 150 |
|
invoke-virtual {v2}, Lcom/google/common/io/Closer;->close()V |
|
|
|
return-wide v0 |
|
|
|
.line 147 |
|
:catch_0 |
|
move-exception v0 |
|
|
|
.line 148 |
|
:try_start_1 |
|
invoke-virtual {v2, 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 150 |
|
:catchall_0 |
|
move-exception v0 |
|
|
|
invoke-virtual {v2}, Lcom/google/common/io/Closer;->close()V |
|
|
|
throw v0 |
|
.end method |
|
|
|
.method public copyTo(Ljava/lang/Appendable;)J |
|
.locals 4 |
|
|
|
.prologue |
|
.line 120 |
|
invoke-static {p1}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object; |
|
|
|
.line 122 |
|
invoke-static {}, Lcom/google/common/io/Closer;->create()Lcom/google/common/io/Closer; |
|
|
|
move-result-object v1 |
|
|
|
.line 124 |
|
:try_start_0 |
|
invoke-virtual {p0}, Lcom/google/common/io/CharSource;->openStream()Ljava/io/Reader; |
|
|
|
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/Reader; |
|
|
|
.line 125 |
|
invoke-static {v0, p1}, Lcom/google/common/io/CharStreams;->copy(Ljava/lang/Readable;Ljava/lang/Appendable;)J |
|
:try_end_0 |
|
.catch Ljava/lang/Throwable; {:try_start_0 .. :try_end_0} :catch_0 |
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0 |
|
|
|
move-result-wide v2 |
|
|
|
.line 129 |
|
invoke-virtual {v1}, Lcom/google/common/io/Closer;->close()V |
|
|
|
return-wide v2 |
|
|
|
.line 126 |
|
:catch_0 |
|
move-exception v0 |
|
|
|
.line 127 |
|
: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 129 |
|
:catchall_0 |
|
move-exception v0 |
|
|
|
invoke-virtual {v1}, Lcom/google/common/io/Closer;->close()V |
|
|
|
throw v0 |
|
.end method |
|
|
|
.method public final getInput()Ljava/io/Reader; |
|
.locals 1 |
|
.annotation runtime Ljava/lang/Deprecated; |
|
.end annotation |
|
|
|
.prologue |
|
.line 94 |
|
invoke-virtual {p0}, Lcom/google/common/io/CharSource;->openStream()Ljava/io/Reader; |
|
|
|
move-result-object v0 |
|
|
|
return-object v0 |
|
.end method |
|
|
|
.method public bridge synthetic getInput()Ljava/lang/Object; |
|
.locals 1 |
|
|
|
.prologue |
|
.line 65 |
|
invoke-virtual {p0}, Lcom/google/common/io/CharSource;->getInput()Ljava/io/Reader; |
|
|
|
move-result-object v0 |
|
|
|
return-object v0 |
|
.end method |
|
|
|
.method public isEmpty()Z |
|
.locals 3 |
|
|
|
.prologue |
|
.line 256 |
|
invoke-static {}, Lcom/google/common/io/Closer;->create()Lcom/google/common/io/Closer; |
|
|
|
move-result-object v1 |
|
|
|
.line 258 |
|
:try_start_0 |
|
invoke-virtual {p0}, Lcom/google/common/io/CharSource;->openStream()Ljava/io/Reader; |
|
|
|
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/Reader; |
|
|
|
.line 259 |
|
invoke-virtual {v0}, Ljava/io/Reader;->read()I |
|
:try_end_0 |
|
.catch Ljava/lang/Throwable; {:try_start_0 .. :try_end_0} :catch_0 |
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0 |
|
|
|
move-result v0 |
|
|
|
const/4 v2, -0x1 |
|
|
|
if-ne v0, v2, :cond_0 |
|
|
|
const/4 v0, 0x1 |
|
|
|
.line 263 |
|
:goto_0 |
|
invoke-virtual {v1}, Lcom/google/common/io/Closer;->close()V |
|
|
|
return v0 |
|
|
|
.line 259 |
|
:cond_0 |
|
const/4 v0, 0x0 |
|
|
|
goto :goto_0 |
|
|
|
.line 260 |
|
:catch_0 |
|
move-exception v0 |
|
|
|
.line 261 |
|
: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 263 |
|
:catchall_0 |
|
move-exception v0 |
|
|
|
invoke-virtual {v1}, Lcom/google/common/io/Closer;->close()V |
|
|
|
throw v0 |
|
.end method |
|
|
|
.method public openBufferedStream()Ljava/io/BufferedReader; |
|
.locals 2 |
|
|
|
.prologue |
|
.line 106 |
|
invoke-virtual {p0}, Lcom/google/common/io/CharSource;->openStream()Ljava/io/Reader; |
|
|
|
move-result-object v0 |
|
|
|
.line 107 |
|
instance-of v1, v0, Ljava/io/BufferedReader; |
|
|
|
if-eqz v1, :cond_0 |
|
|
|
check-cast v0, Ljava/io/BufferedReader; |
|
|
|
:goto_0 |
|
return-object v0 |
|
|
|
:cond_0 |
|
new-instance v1, Ljava/io/BufferedReader; |
|
|
|
invoke-direct {v1, v0}, Ljava/io/BufferedReader;-><init>(Ljava/io/Reader;)V |
|
|
|
move-object v0, v1 |
|
|
|
goto :goto_0 |
|
.end method |
|
|
|
.method public abstract openStream()Ljava/io/Reader; |
|
.end method |
|
|
|
.method public read()Ljava/lang/String; |
|
.locals 2 |
|
|
|
.prologue |
|
.line 160 |
|
invoke-static {}, Lcom/google/common/io/Closer;->create()Lcom/google/common/io/Closer; |
|
|
|
move-result-object v1 |
|
|
|
.line 162 |
|
:try_start_0 |
|
invoke-virtual {p0}, Lcom/google/common/io/CharSource;->openStream()Ljava/io/Reader; |
|
|
|
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/Reader; |
|
|
|
.line 163 |
|
invoke-static {v0}, Lcom/google/common/io/CharStreams;->toString(Ljava/lang/Readable;)Ljava/lang/String; |
|
:try_end_0 |
|
.catch Ljava/lang/Throwable; {:try_start_0 .. :try_end_0} :catch_0 |
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0 |
|
|
|
move-result-object v0 |
|
|
|
.line 167 |
|
invoke-virtual {v1}, Lcom/google/common/io/Closer;->close()V |
|
|
|
return-object v0 |
|
|
|
.line 164 |
|
:catch_0 |
|
move-exception v0 |
|
|
|
.line 165 |
|
: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 167 |
|
:catchall_0 |
|
move-exception v0 |
|
|
|
invoke-virtual {v1}, Lcom/google/common/io/Closer;->close()V |
|
|
|
throw v0 |
|
.end method |
|
|
|
.method public readFirstLine()Ljava/lang/String; |
|
.locals 2 |
|
.annotation runtime Ljavax/annotation/Nullable; |
|
.end annotation |
|
|
|
.prologue |
|
.line 181 |
|
invoke-static {}, Lcom/google/common/io/Closer;->create()Lcom/google/common/io/Closer; |
|
|
|
move-result-object v1 |
|
|
|
.line 183 |
|
:try_start_0 |
|
invoke-virtual {p0}, Lcom/google/common/io/CharSource;->openBufferedStream()Ljava/io/BufferedReader; |
|
|
|
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/BufferedReader; |
|
|
|
.line 184 |
|
invoke-virtual {v0}, Ljava/io/BufferedReader;->readLine()Ljava/lang/String; |
|
:try_end_0 |
|
.catch Ljava/lang/Throwable; {:try_start_0 .. :try_end_0} :catch_0 |
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0 |
|
|
|
move-result-object v0 |
|
|
|
.line 188 |
|
invoke-virtual {v1}, Lcom/google/common/io/Closer;->close()V |
|
|
|
return-object v0 |
|
|
|
.line 185 |
|
:catch_0 |
|
move-exception v0 |
|
|
|
.line 186 |
|
: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 188 |
|
:catchall_0 |
|
move-exception v0 |
|
|
|
invoke-virtual {v1}, Lcom/google/common/io/Closer;->close()V |
|
|
|
throw v0 |
|
.end method |
|
|
|
.method public readLines()Lcom/google/common/collect/ImmutableList; |
|
.locals 4 |
|
.annotation system Ldalvik/annotation/Signature; |
|
value = { |
|
"()", |
|
"Lcom/google/common/collect/ImmutableList", |
|
"<", |
|
"Ljava/lang/String;", |
|
">;" |
|
} |
|
.end annotation |
|
|
|
.prologue |
|
.line 203 |
|
invoke-static {}, Lcom/google/common/io/Closer;->create()Lcom/google/common/io/Closer; |
|
|
|
move-result-object v1 |
|
|
|
.line 205 |
|
:try_start_0 |
|
invoke-virtual {p0}, Lcom/google/common/io/CharSource;->openBufferedStream()Ljava/io/BufferedReader; |
|
|
|
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/BufferedReader; |
|
|
|
.line 206 |
|
invoke-static {}, Lcom/google/common/collect/Lists;->newArrayList()Ljava/util/ArrayList; |
|
|
|
move-result-object v2 |
|
|
|
.line 208 |
|
:goto_0 |
|
invoke-virtual {v0}, Ljava/io/BufferedReader;->readLine()Ljava/lang/String; |
|
|
|
move-result-object v3 |
|
|
|
if-eqz v3, :cond_0 |
|
|
|
.line 209 |
|
invoke-interface {v2, v3}, Ljava/util/List;->add(Ljava/lang/Object;)Z |
|
:try_end_0 |
|
.catch Ljava/lang/Throwable; {:try_start_0 .. :try_end_0} :catch_0 |
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0 |
|
|
|
goto :goto_0 |
|
|
|
.line 212 |
|
:catch_0 |
|
move-exception v0 |
|
|
|
.line 213 |
|
: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 215 |
|
:catchall_0 |
|
move-exception v0 |
|
|
|
invoke-virtual {v1}, Lcom/google/common/io/Closer;->close()V |
|
|
|
throw v0 |
|
|
|
.line 211 |
|
:cond_0 |
|
:try_start_2 |
|
invoke-static {v2}, Lcom/google/common/collect/ImmutableList;->copyOf(Ljava/util/Collection;)Lcom/google/common/collect/ImmutableList; |
|
:try_end_2 |
|
.catch Ljava/lang/Throwable; {:try_start_2 .. :try_end_2} :catch_0 |
|
.catchall {:try_start_2 .. :try_end_2} :catchall_0 |
|
|
|
move-result-object v0 |
|
|
|
.line 215 |
|
invoke-virtual {v1}, Lcom/google/common/io/Closer;->close()V |
|
|
|
return-object v0 |
|
.end method |
|
|
|
.method public readLines(Lcom/google/common/io/LineProcessor;)Ljava/lang/Object; |
|
.locals 2 |
|
.annotation build Lcom/google/common/annotations/Beta; |
|
.end annotation |
|
|
|
.annotation system Ldalvik/annotation/Signature; |
|
value = { |
|
"<T:", |
|
"Ljava/lang/Object;", |
|
">(", |
|
"Lcom/google/common/io/LineProcessor", |
|
"<TT;>;)TT;" |
|
} |
|
.end annotation |
|
|
|
.prologue |
|
.line 235 |
|
invoke-static {p1}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object; |
|
|
|
.line 237 |
|
invoke-static {}, Lcom/google/common/io/Closer;->create()Lcom/google/common/io/Closer; |
|
|
|
move-result-object v1 |
|
|
|
.line 239 |
|
:try_start_0 |
|
invoke-virtual {p0}, Lcom/google/common/io/CharSource;->openStream()Ljava/io/Reader; |
|
|
|
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/Reader; |
|
|
|
.line 240 |
|
invoke-static {v0, p1}, Lcom/google/common/io/CharStreams;->readLines(Ljava/lang/Readable;Lcom/google/common/io/LineProcessor;)Ljava/lang/Object; |
|
:try_end_0 |
|
.catch Ljava/lang/Throwable; {:try_start_0 .. :try_end_0} :catch_0 |
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0 |
|
|
|
move-result-object v0 |
|
|
|
.line 244 |
|
invoke-virtual {v1}, Lcom/google/common/io/Closer;->close()V |
|
|
|
return-object v0 |
|
|
|
.line 241 |
|
:catch_0 |
|
move-exception v0 |
|
|
|
.line 242 |
|
: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 244 |
|
:catchall_0 |
|
move-exception v0 |
|
|
|
invoke-virtual {v1}, Lcom/google/common/io/Closer;->close()V |
|
|
|
throw v0 |
|
.end method
|
|
|