apkfuckery/com.discord/smali_classes2/okio/ByteString$a.smali
2020-09-22 07:09:10 +00:00

195 lines
3.9 KiB
Smali

.class public final Lokio/ByteString$a;
.super Ljava/lang/Object;
.source "ByteString.kt"
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lokio/ByteString;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x19
name = "a"
.end annotation
# direct methods
.method public constructor <init>(Lkotlin/jvm/internal/DefaultConstructorMarker;)V
.locals 0
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
.method public static c(Lokio/ByteString$a;[BIII)Lokio/ByteString;
.locals 6
and-int/lit8 p0, p4, 0x1
if-eqz p0, :cond_0
const/4 p2, 0x0
:cond_0
and-int/lit8 p0, p4, 0x2
if-eqz p0, :cond_1
array-length p3, p1
:cond_1
const-string p0, "$this$toByteString"
invoke-static {p1, p0}, Lc0/n/c/i;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
array-length p0, p1
int-to-long v0, p0
int-to-long v2, p2
int-to-long v4, p3
invoke-static/range {v0 .. v5}, Lc0/j/a;->n(JJJ)V
add-int/2addr p3, p2
invoke-static {p1, p2, p3}, Lc0/i/f;->copyOfRange([BII)[B
move-result-object p0
new-instance p1, Lokio/ByteString;
invoke-direct {p1, p0}, Lokio/ByteString;-><init>([B)V
return-object p1
.end method
# virtual methods
.method public final a(Ljava/lang/String;)Lokio/ByteString;
.locals 5
const-string v0, "$this$decodeHex"
invoke-static {p1, v0}, Lc0/n/c/i;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
invoke-virtual {p1}, Ljava/lang/String;->length()I
move-result v0
rem-int/lit8 v0, v0, 0x2
const/4 v1, 0x0
if-nez v0, :cond_0
const/4 v0, 0x1
goto :goto_0
:cond_0
const/4 v0, 0x0
:goto_0
if-eqz v0, :cond_2
invoke-virtual {p1}, Ljava/lang/String;->length()I
move-result v0
div-int/lit8 v0, v0, 0x2
new-array v2, v0, [B
:goto_1
if-ge v1, v0, :cond_1
mul-int/lit8 v3, v1, 0x2
invoke-virtual {p1, v3}, Ljava/lang/String;->charAt(I)C
move-result v4
invoke-static {v4}, Lh0/z/b;->a(C)I
move-result v4
shl-int/lit8 v4, v4, 0x4
add-int/lit8 v3, v3, 0x1
invoke-virtual {p1, v3}, Ljava/lang/String;->charAt(I)C
move-result v3
invoke-static {v3}, Lh0/z/b;->a(C)I
move-result v3
add-int/2addr v3, v4
int-to-byte v3, v3
aput-byte v3, v2, v1
add-int/lit8 v1, v1, 0x1
goto :goto_1
:cond_1
new-instance p1, Lokio/ByteString;
invoke-direct {p1, v2}, Lokio/ByteString;-><init>([B)V
return-object p1
:cond_2
const-string v0, "Unexpected hex string: "
invoke-static {v0, p1}, Lf/e/b/a/a;->q(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
move-result-object p1
new-instance v0, Ljava/lang/IllegalArgumentException;
invoke-virtual {p1}, Ljava/lang/Object;->toString()Ljava/lang/String;
move-result-object p1
invoke-direct {v0, p1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
throw v0
.end method
.method public final b(Ljava/lang/String;)Lokio/ByteString;
.locals 3
const-string v0, "$this$encodeUtf8"
invoke-static {p1, v0}, Lc0/n/c/i;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
new-instance v0, Lokio/ByteString;
const-string v1, "$this$asUtf8ToByteArray"
invoke-static {p1, v1}, Lc0/n/c/i;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
sget-object v1, Lc0/t/a;->a:Ljava/nio/charset/Charset;
invoke-virtual {p1, v1}, Ljava/lang/String;->getBytes(Ljava/nio/charset/Charset;)[B
move-result-object v1
const-string v2, "(this as java.lang.String).getBytes(charset)"
invoke-static {v1, v2}, Lc0/n/c/i;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
invoke-direct {v0, v1}, Lokio/ByteString;-><init>([B)V
iput-object p1, v0, Lokio/ByteString;->e:Ljava/lang/String;
return-object v0
.end method