2020-11-12 02:11:44 +00:00
|
|
|
.class public Landroidx/versionedparcelable/VersionedParcelStream$FieldBuffer;
|
|
|
|
.super Ljava/lang/Object;
|
|
|
|
.source "VersionedParcelStream.java"
|
|
|
|
|
|
|
|
|
|
|
|
# annotations
|
|
|
|
.annotation system Ldalvik/annotation/EnclosingClass;
|
|
|
|
value = Landroidx/versionedparcelable/VersionedParcelStream;
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
.annotation system Ldalvik/annotation/InnerClass;
|
|
|
|
accessFlags = 0x9
|
|
|
|
name = "FieldBuffer"
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
|
|
|
|
# instance fields
|
|
|
|
.field public final mDataStream:Ljava/io/DataOutputStream;
|
|
|
|
|
2020-11-21 21:10:53 +00:00
|
|
|
.field public final mFieldId:I
|
2020-11-12 02:11:44 +00:00
|
|
|
|
|
|
|
.field public final mOutput:Ljava/io/ByteArrayOutputStream;
|
|
|
|
|
2020-11-21 21:10:53 +00:00
|
|
|
.field public final mTarget:Ljava/io/DataOutputStream;
|
2020-11-12 02:11:44 +00:00
|
|
|
|
|
|
|
|
|
|
|
# direct methods
|
|
|
|
.method public constructor <init>(ILjava/io/DataOutputStream;)V
|
|
|
|
.locals 2
|
|
|
|
|
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
|
|
|
|
new-instance v0, Ljava/io/ByteArrayOutputStream;
|
|
|
|
|
|
|
|
invoke-direct {v0}, Ljava/io/ByteArrayOutputStream;-><init>()V
|
|
|
|
|
|
|
|
iput-object v0, p0, Landroidx/versionedparcelable/VersionedParcelStream$FieldBuffer;->mOutput:Ljava/io/ByteArrayOutputStream;
|
|
|
|
|
2020-11-21 21:10:53 +00:00
|
|
|
new-instance v0, Ljava/io/DataOutputStream;
|
2020-11-12 02:11:44 +00:00
|
|
|
|
2020-11-21 21:10:53 +00:00
|
|
|
iget-object v1, p0, Landroidx/versionedparcelable/VersionedParcelStream$FieldBuffer;->mOutput:Ljava/io/ByteArrayOutputStream;
|
2020-11-12 02:11:44 +00:00
|
|
|
|
2020-11-21 21:10:53 +00:00
|
|
|
invoke-direct {v0, v1}, Ljava/io/DataOutputStream;-><init>(Ljava/io/OutputStream;)V
|
|
|
|
|
|
|
|
iput-object v0, p0, Landroidx/versionedparcelable/VersionedParcelStream$FieldBuffer;->mDataStream:Ljava/io/DataOutputStream;
|
2020-11-12 02:11:44 +00:00
|
|
|
|
|
|
|
iput p1, p0, Landroidx/versionedparcelable/VersionedParcelStream$FieldBuffer;->mFieldId:I
|
|
|
|
|
|
|
|
iput-object p2, p0, Landroidx/versionedparcelable/VersionedParcelStream$FieldBuffer;->mTarget:Ljava/io/DataOutputStream;
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
|
|
|
|
# virtual methods
|
|
|
|
.method public flushField()V
|
|
|
|
.locals 4
|
|
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
|
|
value = {
|
|
|
|
Ljava/io/IOException;
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
iget-object v0, p0, Landroidx/versionedparcelable/VersionedParcelStream$FieldBuffer;->mDataStream:Ljava/io/DataOutputStream;
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Ljava/io/DataOutputStream;->flush()V
|
|
|
|
|
|
|
|
iget-object v0, p0, Landroidx/versionedparcelable/VersionedParcelStream$FieldBuffer;->mOutput:Ljava/io/ByteArrayOutputStream;
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Ljava/io/ByteArrayOutputStream;->size()I
|
|
|
|
|
|
|
|
move-result v0
|
|
|
|
|
|
|
|
iget v1, p0, Landroidx/versionedparcelable/VersionedParcelStream$FieldBuffer;->mFieldId:I
|
|
|
|
|
|
|
|
shl-int/lit8 v1, v1, 0x10
|
|
|
|
|
|
|
|
const v2, 0xffff
|
|
|
|
|
|
|
|
if-lt v0, v2, :cond_0
|
|
|
|
|
|
|
|
const v3, 0xffff
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
move v3, v0
|
|
|
|
|
|
|
|
:goto_0
|
|
|
|
or-int/2addr v1, v3
|
|
|
|
|
|
|
|
iget-object v3, p0, Landroidx/versionedparcelable/VersionedParcelStream$FieldBuffer;->mTarget:Ljava/io/DataOutputStream;
|
|
|
|
|
|
|
|
invoke-virtual {v3, v1}, Ljava/io/DataOutputStream;->writeInt(I)V
|
|
|
|
|
|
|
|
if-lt v0, v2, :cond_1
|
|
|
|
|
|
|
|
iget-object v1, p0, Landroidx/versionedparcelable/VersionedParcelStream$FieldBuffer;->mTarget:Ljava/io/DataOutputStream;
|
|
|
|
|
|
|
|
invoke-virtual {v1, v0}, Ljava/io/DataOutputStream;->writeInt(I)V
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
iget-object v0, p0, Landroidx/versionedparcelable/VersionedParcelStream$FieldBuffer;->mOutput:Ljava/io/ByteArrayOutputStream;
|
|
|
|
|
|
|
|
iget-object v1, p0, Landroidx/versionedparcelable/VersionedParcelStream$FieldBuffer;->mTarget:Ljava/io/DataOutputStream;
|
|
|
|
|
|
|
|
invoke-virtual {v0, v1}, Ljava/io/ByteArrayOutputStream;->writeTo(Ljava/io/OutputStream;)V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|