apkfuckery/com.discord/smali_classes2/com/esotericsoftware/kryo/serializers/DefaultSerializers$BigIntegerSerializer.smali
2019-07-31 02:08:31 +02:00

236 lines
5.8 KiB
Smali

.class public Lcom/esotericsoftware/kryo/serializers/DefaultSerializers$BigIntegerSerializer;
.super Lcom/esotericsoftware/kryo/Serializer;
.source "DefaultSerializers.java"
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lcom/esotericsoftware/kryo/serializers/DefaultSerializers;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x9
name = "BigIntegerSerializer"
.end annotation
.annotation system Ldalvik/annotation/Signature;
value = {
"Lcom/esotericsoftware/kryo/Serializer<",
"Ljava/math/BigInteger;",
">;"
}
.end annotation
# direct methods
.method public constructor <init>()V
.locals 1
invoke-direct {p0}, Lcom/esotericsoftware/kryo/Serializer;-><init>()V
const/4 v0, 0x1
invoke-virtual {p0, v0}, Lcom/esotericsoftware/kryo/serializers/DefaultSerializers$BigIntegerSerializer;->setImmutable(Z)V
invoke-virtual {p0, v0}, Lcom/esotericsoftware/kryo/serializers/DefaultSerializers$BigIntegerSerializer;->setAcceptsNull(Z)V
return-void
.end method
# virtual methods
.method public bridge synthetic read(Lcom/esotericsoftware/kryo/Kryo;Lcom/esotericsoftware/kryo/io/Input;Ljava/lang/Class;)Ljava/lang/Object;
.locals 0
invoke-virtual {p0, p1, p2, p3}, Lcom/esotericsoftware/kryo/serializers/DefaultSerializers$BigIntegerSerializer;->read(Lcom/esotericsoftware/kryo/Kryo;Lcom/esotericsoftware/kryo/io/Input;Ljava/lang/Class;)Ljava/math/BigInteger;
move-result-object p1
return-object p1
.end method
.method public read(Lcom/esotericsoftware/kryo/Kryo;Lcom/esotericsoftware/kryo/io/Input;Ljava/lang/Class;)Ljava/math/BigInteger;
.locals 3
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Lcom/esotericsoftware/kryo/Kryo;",
"Lcom/esotericsoftware/kryo/io/Input;",
"Ljava/lang/Class<",
"Ljava/math/BigInteger;",
">;)",
"Ljava/math/BigInteger;"
}
.end annotation
const/4 p1, 0x1
invoke-virtual {p2, p1}, Lcom/esotericsoftware/kryo/io/Input;->readVarInt(Z)I
move-result v0
if-nez v0, :cond_0
const/4 p1, 0x0
return-object p1
:cond_0
add-int/lit8 v1, v0, -0x1
invoke-virtual {p2, v1}, Lcom/esotericsoftware/kryo/io/Input;->readBytes(I)[B
move-result-object p2
const-class v1, Ljava/math/BigInteger;
const/4 v2, 0x0
if-eq p3, v1, :cond_2
if-eqz p3, :cond_2
:try_start_0
new-array v0, p1, [Ljava/lang/Class;
const-class v1, [B
aput-object v1, v0, v2
invoke-virtual {p3, v0}, Ljava/lang/Class;->getConstructor([Ljava/lang/Class;)Ljava/lang/reflect/Constructor;
move-result-object p3
invoke-virtual {p3}, Ljava/lang/reflect/Constructor;->isAccessible()Z
move-result v0
:try_end_0
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_1
if-nez v0, :cond_1
:try_start_1
invoke-virtual {p3, p1}, Ljava/lang/reflect/Constructor;->setAccessible(Z)V
:try_end_1
.catch Ljava/lang/SecurityException; {:try_start_1 .. :try_end_1} :catch_0
.catch Ljava/lang/Exception; {:try_start_1 .. :try_end_1} :catch_1
:catch_0
:cond_1
:try_start_2
new-array p1, p1, [Ljava/lang/Object;
aput-object p2, p1, v2
invoke-virtual {p3, p1}, Ljava/lang/reflect/Constructor;->newInstance([Ljava/lang/Object;)Ljava/lang/Object;
move-result-object p1
check-cast p1, Ljava/math/BigInteger;
:try_end_2
.catch Ljava/lang/Exception; {:try_start_2 .. :try_end_2} :catch_1
return-object p1
:catch_1
move-exception p1
new-instance p2, Lcom/esotericsoftware/kryo/KryoException;
invoke-direct {p2, p1}, Lcom/esotericsoftware/kryo/KryoException;-><init>(Ljava/lang/Throwable;)V
throw p2
:cond_2
const/4 p3, 0x2
if-ne v0, p3, :cond_6
aget-byte p3, p2, v2
if-eqz p3, :cond_5
if-eq p3, p1, :cond_4
const/16 p1, 0xa
if-eq p3, p1, :cond_3
goto :goto_0
:cond_3
sget-object p1, Ljava/math/BigInteger;->TEN:Ljava/math/BigInteger;
return-object p1
:cond_4
sget-object p1, Ljava/math/BigInteger;->ONE:Ljava/math/BigInteger;
return-object p1
:cond_5
sget-object p1, Ljava/math/BigInteger;->ZERO:Ljava/math/BigInteger;
return-object p1
:cond_6
:goto_0
new-instance p1, Ljava/math/BigInteger;
invoke-direct {p1, p2}, Ljava/math/BigInteger;-><init>([B)V
return-object p1
.end method
.method public bridge synthetic write(Lcom/esotericsoftware/kryo/Kryo;Lcom/esotericsoftware/kryo/io/Output;Ljava/lang/Object;)V
.locals 0
check-cast p3, Ljava/math/BigInteger;
invoke-virtual {p0, p1, p2, p3}, Lcom/esotericsoftware/kryo/serializers/DefaultSerializers$BigIntegerSerializer;->write(Lcom/esotericsoftware/kryo/Kryo;Lcom/esotericsoftware/kryo/io/Output;Ljava/math/BigInteger;)V
return-void
.end method
.method public write(Lcom/esotericsoftware/kryo/Kryo;Lcom/esotericsoftware/kryo/io/Output;Ljava/math/BigInteger;)V
.locals 2
const/4 p1, 0x0
const/4 v0, 0x1
if-nez p3, :cond_0
invoke-virtual {p2, p1, v0}, Lcom/esotericsoftware/kryo/io/Output;->writeVarInt(IZ)I
return-void
:cond_0
sget-object v1, Ljava/math/BigInteger;->ZERO:Ljava/math/BigInteger;
if-ne p3, v1, :cond_1
const/4 p3, 0x2
invoke-virtual {p2, p3, v0}, Lcom/esotericsoftware/kryo/io/Output;->writeVarInt(IZ)I
invoke-virtual {p2, p1}, Lcom/esotericsoftware/kryo/io/Output;->writeByte(I)V
return-void
:cond_1
invoke-virtual {p3}, Ljava/math/BigInteger;->toByteArray()[B
move-result-object p1
array-length p3, p1
add-int/2addr p3, v0
invoke-virtual {p2, p3, v0}, Lcom/esotericsoftware/kryo/io/Output;->writeVarInt(IZ)I
invoke-virtual {p2, p1}, Lcom/esotericsoftware/kryo/io/Output;->writeBytes([B)V
return-void
.end method