public class JSArrayBuffer extends JSObjectWrapper
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
|
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
|
getJSObject
__nullFunc, callAsFunction, callAsFunction, callAsFunction, callAsFunction, deleteProperty, getThis, hashCode, hasProperty, isConstructor, isFunction, property, property, property, propertyAtIndex, propertyAtIndex, propertyNames, prototype, prototype
equals, getContext, isArray, isBoolean, isDate, isEqual, isInstanceOfConstructor, isNull, isNumber, isObject, isStrictEqual, isString, isUndefined, toBoolean, toFunction, toJSArray, toJSON, toJSON, toNumber, toObject, toString, 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 slicing