1246 lines
29 KiB
Smali
1246 lines
29 KiB
Smali
.class final Lcom/google/protobuf/RopeByteString;
|
|
.super Lcom/google/protobuf/ByteString;
|
|
.source "RopeByteString.java"
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/MemberClasses;
|
|
value = {
|
|
Lcom/google/protobuf/RopeByteString$RopeInputStream;,
|
|
Lcom/google/protobuf/RopeByteString$PieceIterator;,
|
|
Lcom/google/protobuf/RopeByteString$Balancer;
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# static fields
|
|
.field private static final minLengthByDepth:[I
|
|
|
|
.field private static final serialVersionUID:J = 0x1L
|
|
|
|
|
|
# instance fields
|
|
.field private final left:Lcom/google/protobuf/ByteString;
|
|
|
|
.field private final leftLength:I
|
|
|
|
.field private final right:Lcom/google/protobuf/ByteString;
|
|
|
|
.field private final totalLength:I
|
|
|
|
.field private final treeDepth:I
|
|
|
|
|
|
# direct methods
|
|
.method public static constructor <clinit>()V
|
|
.locals 5
|
|
|
|
.line 1
|
|
new-instance v0, Ljava/util/ArrayList;
|
|
|
|
invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V
|
|
|
|
const/4 v1, 0x1
|
|
|
|
move v2, v1
|
|
|
|
:goto_0
|
|
if-lez v1, :cond_0
|
|
|
|
.line 2
|
|
invoke-static {v1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-virtual {v0, v3}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
|
|
|
|
add-int/2addr v2, v1
|
|
|
|
move v4, v2
|
|
|
|
move v2, v1
|
|
|
|
move v1, v4
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const v1, 0x7fffffff
|
|
|
|
.line 3
|
|
invoke-static {v1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v0, v1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
|
|
|
|
.line 4
|
|
invoke-virtual {v0}, Ljava/util/ArrayList;->size()I
|
|
|
|
move-result v1
|
|
|
|
new-array v1, v1, [I
|
|
|
|
sput-object v1, Lcom/google/protobuf/RopeByteString;->minLengthByDepth:[I
|
|
|
|
const/4 v1, 0x0
|
|
|
|
.line 5
|
|
:goto_1
|
|
sget-object v2, Lcom/google/protobuf/RopeByteString;->minLengthByDepth:[I
|
|
|
|
array-length v3, v2
|
|
|
|
if-ge v1, v3, :cond_1
|
|
|
|
.line 6
|
|
invoke-virtual {v0, v1}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;
|
|
|
|
move-result-object v3
|
|
|
|
check-cast v3, Ljava/lang/Integer;
|
|
|
|
invoke-virtual {v3}, Ljava/lang/Integer;->intValue()I
|
|
|
|
move-result v3
|
|
|
|
aput v3, v2, v1
|
|
|
|
add-int/lit8 v1, v1, 0x1
|
|
|
|
goto :goto_1
|
|
|
|
:cond_1
|
|
return-void
|
|
.end method
|
|
|
|
.method private constructor <init>(Lcom/google/protobuf/ByteString;Lcom/google/protobuf/ByteString;)V
|
|
.locals 2
|
|
|
|
.line 2
|
|
invoke-direct {p0}, Lcom/google/protobuf/ByteString;-><init>()V
|
|
|
|
.line 3
|
|
iput-object p1, p0, Lcom/google/protobuf/RopeByteString;->left:Lcom/google/protobuf/ByteString;
|
|
|
|
.line 4
|
|
iput-object p2, p0, Lcom/google/protobuf/RopeByteString;->right:Lcom/google/protobuf/ByteString;
|
|
|
|
.line 5
|
|
invoke-virtual {p1}, Lcom/google/protobuf/ByteString;->size()I
|
|
|
|
move-result v0
|
|
|
|
iput v0, p0, Lcom/google/protobuf/RopeByteString;->leftLength:I
|
|
|
|
.line 6
|
|
invoke-virtual {p2}, Lcom/google/protobuf/ByteString;->size()I
|
|
|
|
move-result v1
|
|
|
|
add-int/2addr v1, v0
|
|
|
|
iput v1, p0, Lcom/google/protobuf/RopeByteString;->totalLength:I
|
|
|
|
.line 7
|
|
invoke-virtual {p1}, Lcom/google/protobuf/ByteString;->getTreeDepth()I
|
|
|
|
move-result p1
|
|
|
|
invoke-virtual {p2}, Lcom/google/protobuf/ByteString;->getTreeDepth()I
|
|
|
|
move-result p2
|
|
|
|
invoke-static {p1, p2}, Ljava/lang/Math;->max(II)I
|
|
|
|
move-result p1
|
|
|
|
add-int/lit8 p1, p1, 0x1
|
|
|
|
iput p1, p0, Lcom/google/protobuf/RopeByteString;->treeDepth:I
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public synthetic constructor <init>(Lcom/google/protobuf/ByteString;Lcom/google/protobuf/ByteString;Lcom/google/protobuf/RopeByteString$1;)V
|
|
.locals 0
|
|
|
|
.line 1
|
|
invoke-direct {p0, p1, p2}, Lcom/google/protobuf/RopeByteString;-><init>(Lcom/google/protobuf/ByteString;Lcom/google/protobuf/ByteString;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static synthetic access$400(Lcom/google/protobuf/RopeByteString;)Lcom/google/protobuf/ByteString;
|
|
.locals 0
|
|
|
|
.line 1
|
|
iget-object p0, p0, Lcom/google/protobuf/RopeByteString;->left:Lcom/google/protobuf/ByteString;
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static synthetic access$500(Lcom/google/protobuf/RopeByteString;)Lcom/google/protobuf/ByteString;
|
|
.locals 0
|
|
|
|
.line 1
|
|
iget-object p0, p0, Lcom/google/protobuf/RopeByteString;->right:Lcom/google/protobuf/ByteString;
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static synthetic access$600()[I
|
|
.locals 1
|
|
|
|
.line 1
|
|
sget-object v0, Lcom/google/protobuf/RopeByteString;->minLengthByDepth:[I
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public static concatenate(Lcom/google/protobuf/ByteString;Lcom/google/protobuf/ByteString;)Lcom/google/protobuf/ByteString;
|
|
.locals 5
|
|
|
|
.line 1
|
|
invoke-virtual {p1}, Lcom/google/protobuf/ByteString;->size()I
|
|
|
|
move-result v0
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
return-object p0
|
|
|
|
.line 2
|
|
:cond_0
|
|
invoke-virtual {p0}, Lcom/google/protobuf/ByteString;->size()I
|
|
|
|
move-result v0
|
|
|
|
if-nez v0, :cond_1
|
|
|
|
return-object p1
|
|
|
|
.line 3
|
|
:cond_1
|
|
invoke-virtual {p0}, Lcom/google/protobuf/ByteString;->size()I
|
|
|
|
move-result v0
|
|
|
|
invoke-virtual {p1}, Lcom/google/protobuf/ByteString;->size()I
|
|
|
|
move-result v1
|
|
|
|
add-int/2addr v1, v0
|
|
|
|
const/16 v0, 0x80
|
|
|
|
if-ge v1, v0, :cond_2
|
|
|
|
.line 4
|
|
invoke-static {p0, p1}, Lcom/google/protobuf/RopeByteString;->concatenateBytes(Lcom/google/protobuf/ByteString;Lcom/google/protobuf/ByteString;)Lcom/google/protobuf/ByteString;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
|
|
.line 5
|
|
:cond_2
|
|
instance-of v2, p0, Lcom/google/protobuf/RopeByteString;
|
|
|
|
if-eqz v2, :cond_4
|
|
|
|
.line 6
|
|
move-object v2, p0
|
|
|
|
check-cast v2, Lcom/google/protobuf/RopeByteString;
|
|
|
|
.line 7
|
|
iget-object v3, v2, Lcom/google/protobuf/RopeByteString;->right:Lcom/google/protobuf/ByteString;
|
|
|
|
invoke-virtual {v3}, Lcom/google/protobuf/ByteString;->size()I
|
|
|
|
move-result v3
|
|
|
|
invoke-virtual {p1}, Lcom/google/protobuf/ByteString;->size()I
|
|
|
|
move-result v4
|
|
|
|
add-int/2addr v4, v3
|
|
|
|
if-ge v4, v0, :cond_3
|
|
|
|
.line 8
|
|
iget-object p0, v2, Lcom/google/protobuf/RopeByteString;->right:Lcom/google/protobuf/ByteString;
|
|
|
|
invoke-static {p0, p1}, Lcom/google/protobuf/RopeByteString;->concatenateBytes(Lcom/google/protobuf/ByteString;Lcom/google/protobuf/ByteString;)Lcom/google/protobuf/ByteString;
|
|
|
|
move-result-object p0
|
|
|
|
.line 9
|
|
new-instance p1, Lcom/google/protobuf/RopeByteString;
|
|
|
|
iget-object v0, v2, Lcom/google/protobuf/RopeByteString;->left:Lcom/google/protobuf/ByteString;
|
|
|
|
invoke-direct {p1, v0, p0}, Lcom/google/protobuf/RopeByteString;-><init>(Lcom/google/protobuf/ByteString;Lcom/google/protobuf/ByteString;)V
|
|
|
|
return-object p1
|
|
|
|
.line 10
|
|
:cond_3
|
|
iget-object v0, v2, Lcom/google/protobuf/RopeByteString;->left:Lcom/google/protobuf/ByteString;
|
|
|
|
invoke-virtual {v0}, Lcom/google/protobuf/ByteString;->getTreeDepth()I
|
|
|
|
move-result v0
|
|
|
|
iget-object v3, v2, Lcom/google/protobuf/RopeByteString;->right:Lcom/google/protobuf/ByteString;
|
|
|
|
invoke-virtual {v3}, Lcom/google/protobuf/ByteString;->getTreeDepth()I
|
|
|
|
move-result v3
|
|
|
|
if-le v0, v3, :cond_4
|
|
|
|
.line 11
|
|
invoke-virtual {v2}, Lcom/google/protobuf/RopeByteString;->getTreeDepth()I
|
|
|
|
move-result v0
|
|
|
|
invoke-virtual {p1}, Lcom/google/protobuf/ByteString;->getTreeDepth()I
|
|
|
|
move-result v3
|
|
|
|
if-le v0, v3, :cond_4
|
|
|
|
.line 12
|
|
new-instance p0, Lcom/google/protobuf/RopeByteString;
|
|
|
|
iget-object v0, v2, Lcom/google/protobuf/RopeByteString;->right:Lcom/google/protobuf/ByteString;
|
|
|
|
invoke-direct {p0, v0, p1}, Lcom/google/protobuf/RopeByteString;-><init>(Lcom/google/protobuf/ByteString;Lcom/google/protobuf/ByteString;)V
|
|
|
|
.line 13
|
|
new-instance p1, Lcom/google/protobuf/RopeByteString;
|
|
|
|
iget-object v0, v2, Lcom/google/protobuf/RopeByteString;->left:Lcom/google/protobuf/ByteString;
|
|
|
|
invoke-direct {p1, v0, p0}, Lcom/google/protobuf/RopeByteString;-><init>(Lcom/google/protobuf/ByteString;Lcom/google/protobuf/ByteString;)V
|
|
|
|
return-object p1
|
|
|
|
.line 14
|
|
:cond_4
|
|
invoke-virtual {p0}, Lcom/google/protobuf/ByteString;->getTreeDepth()I
|
|
|
|
move-result v0
|
|
|
|
invoke-virtual {p1}, Lcom/google/protobuf/ByteString;->getTreeDepth()I
|
|
|
|
move-result v2
|
|
|
|
invoke-static {v0, v2}, Ljava/lang/Math;->max(II)I
|
|
|
|
move-result v0
|
|
|
|
add-int/lit8 v0, v0, 0x1
|
|
|
|
.line 15
|
|
sget-object v2, Lcom/google/protobuf/RopeByteString;->minLengthByDepth:[I
|
|
|
|
aget v0, v2, v0
|
|
|
|
if-lt v1, v0, :cond_5
|
|
|
|
.line 16
|
|
new-instance v0, Lcom/google/protobuf/RopeByteString;
|
|
|
|
invoke-direct {v0, p0, p1}, Lcom/google/protobuf/RopeByteString;-><init>(Lcom/google/protobuf/ByteString;Lcom/google/protobuf/ByteString;)V
|
|
|
|
return-object v0
|
|
|
|
.line 17
|
|
:cond_5
|
|
new-instance v0, Lcom/google/protobuf/RopeByteString$Balancer;
|
|
|
|
const/4 v1, 0x0
|
|
|
|
invoke-direct {v0, v1}, Lcom/google/protobuf/RopeByteString$Balancer;-><init>(Lcom/google/protobuf/RopeByteString$1;)V
|
|
|
|
invoke-static {v0, p0, p1}, Lcom/google/protobuf/RopeByteString$Balancer;->access$100(Lcom/google/protobuf/RopeByteString$Balancer;Lcom/google/protobuf/ByteString;Lcom/google/protobuf/ByteString;)Lcom/google/protobuf/ByteString;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method private static concatenateBytes(Lcom/google/protobuf/ByteString;Lcom/google/protobuf/ByteString;)Lcom/google/protobuf/ByteString;
|
|
.locals 4
|
|
|
|
.line 1
|
|
invoke-virtual {p0}, Lcom/google/protobuf/ByteString;->size()I
|
|
|
|
move-result v0
|
|
|
|
.line 2
|
|
invoke-virtual {p1}, Lcom/google/protobuf/ByteString;->size()I
|
|
|
|
move-result v1
|
|
|
|
add-int v2, v0, v1
|
|
|
|
.line 3
|
|
new-array v2, v2, [B
|
|
|
|
const/4 v3, 0x0
|
|
|
|
.line 4
|
|
invoke-virtual {p0, v2, v3, v3, v0}, Lcom/google/protobuf/ByteString;->copyTo([BIII)V
|
|
|
|
.line 5
|
|
invoke-virtual {p1, v2, v3, v0, v1}, Lcom/google/protobuf/ByteString;->copyTo([BIII)V
|
|
|
|
.line 6
|
|
invoke-static {v2}, Lcom/google/protobuf/ByteString;->wrap([B)Lcom/google/protobuf/ByteString;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method private equalsFragments(Lcom/google/protobuf/ByteString;)Z
|
|
.locals 11
|
|
|
|
.line 1
|
|
new-instance v0, Lcom/google/protobuf/RopeByteString$PieceIterator;
|
|
|
|
const/4 v1, 0x0
|
|
|
|
invoke-direct {v0, p0, v1}, Lcom/google/protobuf/RopeByteString$PieceIterator;-><init>(Lcom/google/protobuf/ByteString;Lcom/google/protobuf/RopeByteString$1;)V
|
|
|
|
.line 2
|
|
invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object v2
|
|
|
|
check-cast v2, Lcom/google/protobuf/ByteString$LeafByteString;
|
|
|
|
.line 3
|
|
new-instance v3, Lcom/google/protobuf/RopeByteString$PieceIterator;
|
|
|
|
invoke-direct {v3, p1, v1}, Lcom/google/protobuf/RopeByteString$PieceIterator;-><init>(Lcom/google/protobuf/ByteString;Lcom/google/protobuf/RopeByteString$1;)V
|
|
|
|
.line 4
|
|
invoke-interface {v3}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object p1
|
|
|
|
check-cast p1, Lcom/google/protobuf/ByteString$LeafByteString;
|
|
|
|
const/4 v1, 0x0
|
|
|
|
move v4, v1
|
|
|
|
move v5, v4
|
|
|
|
move v6, v5
|
|
|
|
.line 5
|
|
:goto_0
|
|
invoke-virtual {v2}, Lcom/google/protobuf/ByteString;->size()I
|
|
|
|
move-result v7
|
|
|
|
sub-int/2addr v7, v4
|
|
|
|
.line 6
|
|
invoke-virtual {p1}, Lcom/google/protobuf/ByteString;->size()I
|
|
|
|
move-result v8
|
|
|
|
sub-int/2addr v8, v5
|
|
|
|
.line 7
|
|
invoke-static {v7, v8}, Ljava/lang/Math;->min(II)I
|
|
|
|
move-result v9
|
|
|
|
if-nez v4, :cond_0
|
|
|
|
.line 8
|
|
invoke-virtual {v2, p1, v5, v9}, Lcom/google/protobuf/ByteString$LeafByteString;->equalsRange(Lcom/google/protobuf/ByteString;II)Z
|
|
|
|
move-result v10
|
|
|
|
goto :goto_1
|
|
|
|
.line 9
|
|
:cond_0
|
|
invoke-virtual {p1, v2, v4, v9}, Lcom/google/protobuf/ByteString$LeafByteString;->equalsRange(Lcom/google/protobuf/ByteString;II)Z
|
|
|
|
move-result v10
|
|
|
|
:goto_1
|
|
if-nez v10, :cond_1
|
|
|
|
return v1
|
|
|
|
:cond_1
|
|
add-int/2addr v6, v9
|
|
|
|
.line 10
|
|
iget v10, p0, Lcom/google/protobuf/RopeByteString;->totalLength:I
|
|
|
|
if-lt v6, v10, :cond_3
|
|
|
|
if-ne v6, v10, :cond_2
|
|
|
|
const/4 p1, 0x1
|
|
|
|
return p1
|
|
|
|
.line 11
|
|
:cond_2
|
|
new-instance p1, Ljava/lang/IllegalStateException;
|
|
|
|
invoke-direct {p1}, Ljava/lang/IllegalStateException;-><init>()V
|
|
|
|
throw p1
|
|
|
|
:cond_3
|
|
if-ne v9, v7, :cond_4
|
|
|
|
.line 12
|
|
invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object v2
|
|
|
|
check-cast v2, Lcom/google/protobuf/ByteString$LeafByteString;
|
|
|
|
move v4, v1
|
|
|
|
goto :goto_2
|
|
|
|
:cond_4
|
|
add-int/2addr v4, v9
|
|
|
|
:goto_2
|
|
if-ne v9, v8, :cond_5
|
|
|
|
.line 13
|
|
invoke-interface {v3}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object p1
|
|
|
|
check-cast p1, Lcom/google/protobuf/ByteString$LeafByteString;
|
|
|
|
move v5, v1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_5
|
|
add-int/2addr v5, v9
|
|
|
|
goto :goto_0
|
|
.end method
|
|
|
|
.method public static newInstanceForTest(Lcom/google/protobuf/ByteString;Lcom/google/protobuf/ByteString;)Lcom/google/protobuf/RopeByteString;
|
|
.locals 1
|
|
|
|
.line 1
|
|
new-instance v0, Lcom/google/protobuf/RopeByteString;
|
|
|
|
invoke-direct {v0, p0, p1}, Lcom/google/protobuf/RopeByteString;-><init>(Lcom/google/protobuf/ByteString;Lcom/google/protobuf/ByteString;)V
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method private readObject(Ljava/io/ObjectInputStream;)V
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
.line 1
|
|
new-instance p1, Ljava/io/InvalidObjectException;
|
|
|
|
const-string v0, "RopeByteStream instances are not to be serialized directly"
|
|
|
|
invoke-direct {p1, v0}, Ljava/io/InvalidObjectException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public asReadOnlyByteBuffer()Ljava/nio/ByteBuffer;
|
|
.locals 1
|
|
|
|
.line 1
|
|
invoke-virtual {p0}, Lcom/google/protobuf/ByteString;->toByteArray()[B
|
|
|
|
move-result-object v0
|
|
|
|
invoke-static {v0}, Ljava/nio/ByteBuffer;->wrap([B)Ljava/nio/ByteBuffer;
|
|
|
|
move-result-object v0
|
|
|
|
.line 2
|
|
invoke-virtual {v0}, Ljava/nio/ByteBuffer;->asReadOnlyBuffer()Ljava/nio/ByteBuffer;
|
|
|
|
move-result-object v0
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public asReadOnlyByteBufferList()Ljava/util/List;
|
|
.locals 3
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"()",
|
|
"Ljava/util/List<",
|
|
"Ljava/nio/ByteBuffer;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
|
|
.line 1
|
|
new-instance v0, Ljava/util/ArrayList;
|
|
|
|
invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V
|
|
|
|
.line 2
|
|
new-instance v1, Lcom/google/protobuf/RopeByteString$PieceIterator;
|
|
|
|
const/4 v2, 0x0
|
|
|
|
invoke-direct {v1, p0, v2}, Lcom/google/protobuf/RopeByteString$PieceIterator;-><init>(Lcom/google/protobuf/ByteString;Lcom/google/protobuf/RopeByteString$1;)V
|
|
|
|
.line 3
|
|
:goto_0
|
|
invoke-virtual {v1}, Lcom/google/protobuf/RopeByteString$PieceIterator;->hasNext()Z
|
|
|
|
move-result v2
|
|
|
|
if-eqz v2, :cond_0
|
|
|
|
.line 4
|
|
invoke-virtual {v1}, Lcom/google/protobuf/RopeByteString$PieceIterator;->next()Lcom/google/protobuf/ByteString$LeafByteString;
|
|
|
|
move-result-object v2
|
|
|
|
.line 5
|
|
invoke-virtual {v2}, Lcom/google/protobuf/ByteString;->asReadOnlyByteBuffer()Ljava/nio/ByteBuffer;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v0, v2}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public byteAt(I)B
|
|
.locals 2
|
|
|
|
.line 1
|
|
iget v0, p0, Lcom/google/protobuf/RopeByteString;->totalLength:I
|
|
|
|
invoke-static {p1, v0}, Lcom/google/protobuf/ByteString;->checkIndex(II)V
|
|
|
|
.line 2
|
|
iget v0, p0, Lcom/google/protobuf/RopeByteString;->leftLength:I
|
|
|
|
if-ge p1, v0, :cond_0
|
|
|
|
.line 3
|
|
iget-object v0, p0, Lcom/google/protobuf/RopeByteString;->left:Lcom/google/protobuf/ByteString;
|
|
|
|
invoke-virtual {v0, p1}, Lcom/google/protobuf/ByteString;->byteAt(I)B
|
|
|
|
move-result p1
|
|
|
|
return p1
|
|
|
|
.line 4
|
|
:cond_0
|
|
iget-object v1, p0, Lcom/google/protobuf/RopeByteString;->right:Lcom/google/protobuf/ByteString;
|
|
|
|
sub-int/2addr p1, v0
|
|
|
|
invoke-virtual {v1, p1}, Lcom/google/protobuf/ByteString;->byteAt(I)B
|
|
|
|
move-result p1
|
|
|
|
return p1
|
|
.end method
|
|
|
|
.method public copyTo(Ljava/nio/ByteBuffer;)V
|
|
.locals 1
|
|
|
|
.line 1
|
|
iget-object v0, p0, Lcom/google/protobuf/RopeByteString;->left:Lcom/google/protobuf/ByteString;
|
|
|
|
invoke-virtual {v0, p1}, Lcom/google/protobuf/ByteString;->copyTo(Ljava/nio/ByteBuffer;)V
|
|
|
|
.line 2
|
|
iget-object v0, p0, Lcom/google/protobuf/RopeByteString;->right:Lcom/google/protobuf/ByteString;
|
|
|
|
invoke-virtual {v0, p1}, Lcom/google/protobuf/ByteString;->copyTo(Ljava/nio/ByteBuffer;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public copyToInternal([BIII)V
|
|
.locals 2
|
|
|
|
add-int v0, p2, p4
|
|
|
|
.line 1
|
|
iget v1, p0, Lcom/google/protobuf/RopeByteString;->leftLength:I
|
|
|
|
if-gt v0, v1, :cond_0
|
|
|
|
.line 2
|
|
iget-object v0, p0, Lcom/google/protobuf/RopeByteString;->left:Lcom/google/protobuf/ByteString;
|
|
|
|
invoke-virtual {v0, p1, p2, p3, p4}, Lcom/google/protobuf/ByteString;->copyToInternal([BIII)V
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
if-lt p2, v1, :cond_1
|
|
|
|
.line 3
|
|
iget-object v0, p0, Lcom/google/protobuf/RopeByteString;->right:Lcom/google/protobuf/ByteString;
|
|
|
|
sub-int/2addr p2, v1
|
|
|
|
invoke-virtual {v0, p1, p2, p3, p4}, Lcom/google/protobuf/ByteString;->copyToInternal([BIII)V
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
sub-int/2addr v1, p2
|
|
|
|
.line 4
|
|
iget-object v0, p0, Lcom/google/protobuf/RopeByteString;->left:Lcom/google/protobuf/ByteString;
|
|
|
|
invoke-virtual {v0, p1, p2, p3, v1}, Lcom/google/protobuf/ByteString;->copyToInternal([BIII)V
|
|
|
|
.line 5
|
|
iget-object p2, p0, Lcom/google/protobuf/RopeByteString;->right:Lcom/google/protobuf/ByteString;
|
|
|
|
const/4 v0, 0x0
|
|
|
|
add-int/2addr p3, v1
|
|
|
|
sub-int/2addr p4, v1
|
|
|
|
invoke-virtual {p2, p1, v0, p3, p4}, Lcom/google/protobuf/ByteString;->copyToInternal([BIII)V
|
|
|
|
:goto_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public equals(Ljava/lang/Object;)Z
|
|
.locals 4
|
|
|
|
const/4 v0, 0x1
|
|
|
|
if-ne p1, p0, :cond_0
|
|
|
|
return v0
|
|
|
|
.line 1
|
|
:cond_0
|
|
instance-of v1, p1, Lcom/google/protobuf/ByteString;
|
|
|
|
const/4 v2, 0x0
|
|
|
|
if-nez v1, :cond_1
|
|
|
|
return v2
|
|
|
|
.line 2
|
|
:cond_1
|
|
check-cast p1, Lcom/google/protobuf/ByteString;
|
|
|
|
.line 3
|
|
iget v1, p0, Lcom/google/protobuf/RopeByteString;->totalLength:I
|
|
|
|
invoke-virtual {p1}, Lcom/google/protobuf/ByteString;->size()I
|
|
|
|
move-result v3
|
|
|
|
if-eq v1, v3, :cond_2
|
|
|
|
return v2
|
|
|
|
.line 4
|
|
:cond_2
|
|
iget v1, p0, Lcom/google/protobuf/RopeByteString;->totalLength:I
|
|
|
|
if-nez v1, :cond_3
|
|
|
|
return v0
|
|
|
|
.line 5
|
|
:cond_3
|
|
invoke-virtual {p0}, Lcom/google/protobuf/ByteString;->peekCachedHashCode()I
|
|
|
|
move-result v0
|
|
|
|
.line 6
|
|
invoke-virtual {p1}, Lcom/google/protobuf/ByteString;->peekCachedHashCode()I
|
|
|
|
move-result v1
|
|
|
|
if-eqz v0, :cond_4
|
|
|
|
if-eqz v1, :cond_4
|
|
|
|
if-eq v0, v1, :cond_4
|
|
|
|
return v2
|
|
|
|
.line 7
|
|
:cond_4
|
|
invoke-direct {p0, p1}, Lcom/google/protobuf/RopeByteString;->equalsFragments(Lcom/google/protobuf/ByteString;)Z
|
|
|
|
move-result p1
|
|
|
|
return p1
|
|
.end method
|
|
|
|
.method public getTreeDepth()I
|
|
.locals 1
|
|
|
|
.line 1
|
|
iget v0, p0, Lcom/google/protobuf/RopeByteString;->treeDepth:I
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public isBalanced()Z
|
|
.locals 3
|
|
|
|
.line 1
|
|
iget v0, p0, Lcom/google/protobuf/RopeByteString;->totalLength:I
|
|
|
|
sget-object v1, Lcom/google/protobuf/RopeByteString;->minLengthByDepth:[I
|
|
|
|
iget v2, p0, Lcom/google/protobuf/RopeByteString;->treeDepth:I
|
|
|
|
aget v1, v1, v2
|
|
|
|
if-lt v0, v1, :cond_0
|
|
|
|
const/4 v0, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 v0, 0x0
|
|
|
|
:goto_0
|
|
return v0
|
|
.end method
|
|
|
|
.method public isValidUtf8()Z
|
|
.locals 4
|
|
|
|
.line 1
|
|
iget-object v0, p0, Lcom/google/protobuf/RopeByteString;->left:Lcom/google/protobuf/ByteString;
|
|
|
|
iget v1, p0, Lcom/google/protobuf/RopeByteString;->leftLength:I
|
|
|
|
const/4 v2, 0x0
|
|
|
|
invoke-virtual {v0, v2, v2, v1}, Lcom/google/protobuf/ByteString;->partialIsValidUtf8(III)I
|
|
|
|
move-result v0
|
|
|
|
.line 2
|
|
iget-object v1, p0, Lcom/google/protobuf/RopeByteString;->right:Lcom/google/protobuf/ByteString;
|
|
|
|
invoke-virtual {v1}, Lcom/google/protobuf/ByteString;->size()I
|
|
|
|
move-result v3
|
|
|
|
invoke-virtual {v1, v0, v2, v3}, Lcom/google/protobuf/ByteString;->partialIsValidUtf8(III)I
|
|
|
|
move-result v0
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
const/4 v2, 0x1
|
|
|
|
:cond_0
|
|
return v2
|
|
.end method
|
|
|
|
.method public newCodedInput()Lcom/google/protobuf/CodedInputStream;
|
|
.locals 1
|
|
|
|
.line 1
|
|
new-instance v0, Lcom/google/protobuf/RopeByteString$RopeInputStream;
|
|
|
|
invoke-direct {v0, p0}, Lcom/google/protobuf/RopeByteString$RopeInputStream;-><init>(Lcom/google/protobuf/RopeByteString;)V
|
|
|
|
invoke-static {v0}, Lcom/google/protobuf/CodedInputStream;->newInstance(Ljava/io/InputStream;)Lcom/google/protobuf/CodedInputStream;
|
|
|
|
move-result-object v0
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public newInput()Ljava/io/InputStream;
|
|
.locals 1
|
|
|
|
.line 1
|
|
new-instance v0, Lcom/google/protobuf/RopeByteString$RopeInputStream;
|
|
|
|
invoke-direct {v0, p0}, Lcom/google/protobuf/RopeByteString$RopeInputStream;-><init>(Lcom/google/protobuf/RopeByteString;)V
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public partialHash(III)I
|
|
.locals 2
|
|
|
|
add-int v0, p2, p3
|
|
|
|
.line 1
|
|
iget v1, p0, Lcom/google/protobuf/RopeByteString;->leftLength:I
|
|
|
|
if-gt v0, v1, :cond_0
|
|
|
|
.line 2
|
|
iget-object v0, p0, Lcom/google/protobuf/RopeByteString;->left:Lcom/google/protobuf/ByteString;
|
|
|
|
invoke-virtual {v0, p1, p2, p3}, Lcom/google/protobuf/ByteString;->partialHash(III)I
|
|
|
|
move-result p1
|
|
|
|
return p1
|
|
|
|
:cond_0
|
|
if-lt p2, v1, :cond_1
|
|
|
|
.line 3
|
|
iget-object v0, p0, Lcom/google/protobuf/RopeByteString;->right:Lcom/google/protobuf/ByteString;
|
|
|
|
sub-int/2addr p2, v1
|
|
|
|
invoke-virtual {v0, p1, p2, p3}, Lcom/google/protobuf/ByteString;->partialHash(III)I
|
|
|
|
move-result p1
|
|
|
|
return p1
|
|
|
|
:cond_1
|
|
sub-int/2addr v1, p2
|
|
|
|
.line 4
|
|
iget-object v0, p0, Lcom/google/protobuf/RopeByteString;->left:Lcom/google/protobuf/ByteString;
|
|
|
|
invoke-virtual {v0, p1, p2, v1}, Lcom/google/protobuf/ByteString;->partialHash(III)I
|
|
|
|
move-result p1
|
|
|
|
.line 5
|
|
iget-object p2, p0, Lcom/google/protobuf/RopeByteString;->right:Lcom/google/protobuf/ByteString;
|
|
|
|
const/4 v0, 0x0
|
|
|
|
sub-int/2addr p3, v1
|
|
|
|
invoke-virtual {p2, p1, v0, p3}, Lcom/google/protobuf/ByteString;->partialHash(III)I
|
|
|
|
move-result p1
|
|
|
|
return p1
|
|
.end method
|
|
|
|
.method public partialIsValidUtf8(III)I
|
|
.locals 2
|
|
|
|
add-int v0, p2, p3
|
|
|
|
.line 1
|
|
iget v1, p0, Lcom/google/protobuf/RopeByteString;->leftLength:I
|
|
|
|
if-gt v0, v1, :cond_0
|
|
|
|
.line 2
|
|
iget-object v0, p0, Lcom/google/protobuf/RopeByteString;->left:Lcom/google/protobuf/ByteString;
|
|
|
|
invoke-virtual {v0, p1, p2, p3}, Lcom/google/protobuf/ByteString;->partialIsValidUtf8(III)I
|
|
|
|
move-result p1
|
|
|
|
return p1
|
|
|
|
:cond_0
|
|
if-lt p2, v1, :cond_1
|
|
|
|
.line 3
|
|
iget-object v0, p0, Lcom/google/protobuf/RopeByteString;->right:Lcom/google/protobuf/ByteString;
|
|
|
|
sub-int/2addr p2, v1
|
|
|
|
invoke-virtual {v0, p1, p2, p3}, Lcom/google/protobuf/ByteString;->partialIsValidUtf8(III)I
|
|
|
|
move-result p1
|
|
|
|
return p1
|
|
|
|
:cond_1
|
|
sub-int/2addr v1, p2
|
|
|
|
.line 4
|
|
iget-object v0, p0, Lcom/google/protobuf/RopeByteString;->left:Lcom/google/protobuf/ByteString;
|
|
|
|
invoke-virtual {v0, p1, p2, v1}, Lcom/google/protobuf/ByteString;->partialIsValidUtf8(III)I
|
|
|
|
move-result p1
|
|
|
|
.line 5
|
|
iget-object p2, p0, Lcom/google/protobuf/RopeByteString;->right:Lcom/google/protobuf/ByteString;
|
|
|
|
const/4 v0, 0x0
|
|
|
|
sub-int/2addr p3, v1
|
|
|
|
invoke-virtual {p2, p1, v0, p3}, Lcom/google/protobuf/ByteString;->partialIsValidUtf8(III)I
|
|
|
|
move-result p1
|
|
|
|
return p1
|
|
.end method
|
|
|
|
.method public size()I
|
|
.locals 1
|
|
|
|
.line 1
|
|
iget v0, p0, Lcom/google/protobuf/RopeByteString;->totalLength:I
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public substring(II)Lcom/google/protobuf/ByteString;
|
|
.locals 3
|
|
|
|
.line 1
|
|
iget v0, p0, Lcom/google/protobuf/RopeByteString;->totalLength:I
|
|
|
|
invoke-static {p1, p2, v0}, Lcom/google/protobuf/ByteString;->checkRange(III)I
|
|
|
|
move-result v0
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
.line 2
|
|
sget-object p1, Lcom/google/protobuf/ByteString;->EMPTY:Lcom/google/protobuf/ByteString;
|
|
|
|
return-object p1
|
|
|
|
.line 3
|
|
:cond_0
|
|
iget v1, p0, Lcom/google/protobuf/RopeByteString;->totalLength:I
|
|
|
|
if-ne v0, v1, :cond_1
|
|
|
|
return-object p0
|
|
|
|
.line 4
|
|
:cond_1
|
|
iget v0, p0, Lcom/google/protobuf/RopeByteString;->leftLength:I
|
|
|
|
if-gt p2, v0, :cond_2
|
|
|
|
.line 5
|
|
iget-object v0, p0, Lcom/google/protobuf/RopeByteString;->left:Lcom/google/protobuf/ByteString;
|
|
|
|
invoke-virtual {v0, p1, p2}, Lcom/google/protobuf/ByteString;->substring(II)Lcom/google/protobuf/ByteString;
|
|
|
|
move-result-object p1
|
|
|
|
return-object p1
|
|
|
|
:cond_2
|
|
if-lt p1, v0, :cond_3
|
|
|
|
.line 6
|
|
iget-object v1, p0, Lcom/google/protobuf/RopeByteString;->right:Lcom/google/protobuf/ByteString;
|
|
|
|
sub-int/2addr p1, v0
|
|
|
|
sub-int/2addr p2, v0
|
|
|
|
invoke-virtual {v1, p1, p2}, Lcom/google/protobuf/ByteString;->substring(II)Lcom/google/protobuf/ByteString;
|
|
|
|
move-result-object p1
|
|
|
|
return-object p1
|
|
|
|
.line 7
|
|
:cond_3
|
|
iget-object v0, p0, Lcom/google/protobuf/RopeByteString;->left:Lcom/google/protobuf/ByteString;
|
|
|
|
invoke-virtual {v0, p1}, Lcom/google/protobuf/ByteString;->substring(I)Lcom/google/protobuf/ByteString;
|
|
|
|
move-result-object p1
|
|
|
|
.line 8
|
|
iget-object v0, p0, Lcom/google/protobuf/RopeByteString;->right:Lcom/google/protobuf/ByteString;
|
|
|
|
const/4 v1, 0x0
|
|
|
|
iget v2, p0, Lcom/google/protobuf/RopeByteString;->leftLength:I
|
|
|
|
sub-int/2addr p2, v2
|
|
|
|
invoke-virtual {v0, v1, p2}, Lcom/google/protobuf/ByteString;->substring(II)Lcom/google/protobuf/ByteString;
|
|
|
|
move-result-object p2
|
|
|
|
.line 9
|
|
new-instance v0, Lcom/google/protobuf/RopeByteString;
|
|
|
|
invoke-direct {v0, p1, p2}, Lcom/google/protobuf/RopeByteString;-><init>(Lcom/google/protobuf/ByteString;Lcom/google/protobuf/ByteString;)V
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public toStringInternal(Ljava/nio/charset/Charset;)Ljava/lang/String;
|
|
.locals 2
|
|
|
|
.line 1
|
|
new-instance v0, Ljava/lang/String;
|
|
|
|
invoke-virtual {p0}, Lcom/google/protobuf/ByteString;->toByteArray()[B
|
|
|
|
move-result-object v1
|
|
|
|
invoke-direct {v0, v1, p1}, Ljava/lang/String;-><init>([BLjava/nio/charset/Charset;)V
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public writeReplace()Ljava/lang/Object;
|
|
.locals 1
|
|
|
|
.line 1
|
|
invoke-virtual {p0}, Lcom/google/protobuf/ByteString;->toByteArray()[B
|
|
|
|
move-result-object v0
|
|
|
|
invoke-static {v0}, Lcom/google/protobuf/ByteString;->wrap([B)Lcom/google/protobuf/ByteString;
|
|
|
|
move-result-object v0
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public writeTo(Lcom/google/protobuf/ByteOutput;)V
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
.line 3
|
|
iget-object v0, p0, Lcom/google/protobuf/RopeByteString;->left:Lcom/google/protobuf/ByteString;
|
|
|
|
invoke-virtual {v0, p1}, Lcom/google/protobuf/ByteString;->writeTo(Lcom/google/protobuf/ByteOutput;)V
|
|
|
|
.line 4
|
|
iget-object v0, p0, Lcom/google/protobuf/RopeByteString;->right:Lcom/google/protobuf/ByteString;
|
|
|
|
invoke-virtual {v0, p1}, Lcom/google/protobuf/ByteString;->writeTo(Lcom/google/protobuf/ByteOutput;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public writeTo(Ljava/io/OutputStream;)V
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
.line 1
|
|
iget-object v0, p0, Lcom/google/protobuf/RopeByteString;->left:Lcom/google/protobuf/ByteString;
|
|
|
|
invoke-virtual {v0, p1}, Lcom/google/protobuf/ByteString;->writeTo(Ljava/io/OutputStream;)V
|
|
|
|
.line 2
|
|
iget-object v0, p0, Lcom/google/protobuf/RopeByteString;->right:Lcom/google/protobuf/ByteString;
|
|
|
|
invoke-virtual {v0, p1}, Lcom/google/protobuf/ByteString;->writeTo(Ljava/io/OutputStream;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public writeToInternal(Ljava/io/OutputStream;II)V
|
|
.locals 2
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
add-int v0, p2, p3
|
|
|
|
.line 1
|
|
iget v1, p0, Lcom/google/protobuf/RopeByteString;->leftLength:I
|
|
|
|
if-gt v0, v1, :cond_0
|
|
|
|
.line 2
|
|
iget-object v0, p0, Lcom/google/protobuf/RopeByteString;->left:Lcom/google/protobuf/ByteString;
|
|
|
|
invoke-virtual {v0, p1, p2, p3}, Lcom/google/protobuf/ByteString;->writeToInternal(Ljava/io/OutputStream;II)V
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
if-lt p2, v1, :cond_1
|
|
|
|
.line 3
|
|
iget-object v0, p0, Lcom/google/protobuf/RopeByteString;->right:Lcom/google/protobuf/ByteString;
|
|
|
|
sub-int/2addr p2, v1
|
|
|
|
invoke-virtual {v0, p1, p2, p3}, Lcom/google/protobuf/ByteString;->writeToInternal(Ljava/io/OutputStream;II)V
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
sub-int/2addr v1, p2
|
|
|
|
.line 4
|
|
iget-object v0, p0, Lcom/google/protobuf/RopeByteString;->left:Lcom/google/protobuf/ByteString;
|
|
|
|
invoke-virtual {v0, p1, p2, v1}, Lcom/google/protobuf/ByteString;->writeToInternal(Ljava/io/OutputStream;II)V
|
|
|
|
.line 5
|
|
iget-object p2, p0, Lcom/google/protobuf/RopeByteString;->right:Lcom/google/protobuf/ByteString;
|
|
|
|
const/4 v0, 0x0
|
|
|
|
sub-int/2addr p3, v1
|
|
|
|
invoke-virtual {p2, p1, v0, p3}, Lcom/google/protobuf/ByteString;->writeToInternal(Ljava/io/OutputStream;II)V
|
|
|
|
:goto_0
|
|
return-void
|
|
.end method
|