resize

fun resize(newSize: Int)(source)
fun resize(newSize: Long)(source)

Resizes this buffer to newSize. If allocation fails, this buffer stays untouched.

Throws

if memory allocation failed.