public class ArrayBuffer extends SimpleScriptable
Constructor and Description |
---|
ArrayBuffer() |
Modifier and Type | Method and Description |
---|---|
void |
constructor(int length)
The constructor.
|
int |
getByteLength()
Returns the size, in bytes, of the array.
|
void |
setBytes(int index,
byte[] array)
Sets the bytes.
|
ArrayBuffer |
slice(int begin,
Object end)
Returns a new ArrayBuffer whose contents are a copy of this ArrayBuffer's bytes
from begin, inclusive, up to end, exclusive.
|
clone, defineFunctionProperties, defineProperty, equivalentValues, get, getBrowserVersion, getClassName, getDefaultValue, getDomNodeOrDie, getDomNodeOrNull, getPrototype, getScriptableFor, getStartingScope, getTransformerScriptableFor, getWindow, getWindow, getWithPreemption, hasInstance, initParentScope, isReadOnlySettable, makeScriptableFor, setCaseSensitive, setClassName, setDomNode, setDomNode, setHtmlElement, setParentScope
applyDescriptorToAttributeBitset, associateValue, avoidObjectDetection, buildDataDescriptor, callMethod, callMethod, checkPropertyChange, checkPropertyDefinition, defineClass, defineClass, defineClass, defineConst, defineConstProperty, defineOwnProperties, defineOwnProperty, defineOwnProperty, defineProperty, defineProperty, defineProperty, delete, delete, deleteProperty, deleteProperty, ensureScriptable, ensureScriptableObject, get, get, getAllIds, getArrayPrototype, getAssociatedValue, getAttributes, getAttributes, getAttributes, getAttributes, getClassPrototype, getDefaultValue, getExternalArrayData, getExternalArrayLength, getFunctionPrototype, getGetterOrSetter, getIds, getObjectPrototype, getOwnPropertyDescriptor, getParentScope, getProperty, getProperty, getPropertyIds, getPrototype, getSlot, getTopLevelScope, getTopScopeValue, getTypedProperty, getTypedProperty, getTypeOf, has, has, hasProperty, hasProperty, isAccessorDescriptor, isConst, isDataDescriptor, isEmpty, isExtensible, isFalse, isGenericDescriptor, isGetterOrSetter, isSealed, isTrue, preventExtensions, put, put, putConst, putConstProperty, putProperty, putProperty, redefineProperty, sameValue, sealObject, setAttributes, setAttributes, setAttributes, setAttributes, setExternalArrayData, setGetterOrSetter, setPrototype, size
public void constructor(int length)
length
- the size, in bytes, of the array buffer to create.public int getByteLength()
public ArrayBuffer slice(int begin, Object end)
begin
- byte index to start slicingend
- (optional) byte index to end slicingpublic void setBytes(int index, byte[] array)
index
- the starting indexarray
- the arrayCopyright © 2002–2015 Gargoyle Software Inc.. All rights reserved.