public class JSArrayBuffer extends JSObject
JSObject.jsexport, JSObject.Property<T>
JSPropertyAttributeDontDelete, JSPropertyAttributeDontEnum, JSPropertyAttributeNone, JSPropertyAttributeReadOnly
Constructor and Description |
---|
JSArrayBuffer(JSContext ctx,
int length)
Creates a new array buffer of 'length' bytes
|
JSArrayBuffer(JSObject buffer)
Treats an existing JSObject as an ArrayBuffer.
|
Modifier and Type | Method and Description |
---|---|
int |
byteLength()
JavaScript: ArrayBuffer.prototype.byteLength, see:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer/byteLength
|
JSObject |
getJSObject()
Gets underlying JSObject
|
static boolean |
isView(JSValue arg)
JavaScript: ArrayBuffer.isView(), see:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer/isView
|
JSArrayBuffer |
slice(int begin)
JavaScript: ArrayBuffer.prototype.slice(), see:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer/slice
|
JSArrayBuffer |
slice(int begin,
int end)
JavaScript: ArrayBuffer.prototype.slice(), see:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer/slice
|
__nullFunc, deleteProperty, getThis, hashCode, hasProperty, isConstructor, isFunction, property, property, property, propertyAtIndex, propertyAtIndex, propertyNames, prototype, prototype
equals, getContext, isArray, isBoolean, isDate, isEqual, isFloat32Array, isFloat64Array, isInstanceOfConstructor, isInt16Array, isInt32Array, isInt8Array, isNull, isNumber, isObject, isStrictEqual, isString, isTypedArray, isUint16Array, isUint32Array, isUint8Array, isUint8ClampedArray, isUndefined, toBoolean, toFunction, toJSArray, toJSON, toNumber, toObject, toString, valueHash, valueRef
public JSArrayBuffer(JSContext ctx, int length)
ctx
- the JSContext in which to create the ArrayBufferlength
- the length in bytes of the ArrayBufferpublic JSArrayBuffer(JSObject buffer)
buffer
- The ArrayBuffer JSObject to wrappublic int byteLength()
public static boolean isView(JSValue arg)
arg
- the argument to be checkedpublic JSArrayBuffer slice(int begin, int end)
begin
- Zero-based byte index at which to begin slicingend
- Byte index to end slicingpublic JSArrayBuffer slice(int begin)
begin
- Zero-based byte index at which to begin slicingpublic JSObject getJSObject()