com.gargoylesoftware.htmlunit.javascript.host.arrays
Class Uint8ClampedArray

java.lang.Object
  extended by net.sourceforge.htmlunit.corejs.javascript.ScriptableObject
      extended by com.gargoylesoftware.htmlunit.javascript.SimpleScriptable
          extended by com.gargoylesoftware.htmlunit.javascript.host.arrays.ArrayBufferView
              extended by com.gargoylesoftware.htmlunit.javascript.host.arrays.ArrayBufferViewBase
                  extended by com.gargoylesoftware.htmlunit.javascript.host.arrays.Uint8ClampedArray
All Implemented Interfaces:
Serializable, Cloneable, net.sourceforge.htmlunit.corejs.javascript.ConstProperties, net.sourceforge.htmlunit.corejs.javascript.debug.DebuggableObject, net.sourceforge.htmlunit.corejs.javascript.Scriptable

public class Uint8ClampedArray
extends ArrayBufferViewBase

Represents an array of unsigned 16-bit integers. Values stored in this array are clamped to the range 0-255.

Version:
$Revision: 7534 $
Author:
Ahmed Ashour
See Also:
Serialized Form

Field Summary
static int BYTES_PER_ELEMENT
          The size, in bytes, of each array element.
 
Fields inherited from class net.sourceforge.htmlunit.corejs.javascript.ScriptableObject
CONST, DONTENUM, EMPTY, PERMANENT, READONLY, UNINITIALIZED_CONST
 
Fields inherited from interface net.sourceforge.htmlunit.corejs.javascript.Scriptable
NOT_FOUND
 
Constructor Summary
Uint8ClampedArray()
           
 
Method Summary
 void constructor(Object object, Object byteOffset, Object length)
          The constructor.
protected  Integer fromArray(byte[] array, int offset)
          Converts the provided byte array to number.
protected  int getBytesPerElement()
          Returns the size in bytes of an item in this array.
protected  byte[] toArray(Number number)
          Converts the provided number to byte array.
 
Methods inherited from class com.gargoylesoftware.htmlunit.javascript.host.arrays.ArrayBufferViewBase
get, getLength, put, set, subarray
 
Methods inherited from class com.gargoylesoftware.htmlunit.javascript.host.arrays.ArrayBufferView
constructor, getBuffer, getByteLength, getByteOffset, setBuffer, setByteLength
 
Methods inherited from class com.gargoylesoftware.htmlunit.javascript.SimpleScriptable
clone, defineFunctionProperties, defineProperty, equivalentValues, get, getBrowserVersion, getClassName, getDefaultValue, getDomNodeOrDie, getDomNodeOrNull, getPrototype, getScriptableFor, getStartingScope, getTransformerScriptableFor, getWindow, getWindow, getWithPreemption, hasInstance, initParentScope, isReadOnlySettable, makeScriptableFor, setCaseSensitive, setDomNode, setDomNode, setHtmlElement
 
Methods inherited from class net.sourceforge.htmlunit.corejs.javascript.ScriptableObject
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, getAllIds, getArrayPrototype, getAssociatedValue, getAttributes, getAttributes, getAttributes, getAttributes, getClassPrototype, getDefaultValue, 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, putConst, putConstProperty, putProperty, putProperty, redefineProperty, sameValue, sealObject, setAttributes, setAttributes, setAttributes, setAttributes, setGetterOrSetter, setParentScope, setPrototype, size
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BYTES_PER_ELEMENT

public static final int BYTES_PER_ELEMENT
The size, in bytes, of each array element.

See Also:
Constant Field Values
Constructor Detail

Uint8ClampedArray

public Uint8ClampedArray()
Method Detail

constructor

public void constructor(Object object,
                        Object byteOffset,
                        Object length)
The constructor.

Overrides:
constructor in class ArrayBufferViewBase
Parameters:
object - the object
byteOffset - optional byteOffset
length - optional length

toArray

protected byte[] toArray(Number number)
Converts the provided number to byte array.

Overrides:
toArray in class ArrayBufferViewBase
Parameters:
number - the number
Returns:
the byte array

fromArray

protected Integer fromArray(byte[] array,
                            int offset)
Converts the provided byte array to number.

Overrides:
fromArray in class ArrayBufferViewBase
Parameters:
array - the array
offset - the offset
Returns:
the byte array

getBytesPerElement

protected int getBytesPerElement()
Returns the size in bytes of an item in this array.

Overrides:
getBytesPerElement in class ArrayBufferViewBase
Returns:
the size of bytes of an item


Copyright © 2002-2012 Gargoyle Software Inc.. All Rights Reserved.