Rabbit-R1/android (non root)/smali/smali_classes3/com/google/common/io/ByteSource$ConcatenatedByteSource.smali
2024-05-21 17:08:36 -04:00

334 lines
7.6 KiB
Smali

.class final Lcom/google/common/io/ByteSource$ConcatenatedByteSource;
.super Lcom/google/common/io/ByteSource;
.source "ByteSource.java"
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lcom/google/common/io/ByteSource;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x1a
name = "ConcatenatedByteSource"
.end annotation
# instance fields
.field final sources:Ljava/lang/Iterable;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/lang/Iterable<",
"+",
"Lcom/google/common/io/ByteSource;",
">;"
}
.end annotation
.end field
# direct methods
.method constructor <init>(Ljava/lang/Iterable;)V
.locals 0
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/lang/Iterable<",
"+",
"Lcom/google/common/io/ByteSource;",
">;)V"
}
.end annotation
.line 688
invoke-direct {p0}, Lcom/google/common/io/ByteSource;-><init>()V
.line 689
invoke-static {p1}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object p1
check-cast p1, Ljava/lang/Iterable;
iput-object p1, p0, Lcom/google/common/io/ByteSource$ConcatenatedByteSource;->sources:Ljava/lang/Iterable;
return-void
.end method
# virtual methods
.method public isEmpty()Z
.locals 1
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
iget-object p0, p0, Lcom/google/common/io/ByteSource$ConcatenatedByteSource;->sources:Ljava/lang/Iterable;
.line 699
invoke-interface {p0}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
move-result-object p0
:cond_0
invoke-interface {p0}, Ljava/util/Iterator;->hasNext()Z
move-result v0
if-eqz v0, :cond_1
invoke-interface {p0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v0
check-cast v0, Lcom/google/common/io/ByteSource;
.line 700
invoke-virtual {v0}, Lcom/google/common/io/ByteSource;->isEmpty()Z
move-result v0
if-nez v0, :cond_0
const/4 p0, 0x0
return p0
:cond_1
const/4 p0, 0x1
return p0
.end method
.method public openStream()Ljava/io/InputStream;
.locals 1
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 694
new-instance v0, Lcom/google/common/io/MultiInputStream;
iget-object p0, p0, Lcom/google/common/io/ByteSource$ConcatenatedByteSource;->sources:Ljava/lang/Iterable;
invoke-interface {p0}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
move-result-object p0
invoke-direct {v0, p0}, Lcom/google/common/io/MultiInputStream;-><init>(Ljava/util/Iterator;)V
return-object v0
.end method
.method public size()J
.locals 6
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
iget-object p0, p0, Lcom/google/common/io/ByteSource$ConcatenatedByteSource;->sources:Ljava/lang/Iterable;
.line 739
invoke-interface {p0}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
move-result-object p0
const-wide/16 v0, 0x0
move-wide v2, v0
:cond_0
invoke-interface {p0}, Ljava/util/Iterator;->hasNext()Z
move-result v4
if-eqz v4, :cond_1
invoke-interface {p0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v4
check-cast v4, Lcom/google/common/io/ByteSource;
.line 740
invoke-virtual {v4}, Lcom/google/common/io/ByteSource;->size()J
move-result-wide v4
add-long/2addr v2, v4
cmp-long v4, v2, v0
if-gez v4, :cond_0
const-wide v0, 0x7fffffffffffffffL
return-wide v0
:cond_1
return-wide v2
.end method
.method public sizeIfKnown()Lcom/google/common/base/Optional;
.locals 6
.annotation system Ldalvik/annotation/Signature;
value = {
"()",
"Lcom/google/common/base/Optional<",
"Ljava/lang/Long;",
">;"
}
.end annotation
iget-object p0, p0, Lcom/google/common/io/ByteSource$ConcatenatedByteSource;->sources:Ljava/lang/Iterable;
.line 709
instance-of v0, p0, Ljava/util/Collection;
if-nez v0, :cond_0
.line 715
invoke-static {}, Lcom/google/common/base/Optional;->absent()Lcom/google/common/base/Optional;
move-result-object p0
return-object p0
.line 718
:cond_0
invoke-interface {p0}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
move-result-object p0
const-wide/16 v0, 0x0
move-wide v2, v0
:cond_1
invoke-interface {p0}, Ljava/util/Iterator;->hasNext()Z
move-result v4
if-eqz v4, :cond_3
invoke-interface {p0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v4
check-cast v4, Lcom/google/common/io/ByteSource;
.line 719
invoke-virtual {v4}, Lcom/google/common/io/ByteSource;->sizeIfKnown()Lcom/google/common/base/Optional;
move-result-object v4
.line 720
invoke-virtual {v4}, Lcom/google/common/base/Optional;->isPresent()Z
move-result v5
if-nez v5, :cond_2
.line 721
invoke-static {}, Lcom/google/common/base/Optional;->absent()Lcom/google/common/base/Optional;
move-result-object p0
return-object p0
.line 723
:cond_2
invoke-virtual {v4}, Lcom/google/common/base/Optional;->get()Ljava/lang/Object;
move-result-object v4
check-cast v4, Ljava/lang/Long;
invoke-virtual {v4}, Ljava/lang/Long;->longValue()J
move-result-wide v4
add-long/2addr v2, v4
cmp-long v4, v2, v0
if-gez v4, :cond_1
const-wide v0, 0x7fffffffffffffffL
.line 730
invoke-static {v0, v1}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
move-result-object p0
invoke-static {p0}, Lcom/google/common/base/Optional;->of(Ljava/lang/Object;)Lcom/google/common/base/Optional;
move-result-object p0
return-object p0
.line 733
:cond_3
invoke-static {v2, v3}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
move-result-object p0
invoke-static {p0}, Lcom/google/common/base/Optional;->of(Ljava/lang/Object;)Lcom/google/common/base/Optional;
move-result-object p0
return-object p0
.end method
.method public toString()Ljava/lang/String;
.locals 2
iget-object p0, p0, Lcom/google/common/io/ByteSource$ConcatenatedByteSource;->sources:Ljava/lang/Iterable;
.line 755
invoke-static {p0}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;
move-result-object p0
invoke-static {p0}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;
move-result-object v0
invoke-virtual {v0}, Ljava/lang/String;->length()I
move-result v0
add-int/lit8 v0, v0, 0x13
new-instance v1, Ljava/lang/StringBuilder;
invoke-direct {v1, v0}, Ljava/lang/StringBuilder;-><init>(I)V
const-string v0, "ByteSource.concat("
invoke-virtual {v1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v0
invoke-virtual {v0, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object p0
const-string v0, ")"
invoke-virtual {p0, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object p0
invoke-virtual {p0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p0
return-object p0
.end method