allocUnsafe static method

Buffer allocUnsafe(
  1. int size
)

Allocates a new Buffer of size bytes.

If the size is larger than BufferConstants.MAX_LENGTH or smaller than 0, a RangeError will be thrown. A zero-length Buffer will be created if size is 0.

Implementation

external static Buffer allocUnsafe(int size);