diff --git a/frameworks/Kotlin/vertx-web-kotlinx/src/main/kotlin/Okio.kt b/frameworks/Kotlin/vertx-web-kotlinx/src/main/kotlin/Okio.kt index 7b17beaa148..39a03dd373a 100644 --- a/frameworks/Kotlin/vertx-web-kotlinx/src/main/kotlin/Okio.kt +++ b/frameworks/Kotlin/vertx-web-kotlinx/src/main/kotlin/Okio.kt @@ -7,23 +7,10 @@ import okio.Timeout import io.vertx.core.buffer.Buffer as VertxBuffer import okio.Buffer as OkioBuffer -// too complicated to implement -// Also there are casts from `Buffer` to `BufferImpl` in Vert.x -/* -@JvmInline -value class OkioBufferVertxBuffer(val okioBuffer: OkioBuffer) : VertxBuffer { -} - -fun OkioBuffer.toVertxBuffer(): VertxBuffer = - OkioBufferVertxBuffer(this) -*/ - - @JvmInline value class VertxBufferWriteStreamSink(val writeStream: WriteStream) : Sink { override fun write(source: OkioBuffer, byteCount: Long) { runBlocking { - // `source` is temporarily converted to a byte array because wrapping it as a Vert.x `Buffer` is too complicated to implement. writeStream.write(VertxBuffer.buffer(source.readByteArray(byteCount))).coAwait() } } @@ -47,7 +34,6 @@ fun WriteStream.toSink(): Sink = @JvmInline value class VertxBufferSink(val vertxBuffer: VertxBuffer) : Sink { override fun write(source: Buffer, byteCount: Long) { - // same problem as above vertxBuffer.appendBytes(source.readByteArray(byteCount)) }