All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.huanshankeji.vertx.core.Buffer.kt Maven / Gradle / Ivy

package com.huanshankeji.vertx.core

import io.netty.buffer.Unpooled
import io.vertx.core.buffer.Buffer
import io.vertx.core.buffer.impl.BufferImpl

/**
 * Creates a wrapped [Buffer] so that unnecessary copy is avoided.
 * Also see https://github.com/eclipse-vertx/vert.x/issues/4407.
 */
fun wrappedBuffer(byteArray: ByteArray): Buffer =
    BufferImpl.buffer(Unpooled.wrappedBuffer(byteArray))




© 2015 - 2025 Weber Informatics LLC | Privacy Policy