Class TypedArrays.Impl

java.lang.Object
com.google.gwt.typedarrays.shared.TypedArrays.Impl
Direct Known Subclasses:
JavaImpl, NativeImpl, NoSupportImpl
Enclosing class:
TypedArrays

public abstract static class TypedArrays.Impl extends Object
Base class of implementations for creating various typed array structures.

*** NOT A PUBLIC API ***

  • Constructor Details

    • Impl

      public Impl()
  • Method Details

    • getElementCount

      protected static int getElementCount(int byteLength, int elemLength)
      Get the number of elements in a number of bytes, throwing an exception if it isn't an integral number.
      Parameters:
      byteLength -
      elemLength - length of each element in bytes
      Returns:
      count of elements
      Throws:
      IllegalArgumentException - if byteLength isn't an integral multiple of elemLength
    • createArrayBuffer

      public abstract ArrayBuffer createArrayBuffer(int length)
    • createDataView

      public DataView createDataView(ArrayBuffer buffer)
    • createDataView

      public DataView createDataView(ArrayBuffer buffer, int offset)
    • createDataView

      public abstract DataView createDataView(ArrayBuffer buffer, int byteOffset, int byteLength)
    • createFloat32Array

      public Float32Array createFloat32Array(ArrayBuffer buffer)
    • createFloat32Array

      public Float32Array createFloat32Array(ArrayBuffer buffer, int byteOffset)
    • createFloat32Array

      public abstract Float32Array createFloat32Array(ArrayBuffer buffer, int byteOffset, int length)
    • createFloat32Array

      public Float32Array createFloat32Array(float[] array)
    • createFloat32Array

      public Float32Array createFloat32Array(int length)
    • createFloat64Array

      public Float64Array createFloat64Array(ArrayBuffer buffer)
    • createFloat64Array

      public Float64Array createFloat64Array(ArrayBuffer buffer, int byteOffset)
    • createFloat64Array

      public abstract Float64Array createFloat64Array(ArrayBuffer buffer, int byteOffset, int length)
    • createFloat64Array

      public Float64Array createFloat64Array(double[] array)
    • createFloat64Array

      public Float64Array createFloat64Array(int length)
    • createInt16Array

      public Int16Array createInt16Array(ArrayBuffer buffer)
    • createInt16Array

      public Int16Array createInt16Array(ArrayBuffer buffer, int byteOffset)
    • createInt16Array

      public abstract Int16Array createInt16Array(ArrayBuffer buffer, int byteOffset, int length)
    • createInt16Array

      public Int16Array createInt16Array(int length)
    • createInt16Array

      public Int16Array createInt16Array(short[] array)
    • createInt32Array

      public Int32Array createInt32Array(ArrayBuffer buffer)
    • createInt32Array

      public Int32Array createInt32Array(ArrayBuffer buffer, int byteOffset)
    • createInt32Array

      public abstract Int32Array createInt32Array(ArrayBuffer buffer, int byteOffset, int length)
    • createInt32Array

      public Int32Array createInt32Array(int length)
    • createInt32Array

      public Int32Array createInt32Array(int[] array)
    • createInt8Array

      public Int8Array createInt8Array(ArrayBuffer buffer)
    • createInt8Array

      public Int8Array createInt8Array(ArrayBuffer buffer, int byteOffset)
    • createInt8Array

      public abstract Int8Array createInt8Array(ArrayBuffer buffer, int byteOffset, int length)
    • createInt8Array

      public Int8Array createInt8Array(byte[] array)
    • createInt8Array

      public Int8Array createInt8Array(int length)
    • createUint16Array

      public Uint16Array createUint16Array(ArrayBuffer buffer)
    • createUint16Array

      public Uint16Array createUint16Array(ArrayBuffer buffer, int byteOffset)
    • createUint16Array

      public abstract Uint16Array createUint16Array(ArrayBuffer buffer, int byteOffset, int length)
    • createUint16Array

      public Uint16Array createUint16Array(int length)
    • createUint16Array

      public Uint16Array createUint16Array(int[] array)
    • createUint32Array

      public Uint32Array createUint32Array(ArrayBuffer buffer)
    • createUint32Array

      public Uint32Array createUint32Array(ArrayBuffer buffer, int byteOffset)
    • createUint32Array

      public abstract Uint32Array createUint32Array(ArrayBuffer buffer, int byteOffset, int length)
    • createUint32Array

      public Uint32Array createUint32Array(double[] array)
    • createUint32Array

      public Uint32Array createUint32Array(int length)
    • createUint32Array

      public Uint32Array createUint32Array(long[] array)
    • createUint8Array

      public Uint8Array createUint8Array(ArrayBuffer buffer)
    • createUint8Array

      public Uint8Array createUint8Array(ArrayBuffer buffer, int byteOffset)
    • createUint8Array

      public abstract Uint8Array createUint8Array(ArrayBuffer buffer, int byteOffset, int length)
    • createUint8Array

      public Uint8Array createUint8Array(int length)
    • createUint8Array

      public Uint8Array createUint8Array(short[] array)
    • createUint8ClampedArray

      public Uint8ClampedArray createUint8ClampedArray(ArrayBuffer buffer)
    • createUint8ClampedArray

      public Uint8ClampedArray createUint8ClampedArray(ArrayBuffer buffer, int byteOffset)
    • createUint8ClampedArray

      public abstract Uint8ClampedArray createUint8ClampedArray(ArrayBuffer buffer, int byteOffset, int length)
    • createUint8ClampedArray

      public Uint8ClampedArray createUint8ClampedArray(int length)
    • createUint8ClampedArray

      public Uint8ClampedArray createUint8ClampedArray(short[] array)
    • mightBeSupported

      protected boolean mightBeSupported()
      Check if the current environment might possibly support typed arrays.

      The default implementation always returns true, and this is intended to be a static check based on deffered-bound parameters.

      Returns:
      true if the current environment might possibly support typed arrays
    • runtimeSupportCheck

      protected boolean runtimeSupportCheck()
      Check if the current environment actually does support typed arrays (including emulation). There is no partial support, so if true is returned, there must be acceptable implementations for all of the createXXX methods.
      Returns:
      true if the current environment actually does support typed arrays