wrap

fun wrap(buffer: dynamic): Buffer(source)

Wraps the dynamic object in the Buffer value class.

Return

The Node.js Buffer wrapped in the Buffer value class.

Parameters

buffer

The Node.js Buffer dynamic object to wrap

See also

Throws

IllegalArgumentException

If buffer is not a Node.js Buffer.

UnsupportedOperationException

If Node.js is not being used.

fun wrap(buffer: JsAny): Buffer(source)

Wraps the dynamic object in the Buffer value class.

Return

The Node.js Buffer wrapped in the Buffer value class.

Parameters

buffer

The Node.js Buffer JsAny object to wrap

See also

Throws

IllegalArgumentException

If buffer is not a Node.js Buffer.

UnsupportedOperationException

If Node.js is not being used.