Weather/smali/com/google/protobuf/AbstractMessageLite.smali
2021-05-10 10:13:34 +02:00

181 lines
4.7 KiB
Smali

.class public abstract Lcom/google/protobuf/AbstractMessageLite;
.super Ljava/lang/Object;
.source "AbstractMessageLite.java"
# interfaces
.implements Lcom/google/protobuf/MessageLite;
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Lcom/google/protobuf/AbstractMessageLite$Builder;
}
.end annotation
# direct methods
.method public constructor <init>()V
.locals 0
.line 46
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
# virtual methods
.method public toByteArray()[B
.locals 3
.line 62
:try_start_0
invoke-virtual {p0}, Lcom/google/protobuf/AbstractMessageLite;->getSerializedSize()I
move-result v0
new-array v0, v0, [B
.line 63
invoke-static {v0}, Lcom/google/protobuf/CodedOutputStream;->newInstance([B)Lcom/google/protobuf/CodedOutputStream;
move-result-object v1
.line 64
invoke-virtual {p0, v1}, Lcom/google/protobuf/AbstractMessageLite;->writeTo(Lcom/google/protobuf/CodedOutputStream;)V
.line 65
invoke-virtual {v1}, Lcom/google/protobuf/CodedOutputStream;->checkNoSpaceLeft()V
:try_end_0
.catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0
return-object v0
:catch_0
move-exception v0
.line 68
new-instance v1, Ljava/lang/RuntimeException;
const-string v2, "Serializing to a byte array threw an IOException (should never happen)."
invoke-direct {v1, v2, v0}, Ljava/lang/RuntimeException;-><init>(Ljava/lang/String;Ljava/lang/Throwable;)V
throw v1
.end method
.method public toByteString()Lcom/google/protobuf/ByteString;
.locals 3
.line 49
:try_start_0
invoke-virtual {p0}, Lcom/google/protobuf/AbstractMessageLite;->getSerializedSize()I
move-result v0
invoke-static {v0}, Lcom/google/protobuf/ByteString;->newCodedBuilder(I)Lcom/google/protobuf/ByteString$CodedBuilder;
move-result-object v0
.line 51
invoke-virtual {v0}, Lcom/google/protobuf/ByteString$CodedBuilder;->getCodedOutput()Lcom/google/protobuf/CodedOutputStream;
move-result-object v1
invoke-virtual {p0, v1}, Lcom/google/protobuf/AbstractMessageLite;->writeTo(Lcom/google/protobuf/CodedOutputStream;)V
.line 52
invoke-virtual {v0}, Lcom/google/protobuf/ByteString$CodedBuilder;->build()Lcom/google/protobuf/ByteString;
move-result-object v0
:try_end_0
.catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0
return-object v0
:catch_0
move-exception v0
.line 54
new-instance v1, Ljava/lang/RuntimeException;
const-string v2, "Serializing to a ByteString threw an IOException (should never happen)."
invoke-direct {v1, v2, v0}, Ljava/lang/RuntimeException;-><init>(Ljava/lang/String;Ljava/lang/Throwable;)V
throw v1
.end method
.method public writeDelimitedTo(Ljava/io/OutputStream;)V
.locals 2
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 84
invoke-virtual {p0}, Lcom/google/protobuf/AbstractMessageLite;->getSerializedSize()I
move-result v0
.line 85
invoke-static {v0}, Lcom/google/protobuf/CodedOutputStream;->computeRawVarint32Size(I)I
move-result v1
add-int/2addr v1, v0
invoke-static {v1}, Lcom/google/protobuf/CodedOutputStream;->computePreferredBufferSize(I)I
move-result v1
.line 87
invoke-static {p1, v1}, Lcom/google/protobuf/CodedOutputStream;->newInstance(Ljava/io/OutputStream;I)Lcom/google/protobuf/CodedOutputStream;
move-result-object p1
.line 89
invoke-virtual {p1, v0}, Lcom/google/protobuf/CodedOutputStream;->writeRawVarint32(I)V
.line 90
invoke-virtual {p0, p1}, Lcom/google/protobuf/AbstractMessageLite;->writeTo(Lcom/google/protobuf/CodedOutputStream;)V
.line 91
invoke-virtual {p1}, Lcom/google/protobuf/CodedOutputStream;->flush()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 75
invoke-virtual {p0}, Lcom/google/protobuf/AbstractMessageLite;->getSerializedSize()I
move-result v0
invoke-static {v0}, Lcom/google/protobuf/CodedOutputStream;->computePreferredBufferSize(I)I
move-result v0
.line 77
invoke-static {p1, v0}, Lcom/google/protobuf/CodedOutputStream;->newInstance(Ljava/io/OutputStream;I)Lcom/google/protobuf/CodedOutputStream;
move-result-object p1
.line 79
invoke-virtual {p0, p1}, Lcom/google/protobuf/AbstractMessageLite;->writeTo(Lcom/google/protobuf/CodedOutputStream;)V
.line 80
invoke-virtual {p1}, Lcom/google/protobuf/CodedOutputStream;->flush()V
return-void
.end method