15 lines
629 B
JavaScript
15 lines
629 B
JavaScript
/**
|
|
* Allocates a new ByteBuffer backed by a buffer of the specified capacity.
|
|
* @param {number=} capacity Initial capacity. Defaults to {@link ByteBuffer.DEFAULT_CAPACITY}.
|
|
* @param {boolean=} littleEndian Whether to use little or big endian byte order. Defaults to
|
|
* {@link ByteBuffer.DEFAULT_ENDIAN}.
|
|
* @param {boolean=} noAssert Whether to skip assertions of offsets and values. Defaults to
|
|
* {@link ByteBuffer.DEFAULT_NOASSERT}.
|
|
* @returns {!ByteBuffer}
|
|
* @expose
|
|
*/
|
|
ByteBuffer.allocate = function(capacity, littleEndian, noAssert) {
|
|
return new ByteBuffer(capacity, littleEndian, noAssert);
|
|
};
|
|
|