writeDirect

inline fun writeDirect(size: Int, block: (ByteBuffer) -> Unit): Int

Apply block function on a ByteBuffer of the free space. The block function should return number of written bytes.

Return

number of bytes written

fun writeDirect(block: (<ERROR CLASS><<ERROR CLASS>>) -> Int): Int

Apply block to a native pointer for writing to the buffer. Lambda should return number of bytes were written.

Return

number of bytes written