Commit d7208a5c authored by Him188's avatar Him188

Move `output` to constructor argument

parent f50d8e3a
package net.mamoe.mirai.qqandroid.network.io package net.mamoe.mirai.qqandroid.network.io
import kotlinx.io.charsets.Charset import kotlinx.io.charsets.Charset
import kotlinx.io.core.BytePacketBuilder import kotlinx.io.core.*
import kotlinx.io.core.ExperimentalIoApi
import kotlinx.io.core.toByteArray
import kotlinx.io.core.writeFully
import kotlin.reflect.KClass import kotlin.reflect.KClass
/** /**
...@@ -14,9 +11,9 @@ import kotlin.reflect.KClass ...@@ -14,9 +11,9 @@ import kotlin.reflect.KClass
@Suppress("unused", "MemberVisibilityCanBePrivate") @Suppress("unused", "MemberVisibilityCanBePrivate")
@UseExperimental(ExperimentalIoApi::class) @UseExperimental(ExperimentalIoApi::class)
class JceOutput( class JceOutput(
private val stringCharset: Charset = Charset.forName("GBK") private val stringCharset: Charset = Charset.forName("GBK"),
private val output: Output = BytePacketBuilder()
) { ) {
private val output: BytePacketBuilder = BytePacketBuilder()
fun close() = output.close() fun close() = output.close()
fun flush() = output.flush() fun flush() = output.flush()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment