mirror of
https://github.com/mamoe/mirai.git
synced 2025-04-25 04:50:26 +08:00
Add @JvmSynthetic
This commit is contained in:
parent
59e15a30e1
commit
c847b17400
@ -5,6 +5,7 @@ package net.mamoe.mirai.utils.io
|
||||
import kotlinx.io.core.*
|
||||
import kotlinx.io.pool.useInstance
|
||||
import kotlin.jvm.JvmName
|
||||
import kotlin.jvm.JvmSynthetic
|
||||
|
||||
|
||||
fun ByteReadPacket.readRemainingBytes(
|
||||
@ -135,12 +136,13 @@ fun Map<UInt, String>.printTLVMap(name: String = "") =
|
||||
fun Input.readString(length: Int): String = String(this.readBytes(length))
|
||||
fun Input.readString(length: Long): String = String(this.readBytes(length.toInt()))
|
||||
fun Input.readString(length: Short): String = String(this.readBytes(length.toInt()))
|
||||
@JvmSynthetic
|
||||
fun Input.readString(length: UShort): String = String(this.readBytes(length.toInt()))
|
||||
fun Input.readString(length: Byte): String = String(this.readBytes(length.toInt()))
|
||||
|
||||
@JvmSynthetic
|
||||
fun Input.readStringUntil(stopSignalExclude: UByte, expectingEOF: Boolean = false): String = readStringUntil(stopSignalExclude.toByte(), expectingEOF)
|
||||
|
||||
// TODO 应标记 JvmSynthetic 但 kotlin 有bug
|
||||
@JvmName("readStringUntil0")
|
||||
fun Input.readStringUntil(stopSignalExclude: Byte, expectingEOF: Boolean = false): String {
|
||||
ByteArrayPool.useInstance {
|
||||
|
Loading…
Reference in New Issue
Block a user