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.
|
byte[] |
getBytes() |
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, equivalentValues, get, getBrowserVersion, getDefaultValue, getDomNodeOrDie, getDomNodeOrNull, getPrototype, getScriptableFor, getStartingScope, getWindow, getWindow, getWithPreemption, hasInstance, initParentScope, isReadOnlySettable, makeScriptableFor, setCaseSensitive, setDomNode, setDomNode, setHtmlElementdefineFunctionProperties, defineProperty, getClassName, setClassName, setParentScopeapplyDescriptorToAttributeBitset, 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, sizepublic 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 arraypublic byte[] getBytes()
Copyright © 2002–2016 Gargoyle Software Inc.. All rights reserved.