apkfuckery/com.discord/smali/androidx/versionedparcelable/VersionedParcelStream$FieldBuffer.smali

111 lines
3.3 KiB
Smali
Raw Normal View History

2019-12-06 03:29:40 +00:00
.class public Landroidx/versionedparcelable/VersionedParcelStream$FieldBuffer;
2019-07-24 11:27:29 +00:00
.super Ljava/lang/Object;
.source "VersionedParcelStream.java"
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Landroidx/versionedparcelable/VersionedParcelStream;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
2019-12-06 03:29:40 +00:00
accessFlags = 0x9
2019-07-24 11:27:29 +00:00
name = "FieldBuffer"
.end annotation
# instance fields
2019-12-06 03:29:40 +00:00
.field public final mDataStream:Ljava/io/DataOutputStream;
2019-07-24 11:27:29 +00:00
2019-12-06 03:29:40 +00:00
.field public final mFieldId:I
2019-07-24 11:27:29 +00:00
2019-12-06 03:29:40 +00:00
.field public final mOutput:Ljava/io/ByteArrayOutputStream;
2019-07-24 11:27:29 +00:00
2019-12-06 03:29:40 +00:00
.field public final mTarget:Ljava/io/DataOutputStream;
2019-07-24 11:27:29 +00:00
# direct methods
2019-12-06 03:29:40 +00:00
.method public constructor <init>(ILjava/io/DataOutputStream;)V
2019-07-24 11:27:29 +00:00
.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;
new-instance v0, Ljava/io/DataOutputStream;
iget-object v1, p0, Landroidx/versionedparcelable/VersionedParcelStream$FieldBuffer;->mOutput:Ljava/io/ByteArrayOutputStream;
invoke-direct {v0, v1}, Ljava/io/DataOutputStream;-><init>(Ljava/io/OutputStream;)V
iput-object v0, p0, Landroidx/versionedparcelable/VersionedParcelStream$FieldBuffer;->mDataStream:Ljava/io/DataOutputStream;
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
2019-12-06 03:29:40 +00:00
.method public flushField()V
2019-07-24 11:27:29 +00:00
.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