87 lines
2.0 KiB
Smali
87 lines
2.0 KiB
Smali
.class public final Lcom/google/protobuf/CodedOutputStream$HeapNioEncoder;
|
|
.super Lcom/google/protobuf/CodedOutputStream$ArrayEncoder;
|
|
.source "SourceFile"
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/EnclosingClass;
|
|
value = Lcom/google/protobuf/CodedOutputStream;
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/InnerClass;
|
|
accessFlags = 0x19
|
|
name = "HeapNioEncoder"
|
|
.end annotation
|
|
|
|
|
|
# instance fields
|
|
.field private final byteBuffer:Ljava/nio/ByteBuffer;
|
|
|
|
.field private initialPosition:I
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(Ljava/nio/ByteBuffer;)V
|
|
.locals 3
|
|
|
|
.line 1515
|
|
invoke-virtual {p1}, Ljava/nio/ByteBuffer;->array()[B
|
|
|
|
move-result-object v0
|
|
|
|
.line 1516
|
|
invoke-virtual {p1}, Ljava/nio/ByteBuffer;->arrayOffset()I
|
|
|
|
move-result v1
|
|
|
|
invoke-virtual {p1}, Ljava/nio/Buffer;->position()I
|
|
|
|
move-result v2
|
|
|
|
add-int/2addr v1, v2
|
|
|
|
.line 1517
|
|
invoke-virtual {p1}, Ljava/nio/Buffer;->remaining()I
|
|
|
|
move-result v2
|
|
|
|
.line 1514
|
|
invoke-direct {p0, v0, v1, v2}, Lcom/google/protobuf/CodedOutputStream$ArrayEncoder;-><init>([BII)V
|
|
|
|
iput-object p1, p0, Lcom/google/protobuf/CodedOutputStream$HeapNioEncoder;->byteBuffer:Ljava/nio/ByteBuffer;
|
|
|
|
.line 1519
|
|
invoke-virtual {p1}, Ljava/nio/Buffer;->position()I
|
|
|
|
move-result p1
|
|
|
|
iput p1, p0, Lcom/google/protobuf/CodedOutputStream$HeapNioEncoder;->initialPosition:I
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public flush()V
|
|
.locals 3
|
|
|
|
iget-object v0, p0, Lcom/google/protobuf/CodedOutputStream$HeapNioEncoder;->byteBuffer:Ljava/nio/ByteBuffer;
|
|
|
|
iget v1, p0, Lcom/google/protobuf/CodedOutputStream$HeapNioEncoder;->initialPosition:I
|
|
|
|
.line 1525
|
|
invoke-virtual {p0}, Lcom/google/protobuf/CodedOutputStream$ArrayEncoder;->getTotalBytesWritten()I
|
|
|
|
move-result v2
|
|
|
|
add-int/2addr v1, v2
|
|
|
|
invoke-virtual {v0, v1}, Ljava/nio/ByteBuffer;->position(I)Ljava/nio/Buffer;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Ljava/nio/ByteBuffer;
|
|
|
|
return-void
|
|
.end method
|