Class NativeUint8ClampedArray

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Iterable<java.lang.Integer>, java.util.Collection<java.lang.Integer>, java.util.List<java.lang.Integer>, java.util.RandomAccess, ConstProperties, DebuggableObject, ExternalArrayData, IdFunctionCall, Scriptable

    public class NativeUint8ClampedArray
    extends NativeTypedArrayView<java.lang.Integer>
    An array view that stores 8-bit quantities and implements the JavaScript "Uint8ClampedArray" interface. It also implements List for direct manipulation in Java. Bytes inserted that fall out of the range (0 <= X < 256) will be adjusted so that they match before insertion.
    See Also:
    Serialized Form
    • Constructor Detail

      • NativeUint8ClampedArray

        public NativeUint8ClampedArray()
      • NativeUint8ClampedArray

        public NativeUint8ClampedArray​(NativeArrayBuffer ab,
                                       int off,
                                       int len)
      • NativeUint8ClampedArray

        public NativeUint8ClampedArray​(int len)
    • Method Detail

      • getClassName

        public java.lang.String getClassName()
        Description copied from class: ScriptableObject
        Return the name of the class. This is typically the same name as the constructor. Classes extending ScriptableObject must implement this abstract method.
        Specified by:
        getClassName in interface Scriptable
        Specified by:
        getClassName in class ScriptableObject
      • getBytesPerElement

        public int getBytesPerElement()
        Description copied from class: NativeTypedArrayView
        Return the number of bytes represented by each element in the array. This can be useful when wishing to manipulate the byte array directly from Java.
        Specified by:
        getBytesPerElement in class NativeTypedArrayView<java.lang.Integer>
      • get

        public java.lang.Integer get​(int i)
      • set

        public java.lang.Integer set​(int i,
                                     java.lang.Integer aByte)