com.google.gwt.typedarrays.client
Class NativeImpl
java.lang.Object
com.google.gwt.typedarrays.shared.TypedArrays.Impl
com.google.gwt.typedarrays.client.NativeImpl
- Direct Known Subclasses:
- NativeImplEmulClamped, NativeImplFull
public class NativeImpl
- extends TypedArrays.Impl
The default implementation class, which assumes that Typed Arrays might be
supported and does runtime checks where necessary, substituting emulated
implementations of DataView and Uint8ClampedArray where they are missing.
This can be replaced with a version which avoids runtime checks where
possible for efficiency.
Method Summary |
protected boolean |
checkDataViewSupport()
|
protected boolean |
checkUint8ClampedArraySupport()
|
ArrayBuffer |
createArrayBuffer(int length)
|
DataView |
createDataView(ArrayBuffer buffer)
|
DataView |
createDataView(ArrayBuffer buffer,
int byteOffset)
|
DataView |
createDataView(ArrayBuffer buffer,
int byteOffset,
int byteLength)
|
Float32ArrayNative |
createFloat32Array(ArrayBuffer buffer)
|
Float32ArrayNative |
createFloat32Array(ArrayBuffer buffer,
int byteOffset)
|
Float32ArrayNative |
createFloat32Array(ArrayBuffer buffer,
int byteOffset,
int length)
|
Float32ArrayNative |
createFloat32Array(float[] array)
|
Float32ArrayNative |
createFloat32Array(int length)
|
Float64ArrayNative |
createFloat64Array(ArrayBuffer buffer)
|
Float64ArrayNative |
createFloat64Array(ArrayBuffer buffer,
int byteOffset)
|
Float64ArrayNative |
createFloat64Array(ArrayBuffer buffer,
int byteOffset,
int length)
|
Float64ArrayNative |
createFloat64Array(double[] array)
|
Float64ArrayNative |
createFloat64Array(int length)
|
Int16ArrayNative |
createInt16Array(ArrayBuffer buffer)
|
Int16ArrayNative |
createInt16Array(ArrayBuffer buffer,
int byteOffset)
|
Int16ArrayNative |
createInt16Array(ArrayBuffer buffer,
int byteOffset,
int length)
|
Int16ArrayNative |
createInt16Array(int length)
|
Int16ArrayNative |
createInt16Array(short[] array)
|
Int32ArrayNative |
createInt32Array(ArrayBuffer buffer)
|
Int32ArrayNative |
createInt32Array(ArrayBuffer buffer,
int byteOffset)
|
Int32ArrayNative |
createInt32Array(ArrayBuffer buffer,
int byteOffset,
int length)
|
Int32ArrayNative |
createInt32Array(int length)
|
Int32ArrayNative |
createInt32Array(int[] array)
|
Int8ArrayNative |
createInt8Array(ArrayBuffer buffer)
|
Int8ArrayNative |
createInt8Array(ArrayBuffer buffer,
int byteOffset)
|
Int8ArrayNative |
createInt8Array(ArrayBuffer buffer,
int byteOffset,
int length)
|
Int8ArrayNative |
createInt8Array(byte[] array)
|
Int8ArrayNative |
createInt8Array(int length)
|
Uint16ArrayNative |
createUint16Array(ArrayBuffer buffer)
|
Uint16ArrayNative |
createUint16Array(ArrayBuffer buffer,
int byteOffset)
|
Uint16ArrayNative |
createUint16Array(ArrayBuffer buffer,
int byteOffset,
int length)
|
Uint16ArrayNative |
createUint16Array(int length)
|
Uint16ArrayNative |
createUint16Array(int[] array)
|
Uint32ArrayNative |
createUint32Array(ArrayBuffer buffer)
|
Uint32ArrayNative |
createUint32Array(ArrayBuffer buffer,
int byteOffset)
|
Uint32ArrayNative |
createUint32Array(ArrayBuffer buffer,
int byteOffset,
int length)
|
Uint32ArrayNative |
createUint32Array(double[] array)
|
Uint32ArrayNative |
createUint32Array(int length)
|
Uint32ArrayNative |
createUint32Array(long[] array)
|
Uint8ArrayNative |
createUint8Array(ArrayBuffer buffer)
|
Uint8ArrayNative |
createUint8Array(ArrayBuffer buffer,
int byteOffset)
|
Uint8ArrayNative |
createUint8Array(ArrayBuffer buffer,
int byteOffset,
int length)
|
Uint8ArrayNative |
createUint8Array(int length)
|
Uint8ArrayNative |
createUint8Array(short[] array)
|
Uint8ClampedArray |
createUint8ClampedArray(ArrayBuffer buffer)
|
Uint8ClampedArray |
createUint8ClampedArray(ArrayBuffer buffer,
int byteOffset)
|
Uint8ClampedArray |
createUint8ClampedArray(ArrayBuffer buffer,
int byteOffset,
int length)
|
Uint8ClampedArray |
createUint8ClampedArray(int length)
|
Uint8ClampedArray |
createUint8ClampedArray(short[] array)
|
protected boolean |
runtimeSupportCheck()
Check if the current environment actually does support typed arrays
(including emulation). |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NativeImpl
public NativeImpl()
createArrayBuffer
public ArrayBuffer createArrayBuffer(int length)
- Specified by:
createArrayBuffer
in class TypedArrays.Impl
createDataView
public DataView createDataView(ArrayBuffer buffer)
- Overrides:
createDataView
in class TypedArrays.Impl
createDataView
public DataView createDataView(ArrayBuffer buffer,
int byteOffset)
- Overrides:
createDataView
in class TypedArrays.Impl
createDataView
public DataView createDataView(ArrayBuffer buffer,
int byteOffset,
int byteLength)
- Specified by:
createDataView
in class TypedArrays.Impl
createFloat32Array
public Float32ArrayNative createFloat32Array(ArrayBuffer buffer)
- Overrides:
createFloat32Array
in class TypedArrays.Impl
createFloat32Array
public Float32ArrayNative createFloat32Array(ArrayBuffer buffer,
int byteOffset)
- Overrides:
createFloat32Array
in class TypedArrays.Impl
createFloat32Array
public Float32ArrayNative createFloat32Array(ArrayBuffer buffer,
int byteOffset,
int length)
- Specified by:
createFloat32Array
in class TypedArrays.Impl
createFloat32Array
public Float32ArrayNative createFloat32Array(float[] array)
- Overrides:
createFloat32Array
in class TypedArrays.Impl
createFloat32Array
public Float32ArrayNative createFloat32Array(int length)
- Overrides:
createFloat32Array
in class TypedArrays.Impl
createFloat64Array
public Float64ArrayNative createFloat64Array(ArrayBuffer buffer)
- Overrides:
createFloat64Array
in class TypedArrays.Impl
createFloat64Array
public Float64ArrayNative createFloat64Array(ArrayBuffer buffer,
int byteOffset)
- Overrides:
createFloat64Array
in class TypedArrays.Impl
createFloat64Array
public Float64ArrayNative createFloat64Array(ArrayBuffer buffer,
int byteOffset,
int length)
- Specified by:
createFloat64Array
in class TypedArrays.Impl
createFloat64Array
public Float64ArrayNative createFloat64Array(double[] array)
- Overrides:
createFloat64Array
in class TypedArrays.Impl
createFloat64Array
public Float64ArrayNative createFloat64Array(int length)
- Overrides:
createFloat64Array
in class TypedArrays.Impl
createInt16Array
public Int16ArrayNative createInt16Array(ArrayBuffer buffer)
- Overrides:
createInt16Array
in class TypedArrays.Impl
createInt16Array
public Int16ArrayNative createInt16Array(ArrayBuffer buffer,
int byteOffset)
- Overrides:
createInt16Array
in class TypedArrays.Impl
createInt16Array
public Int16ArrayNative createInt16Array(ArrayBuffer buffer,
int byteOffset,
int length)
- Specified by:
createInt16Array
in class TypedArrays.Impl
createInt16Array
public Int16ArrayNative createInt16Array(int length)
- Overrides:
createInt16Array
in class TypedArrays.Impl
createInt16Array
public Int16ArrayNative createInt16Array(short[] array)
- Overrides:
createInt16Array
in class TypedArrays.Impl
createInt32Array
public Int32ArrayNative createInt32Array(ArrayBuffer buffer)
- Overrides:
createInt32Array
in class TypedArrays.Impl
createInt32Array
public Int32ArrayNative createInt32Array(ArrayBuffer buffer,
int byteOffset)
- Overrides:
createInt32Array
in class TypedArrays.Impl
createInt32Array
public Int32ArrayNative createInt32Array(ArrayBuffer buffer,
int byteOffset,
int length)
- Specified by:
createInt32Array
in class TypedArrays.Impl
createInt32Array
public Int32ArrayNative createInt32Array(int length)
- Overrides:
createInt32Array
in class TypedArrays.Impl
createInt32Array
public Int32ArrayNative createInt32Array(int[] array)
- Overrides:
createInt32Array
in class TypedArrays.Impl
createInt8Array
public Int8ArrayNative createInt8Array(ArrayBuffer buffer)
- Overrides:
createInt8Array
in class TypedArrays.Impl
createInt8Array
public Int8ArrayNative createInt8Array(ArrayBuffer buffer,
int byteOffset)
- Overrides:
createInt8Array
in class TypedArrays.Impl
createInt8Array
public Int8ArrayNative createInt8Array(ArrayBuffer buffer,
int byteOffset,
int length)
- Specified by:
createInt8Array
in class TypedArrays.Impl
createInt8Array
public Int8ArrayNative createInt8Array(byte[] array)
- Overrides:
createInt8Array
in class TypedArrays.Impl
createInt8Array
public Int8ArrayNative createInt8Array(int length)
- Overrides:
createInt8Array
in class TypedArrays.Impl
createUint16Array
public Uint16ArrayNative createUint16Array(ArrayBuffer buffer)
- Overrides:
createUint16Array
in class TypedArrays.Impl
createUint16Array
public Uint16ArrayNative createUint16Array(ArrayBuffer buffer,
int byteOffset)
- Overrides:
createUint16Array
in class TypedArrays.Impl
createUint16Array
public Uint16ArrayNative createUint16Array(ArrayBuffer buffer,
int byteOffset,
int length)
- Specified by:
createUint16Array
in class TypedArrays.Impl
createUint16Array
public Uint16ArrayNative createUint16Array(int length)
- Overrides:
createUint16Array
in class TypedArrays.Impl
createUint16Array
public Uint16ArrayNative createUint16Array(int[] array)
- Overrides:
createUint16Array
in class TypedArrays.Impl
createUint32Array
public Uint32ArrayNative createUint32Array(ArrayBuffer buffer)
- Overrides:
createUint32Array
in class TypedArrays.Impl
createUint32Array
public Uint32ArrayNative createUint32Array(ArrayBuffer buffer,
int byteOffset)
- Overrides:
createUint32Array
in class TypedArrays.Impl
createUint32Array
public Uint32ArrayNative createUint32Array(ArrayBuffer buffer,
int byteOffset,
int length)
- Specified by:
createUint32Array
in class TypedArrays.Impl
createUint32Array
public Uint32ArrayNative createUint32Array(double[] array)
- Overrides:
createUint32Array
in class TypedArrays.Impl
createUint32Array
public Uint32ArrayNative createUint32Array(int length)
- Overrides:
createUint32Array
in class TypedArrays.Impl
createUint32Array
public Uint32ArrayNative createUint32Array(long[] array)
- Overrides:
createUint32Array
in class TypedArrays.Impl
createUint8Array
public Uint8ArrayNative createUint8Array(ArrayBuffer buffer)
- Overrides:
createUint8Array
in class TypedArrays.Impl
createUint8Array
public Uint8ArrayNative createUint8Array(ArrayBuffer buffer,
int byteOffset)
- Overrides:
createUint8Array
in class TypedArrays.Impl
createUint8Array
public Uint8ArrayNative createUint8Array(ArrayBuffer buffer,
int byteOffset,
int length)
- Specified by:
createUint8Array
in class TypedArrays.Impl
createUint8Array
public Uint8ArrayNative createUint8Array(int length)
- Overrides:
createUint8Array
in class TypedArrays.Impl
createUint8Array
public Uint8ArrayNative createUint8Array(short[] array)
- Overrides:
createUint8Array
in class TypedArrays.Impl
createUint8ClampedArray
public Uint8ClampedArray createUint8ClampedArray(ArrayBuffer buffer)
- Overrides:
createUint8ClampedArray
in class TypedArrays.Impl
createUint8ClampedArray
public Uint8ClampedArray createUint8ClampedArray(ArrayBuffer buffer,
int byteOffset)
- Overrides:
createUint8ClampedArray
in class TypedArrays.Impl
createUint8ClampedArray
public Uint8ClampedArray createUint8ClampedArray(ArrayBuffer buffer,
int byteOffset,
int length)
- Specified by:
createUint8ClampedArray
in class TypedArrays.Impl
createUint8ClampedArray
public Uint8ClampedArray createUint8ClampedArray(int length)
- Overrides:
createUint8ClampedArray
in class TypedArrays.Impl
createUint8ClampedArray
public Uint8ClampedArray createUint8ClampedArray(short[] array)
- Overrides:
createUint8ClampedArray
in class TypedArrays.Impl
checkDataViewSupport
protected boolean checkDataViewSupport()
checkUint8ClampedArraySupport
protected boolean checkUint8ClampedArraySupport()
runtimeSupportCheck
protected boolean runtimeSupportCheck()
- Description copied from class:
TypedArrays.Impl
- 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.
- Overrides:
runtimeSupportCheck
in class TypedArrays.Impl
- Returns:
- true if the current environment actually does support typed
arrays