write

fun write(data: String): Boolean(source)
fun write(data: Buffer<*>): Boolean(source)

When the options.contentMode is set to 'utf8' when the stream is created, the data argument must be a string. If the contentMode is set to 'buffer', the data argument must be a Buffer.

Parameters

data

The data to write.