mirror of
https://github.com/Pinball3D/Rabbit-R1.git
synced 2024-12-25 16:42:30 -06:00
730 lines
21 KiB
Smali
730 lines
21 KiB
Smali
.class public final Lokio/ByteString$Companion;
|
|
.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 = "Companion"
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/SourceDebugExtension;
|
|
value = "SMAP\nByteString.kt\nKotlin\n*S Kotlin\n*F\n+ 1 ByteString.kt\nokio/ByteString$Companion\n+ 2 ByteString.kt\nokio/internal/ByteStringKt\n+ 3 fake.kt\nkotlin/jvm/internal/FakeKt\n*L\n1#1,338:1\n252#2:339\n256#2,2:340\n262#2,3:342\n269#2,2:345\n275#2:347\n277#2,7:349\n1#3:348\n1#3:356\n*E\n*S KotlinDebug\n*F\n+ 1 ByteString.kt\nokio/ByteString$Companion\n*L\n222#1:339\n227#1,2:340\n239#1,3:342\n247#1,2:345\n250#1:347\n250#1,7:349\n250#1:348\n*E\n"
|
|
.end annotation
|
|
|
|
.annotation runtime Lkotlin/Metadata;
|
|
bv = {
|
|
0x1,
|
|
0x0,
|
|
0x3
|
|
}
|
|
d1 = {
|
|
"\u0000N\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\u0008\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\t\n\u0002\u0008\u0002\n\u0002\u0010\u000e\n\u0002\u0008\u0005\n\u0002\u0018\u0002\n\u0002\u0008\u0005\n\u0002\u0018\u0002\n\u0002\u0008\u0002\n\u0002\u0010\u0012\n\u0002\u0010\u0005\n\u0002\u0008\u0002\n\u0002\u0010\u0008\n\u0002\u0008\u0003\n\u0002\u0018\u0002\n\u0002\u0008\u0005\u0008\u0086\u0003\u0018\u00002\u00020\u0001B\u0007\u0008\u0002\u00a2\u0006\u0002\u0010\u0002J\u0017\u0010\u0007\u001a\u0004\u0018\u00010\u00042\u0006\u0010\u0008\u001a\u00020\tH\u0007\u00a2\u0006\u0002\u0008\nJ\u0015\u0010\u000b\u001a\u00020\u00042\u0006\u0010\u0008\u001a\u00020\tH\u0007\u00a2\u0006\u0002\u0008\u000cJ\u001d\u0010\r\u001a\u00020\u00042\u0006\u0010\u0008\u001a\u00020\t2\u0006\u0010\u000e\u001a\u00020\u000fH\u0007\u00a2\u0006\u0002\u0008\u0010J\u0015\u0010\u0011\u001a\u00020\u00042\u0006\u0010\u0008\u001a\u00020\tH\u0007\u00a2\u0006\u0002\u0008\u0012J\u0015\u0010\u0013\u001a\u00020\u00042\u0006\u0010\u0014\u001a\u00020\u0015H\u0007\u00a2\u0006\u0002\u0008\u0016J\u0014\u0010\u0013\u001a\u00020\u00042\n\u0010\u0017\u001a\u00020\u0018\"\u00020\u0019H\u0007J%\u0010\u0013\u001a\u00020\u00042\u0006\u0010\u001a\u001a\u00020\u00182\u0006\u0010\u001b\u001a\u00020\u001c2\u0006\u0010\u001d\u001a\u00020\u001cH\u0007\u00a2\u0006\u0002\u0008\u0016J\u001d\u0010\u001e\u001a\u00020\u00042\u0006\u0010\u001f\u001a\u00020 2\u0006\u0010\u001d\u001a\u00020\u001cH\u0007\u00a2\u0006\u0002\u0008!J\u000e\u0010\u0007\u001a\u0004\u0018\u00010\u0004*\u00020\tH\u0007J\u000c\u0010\u000b\u001a\u00020\u0004*\u00020\tH\u0007J\u001b\u0010\"\u001a\u00020\u0004*\u00020\t2\u0008\u0008\u0002\u0010\u000e\u001a\u00020\u000fH\u0007\u00a2\u0006\u0002\u0008\rJ\u000c\u0010\u0011\u001a\u00020\u0004*\u00020\tH\u0007J\u0019\u0010#\u001a\u00020\u0004*\u00020 2\u0006\u0010\u001d\u001a\u00020\u001cH\u0007\u00a2\u0006\u0002\u0008\u001eJ\u0011\u0010$\u001a\u00020\u0004*\u00020\u0015H\u0007\u00a2\u0006\u0002\u0008\u0013J%\u0010$\u001a\u00020\u0004*\u00020\u00182\u0008\u0008\u0002\u0010\u001b\u001a\u00020\u001c2\u0008\u0008\u0002\u0010\u001d\u001a\u00020\u001cH\u0007\u00a2\u0006\u0002\u0008\u0013R\u0010\u0010\u0003\u001a\u00020\u00048\u0006X\u0087\u0004\u00a2\u0006\u0002\n\u0000R\u000e\u0010\u0005\u001a\u00020\u0006X\u0082T\u00a2\u0006\u0002\n\u0000\u00a8\u0006%"
|
|
}
|
|
d2 = {
|
|
"Lokio/ByteString$Companion;",
|
|
"",
|
|
"()V",
|
|
"EMPTY",
|
|
"Lokio/ByteString;",
|
|
"serialVersionUID",
|
|
"",
|
|
"decodeBase64",
|
|
"string",
|
|
"",
|
|
"-deprecated_decodeBase64",
|
|
"decodeHex",
|
|
"-deprecated_decodeHex",
|
|
"encodeString",
|
|
"charset",
|
|
"Ljava/nio/charset/Charset;",
|
|
"-deprecated_encodeString",
|
|
"encodeUtf8",
|
|
"-deprecated_encodeUtf8",
|
|
"of",
|
|
"buffer",
|
|
"Ljava/nio/ByteBuffer;",
|
|
"-deprecated_of",
|
|
"data",
|
|
"",
|
|
"",
|
|
"array",
|
|
"offset",
|
|
"",
|
|
"byteCount",
|
|
"read",
|
|
"inputstream",
|
|
"Ljava/io/InputStream;",
|
|
"-deprecated_read",
|
|
"encode",
|
|
"readByteString",
|
|
"toByteString",
|
|
"okio"
|
|
}
|
|
k = 0x1
|
|
mv = {
|
|
0x1,
|
|
0x4,
|
|
0x0
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# direct methods
|
|
.method private constructor <init>()V
|
|
.locals 0
|
|
|
|
.line 215
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public synthetic constructor <init>(Lkotlin/jvm/internal/DefaultConstructorMarker;)V
|
|
.locals 0
|
|
|
|
.line 215
|
|
invoke-direct {p0}, Lokio/ByteString$Companion;-><init>()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static synthetic encodeString$default(Lokio/ByteString$Companion;Ljava/lang/String;Ljava/nio/charset/Charset;ILjava/lang/Object;)Lokio/ByteString;
|
|
.locals 0
|
|
|
|
and-int/lit8 p3, p3, 0x1
|
|
|
|
if-eqz p3, :cond_0
|
|
|
|
.line 244
|
|
sget-object p2, Lkotlin/text/Charsets;->UTF_8:Ljava/nio/charset/Charset;
|
|
|
|
:cond_0
|
|
invoke-virtual {p0, p1, p2}, Lokio/ByteString$Companion;->encodeString(Ljava/lang/String;Ljava/nio/charset/Charset;)Lokio/ByteString;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static synthetic of$default(Lokio/ByteString$Companion;[BIIILjava/lang/Object;)Lokio/ByteString;
|
|
.locals 0
|
|
|
|
and-int/lit8 p5, p4, 0x1
|
|
|
|
if-eqz p5, :cond_0
|
|
|
|
const/4 p2, 0x0
|
|
|
|
:cond_0
|
|
and-int/lit8 p4, p4, 0x2
|
|
|
|
if-eqz p4, :cond_1
|
|
|
|
array-length p3, p1
|
|
|
|
:cond_1
|
|
invoke-virtual {p0, p1, p2, p3}, Lokio/ByteString$Companion;->of([BII)Lokio/ByteString;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public final -deprecated_decodeBase64(Ljava/lang/String;)Lokio/ByteString;
|
|
.locals 1
|
|
.annotation runtime Lkotlin/Deprecated;
|
|
level = .enum Lkotlin/DeprecationLevel;->ERROR:Lkotlin/DeprecationLevel;
|
|
message = "moved to extension function"
|
|
replaceWith = .subannotation Lkotlin/ReplaceWith;
|
|
expression = "string.decodeBase64()"
|
|
imports = {
|
|
"okio.ByteString.Companion.decodeBase64"
|
|
}
|
|
.end subannotation
|
|
.end annotation
|
|
|
|
const-string v0, "string"
|
|
|
|
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
.line 281
|
|
move-object v0, p0
|
|
|
|
check-cast v0, Lokio/ByteString$Companion;
|
|
|
|
invoke-virtual {p0, p1}, Lokio/ByteString$Companion;->decodeBase64(Ljava/lang/String;)Lokio/ByteString;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public final -deprecated_decodeHex(Ljava/lang/String;)Lokio/ByteString;
|
|
.locals 1
|
|
.annotation runtime Lkotlin/Deprecated;
|
|
level = .enum Lkotlin/DeprecationLevel;->ERROR:Lkotlin/DeprecationLevel;
|
|
message = "moved to extension function"
|
|
replaceWith = .subannotation Lkotlin/ReplaceWith;
|
|
expression = "string.decodeHex()"
|
|
imports = {
|
|
"okio.ByteString.Companion.decodeHex"
|
|
}
|
|
.end subannotation
|
|
.end annotation
|
|
|
|
const-string v0, "string"
|
|
|
|
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
.line 290
|
|
move-object v0, p0
|
|
|
|
check-cast v0, Lokio/ByteString$Companion;
|
|
|
|
invoke-virtual {p0, p1}, Lokio/ByteString$Companion;->decodeHex(Ljava/lang/String;)Lokio/ByteString;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public final -deprecated_encodeString(Ljava/lang/String;Ljava/nio/charset/Charset;)Lokio/ByteString;
|
|
.locals 1
|
|
.annotation runtime Lkotlin/Deprecated;
|
|
level = .enum Lkotlin/DeprecationLevel;->ERROR:Lkotlin/DeprecationLevel;
|
|
message = "moved to extension function"
|
|
replaceWith = .subannotation Lkotlin/ReplaceWith;
|
|
expression = "string.encode(charset)"
|
|
imports = {
|
|
"okio.ByteString.Companion.encode"
|
|
}
|
|
.end subannotation
|
|
.end annotation
|
|
|
|
const-string v0, "string"
|
|
|
|
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const-string v0, "charset"
|
|
|
|
invoke-static {p2, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
.line 299
|
|
move-object v0, p0
|
|
|
|
check-cast v0, Lokio/ByteString$Companion;
|
|
|
|
invoke-virtual {p0, p1, p2}, Lokio/ByteString$Companion;->encodeString(Ljava/lang/String;Ljava/nio/charset/Charset;)Lokio/ByteString;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public final -deprecated_encodeUtf8(Ljava/lang/String;)Lokio/ByteString;
|
|
.locals 1
|
|
.annotation runtime Lkotlin/Deprecated;
|
|
level = .enum Lkotlin/DeprecationLevel;->ERROR:Lkotlin/DeprecationLevel;
|
|
message = "moved to extension function"
|
|
replaceWith = .subannotation Lkotlin/ReplaceWith;
|
|
expression = "string.encodeUtf8()"
|
|
imports = {
|
|
"okio.ByteString.Companion.encodeUtf8"
|
|
}
|
|
.end subannotation
|
|
.end annotation
|
|
|
|
const-string v0, "string"
|
|
|
|
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
.line 308
|
|
move-object v0, p0
|
|
|
|
check-cast v0, Lokio/ByteString$Companion;
|
|
|
|
invoke-virtual {p0, p1}, Lokio/ByteString$Companion;->encodeUtf8(Ljava/lang/String;)Lokio/ByteString;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public final -deprecated_of(Ljava/nio/ByteBuffer;)Lokio/ByteString;
|
|
.locals 1
|
|
.annotation runtime Lkotlin/Deprecated;
|
|
level = .enum Lkotlin/DeprecationLevel;->ERROR:Lkotlin/DeprecationLevel;
|
|
message = "moved to extension function"
|
|
replaceWith = .subannotation Lkotlin/ReplaceWith;
|
|
expression = "buffer.toByteString()"
|
|
imports = {
|
|
"okio.ByteString.Companion.toByteString"
|
|
}
|
|
.end subannotation
|
|
.end annotation
|
|
|
|
const-string v0, "buffer"
|
|
|
|
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
.line 317
|
|
move-object v0, p0
|
|
|
|
check-cast v0, Lokio/ByteString$Companion;
|
|
|
|
invoke-virtual {p0, p1}, Lokio/ByteString$Companion;->of(Ljava/nio/ByteBuffer;)Lokio/ByteString;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public final -deprecated_of([BII)Lokio/ByteString;
|
|
.locals 1
|
|
.annotation runtime Lkotlin/Deprecated;
|
|
level = .enum Lkotlin/DeprecationLevel;->ERROR:Lkotlin/DeprecationLevel;
|
|
message = "moved to extension function"
|
|
replaceWith = .subannotation Lkotlin/ReplaceWith;
|
|
expression = "array.toByteString(offset, byteCount)"
|
|
imports = {
|
|
"okio.ByteString.Companion.toByteString"
|
|
}
|
|
.end subannotation
|
|
.end annotation
|
|
|
|
const-string v0, "array"
|
|
|
|
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
.line 326
|
|
move-object v0, p0
|
|
|
|
check-cast v0, Lokio/ByteString$Companion;
|
|
|
|
invoke-virtual {p0, p1, p2, p3}, Lokio/ByteString$Companion;->of([BII)Lokio/ByteString;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public final -deprecated_read(Ljava/io/InputStream;I)Lokio/ByteString;
|
|
.locals 1
|
|
.annotation runtime Lkotlin/Deprecated;
|
|
level = .enum Lkotlin/DeprecationLevel;->ERROR:Lkotlin/DeprecationLevel;
|
|
message = "moved to extension function"
|
|
replaceWith = .subannotation Lkotlin/ReplaceWith;
|
|
expression = "inputstream.readByteString(byteCount)"
|
|
imports = {
|
|
"okio.ByteString.Companion.readByteString"
|
|
}
|
|
.end subannotation
|
|
.end annotation
|
|
|
|
const-string v0, "inputstream"
|
|
|
|
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
.line 335
|
|
move-object v0, p0
|
|
|
|
check-cast v0, Lokio/ByteString$Companion;
|
|
|
|
invoke-virtual {p0, p1, p2}, Lokio/ByteString$Companion;->read(Ljava/io/InputStream;I)Lokio/ByteString;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public final decodeBase64(Ljava/lang/String;)Lokio/ByteString;
|
|
.locals 0
|
|
.annotation runtime Lkotlin/jvm/JvmStatic;
|
|
.end annotation
|
|
|
|
const-string p0, "$this$decodeBase64"
|
|
|
|
invoke-static {p1, p0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
.line 345
|
|
invoke-static {p1}, Lokio/-Base64;->decodeBase64ToArray(Ljava/lang/String;)[B
|
|
|
|
move-result-object p0
|
|
|
|
if-eqz p0, :cond_0
|
|
|
|
.line 346
|
|
new-instance p1, Lokio/ByteString;
|
|
|
|
invoke-direct {p1, p0}, Lokio/ByteString;-><init>([B)V
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 p1, 0x0
|
|
|
|
:goto_0
|
|
return-object p1
|
|
.end method
|
|
|
|
.method public final decodeHex(Ljava/lang/String;)Lokio/ByteString;
|
|
.locals 5
|
|
.annotation runtime Lkotlin/jvm/JvmStatic;
|
|
.end annotation
|
|
|
|
const-string p0, "$this$decodeHex"
|
|
|
|
invoke-static {p1, p0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
.line 347
|
|
invoke-virtual {p1}, Ljava/lang/String;->length()I
|
|
|
|
move-result p0
|
|
|
|
rem-int/lit8 p0, p0, 0x2
|
|
|
|
const/4 v0, 0x0
|
|
|
|
const/4 v1, 0x1
|
|
|
|
if-nez p0, :cond_0
|
|
|
|
move p0, v1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
move p0, v0
|
|
|
|
:goto_0
|
|
if-eqz p0, :cond_2
|
|
|
|
.line 349
|
|
invoke-virtual {p1}, Ljava/lang/String;->length()I
|
|
|
|
move-result p0
|
|
|
|
div-int/lit8 p0, p0, 0x2
|
|
|
|
new-array v2, p0, [B
|
|
|
|
:goto_1
|
|
if-ge v0, p0, :cond_1
|
|
|
|
mul-int/lit8 v3, v0, 0x2
|
|
|
|
.line 351
|
|
invoke-virtual {p1, v3}, Ljava/lang/String;->charAt(I)C
|
|
|
|
move-result v4
|
|
|
|
invoke-static {v4}, Lokio/internal/ByteStringKt;->access$decodeHexDigit(C)I
|
|
|
|
move-result v4
|
|
|
|
shl-int/lit8 v4, v4, 0x4
|
|
|
|
add-int/2addr v3, v1
|
|
|
|
.line 352
|
|
invoke-virtual {p1, v3}, Ljava/lang/String;->charAt(I)C
|
|
|
|
move-result v3
|
|
|
|
invoke-static {v3}, Lokio/internal/ByteStringKt;->access$decodeHexDigit(C)I
|
|
|
|
move-result v3
|
|
|
|
add-int/2addr v4, v3
|
|
|
|
int-to-byte v3, v4
|
|
|
|
.line 353
|
|
aput-byte v3, v2, v0
|
|
|
|
add-int/lit8 v0, v0, 0x1
|
|
|
|
goto :goto_1
|
|
|
|
.line 355
|
|
:cond_1
|
|
new-instance p0, Lokio/ByteString;
|
|
|
|
invoke-direct {p0, v2}, Lokio/ByteString;-><init>([B)V
|
|
|
|
return-object p0
|
|
|
|
.line 347
|
|
:cond_2
|
|
new-instance p0, Ljava/lang/StringBuilder;
|
|
|
|
const-string v0, "Unexpected hex string: "
|
|
|
|
invoke-direct {p0, v0}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
|
|
|
|
invoke-virtual {p0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-virtual {p0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
new-instance p1, Ljava/lang/IllegalArgumentException;
|
|
|
|
invoke-virtual {p0}, Ljava/lang/Object;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-direct {p1, p0}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
|
|
|
|
check-cast p1, Ljava/lang/Throwable;
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method public final encodeString(Ljava/lang/String;Ljava/nio/charset/Charset;)Lokio/ByteString;
|
|
.locals 0
|
|
.annotation runtime Lkotlin/jvm/JvmStatic;
|
|
.end annotation
|
|
|
|
const-string p0, "$this$encode"
|
|
|
|
invoke-static {p1, p0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const-string p0, "charset"
|
|
|
|
invoke-static {p2, p0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
.line 244
|
|
new-instance p0, Lokio/ByteString;
|
|
|
|
invoke-virtual {p1, p2}, Ljava/lang/String;->getBytes(Ljava/nio/charset/Charset;)[B
|
|
|
|
move-result-object p1
|
|
|
|
const-string p2, "(this as java.lang.String).getBytes(charset)"
|
|
|
|
invoke-static {p1, p2}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-direct {p0, p1}, Lokio/ByteString;-><init>([B)V
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public final encodeUtf8(Ljava/lang/String;)Lokio/ByteString;
|
|
.locals 1
|
|
.annotation runtime Lkotlin/jvm/JvmStatic;
|
|
.end annotation
|
|
|
|
const-string p0, "$this$encodeUtf8"
|
|
|
|
invoke-static {p1, p0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
.line 342
|
|
new-instance p0, Lokio/ByteString;
|
|
|
|
invoke-static {p1}, Lokio/-Platform;->asUtf8ToByteArray(Ljava/lang/String;)[B
|
|
|
|
move-result-object v0
|
|
|
|
invoke-direct {p0, v0}, Lokio/ByteString;-><init>([B)V
|
|
|
|
.line 343
|
|
invoke-virtual {p0, p1}, Lokio/ByteString;->setUtf8$okio(Ljava/lang/String;)V
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public final of(Ljava/nio/ByteBuffer;)Lokio/ByteString;
|
|
.locals 0
|
|
.annotation runtime Lkotlin/jvm/JvmStatic;
|
|
.end annotation
|
|
|
|
const-string p0, "$this$toByteString"
|
|
|
|
invoke-static {p1, p0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
.line 233
|
|
invoke-virtual {p1}, Ljava/nio/ByteBuffer;->remaining()I
|
|
|
|
move-result p0
|
|
|
|
new-array p0, p0, [B
|
|
|
|
.line 234
|
|
invoke-virtual {p1, p0}, Ljava/nio/ByteBuffer;->get([B)Ljava/nio/ByteBuffer;
|
|
|
|
.line 235
|
|
new-instance p1, Lokio/ByteString;
|
|
|
|
invoke-direct {p1, p0}, Lokio/ByteString;-><init>([B)V
|
|
|
|
return-object p1
|
|
.end method
|
|
|
|
.method public final varargs of([B)Lokio/ByteString;
|
|
.locals 1
|
|
.annotation runtime Lkotlin/jvm/JvmStatic;
|
|
.end annotation
|
|
|
|
const-string p0, "data"
|
|
|
|
invoke-static {p1, p0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
.line 339
|
|
new-instance p0, Lokio/ByteString;
|
|
|
|
array-length v0, p1
|
|
|
|
invoke-static {p1, v0}, Ljava/util/Arrays;->copyOf([BI)[B
|
|
|
|
move-result-object p1
|
|
|
|
const-string v0, "java.util.Arrays.copyOf(this, size)"
|
|
|
|
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-direct {p0, p1}, Lokio/ByteString;-><init>([B)V
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public final of([BII)Lokio/ByteString;
|
|
.locals 6
|
|
.annotation runtime Lkotlin/jvm/JvmStatic;
|
|
.end annotation
|
|
|
|
const-string p0, "$this$toByteString"
|
|
|
|
invoke-static {p1, p0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
.line 340
|
|
array-length p0, p1
|
|
|
|
int-to-long v0, p0
|
|
|
|
int-to-long v2, p2
|
|
|
|
int-to-long v4, p3
|
|
|
|
invoke-static/range {v0 .. v5}, Lokio/-Util;->checkOffsetAndCount(JJJ)V
|
|
|
|
.line 341
|
|
new-instance p0, Lokio/ByteString;
|
|
|
|
add-int/2addr p3, p2
|
|
|
|
invoke-static {p1, p2, p3}, Lkotlin/collections/ArraysKt;->copyOfRange([BII)[B
|
|
|
|
move-result-object p1
|
|
|
|
invoke-direct {p0, p1}, Lokio/ByteString;-><init>([B)V
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public final read(Ljava/io/InputStream;I)Lokio/ByteString;
|
|
.locals 3
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
.annotation runtime Lkotlin/jvm/JvmStatic;
|
|
.end annotation
|
|
|
|
const-string p0, "$this$readByteString"
|
|
|
|
invoke-static {p1, p0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const/4 p0, 0x0
|
|
|
|
if-ltz p2, :cond_0
|
|
|
|
const/4 v0, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
move v0, p0
|
|
|
|
:goto_0
|
|
if-eqz v0, :cond_3
|
|
|
|
.line 263
|
|
new-array v0, p2, [B
|
|
|
|
:goto_1
|
|
if-ge p0, p2, :cond_2
|
|
|
|
sub-int v1, p2, p0
|
|
|
|
.line 267
|
|
invoke-virtual {p1, v0, p0, v1}, Ljava/io/InputStream;->read([BII)I
|
|
|
|
move-result v1
|
|
|
|
const/4 v2, -0x1
|
|
|
|
if-eq v1, v2, :cond_1
|
|
|
|
add-int/2addr p0, v1
|
|
|
|
goto :goto_1
|
|
|
|
.line 268
|
|
:cond_1
|
|
new-instance p0, Ljava/io/EOFException;
|
|
|
|
invoke-direct {p0}, Ljava/io/EOFException;-><init>()V
|
|
|
|
check-cast p0, Ljava/lang/Throwable;
|
|
|
|
throw p0
|
|
|
|
.line 271
|
|
:cond_2
|
|
new-instance p0, Lokio/ByteString;
|
|
|
|
invoke-direct {p0, v0}, Lokio/ByteString;-><init>([B)V
|
|
|
|
return-object p0
|
|
|
|
.line 261
|
|
:cond_3
|
|
new-instance p0, Ljava/lang/StringBuilder;
|
|
|
|
const-string p1, "byteCount < 0: "
|
|
|
|
invoke-direct {p0, p1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
|
|
|
|
invoke-virtual {p0, p2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-virtual {p0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
new-instance p1, Ljava/lang/IllegalArgumentException;
|
|
|
|
invoke-virtual {p0}, Ljava/lang/Object;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-direct {p1, p0}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
|
|
|
|
check-cast p1, Ljava/lang/Throwable;
|
|
|
|
throw p1
|
|
.end method
|