Class TypedArrays.Impl
java.lang.Object
com.google.gwt.typedarrays.shared.TypedArrays.Impl
- Direct Known Subclasses:
JavaImpl
,NativeImpl
,NoSupportImpl
- Enclosing class:
- TypedArrays
Base class of implementations for creating various typed array structures.
*** NOT A PUBLIC API ***
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract ArrayBuffer
createArrayBuffer
(int length) createDataView
(ArrayBuffer buffer) createDataView
(ArrayBuffer buffer, int offset) abstract DataView
createDataView
(ArrayBuffer buffer, int byteOffset, int byteLength) createFloat32Array
(float[] array) createFloat32Array
(int length) createFloat32Array
(ArrayBuffer buffer) createFloat32Array
(ArrayBuffer buffer, int byteOffset) abstract Float32Array
createFloat32Array
(ArrayBuffer buffer, int byteOffset, int length) createFloat64Array
(double[] array) createFloat64Array
(int length) createFloat64Array
(ArrayBuffer buffer) createFloat64Array
(ArrayBuffer buffer, int byteOffset) abstract Float64Array
createFloat64Array
(ArrayBuffer buffer, int byteOffset, int length) createInt16Array
(int length) createInt16Array
(short[] array) createInt16Array
(ArrayBuffer buffer) createInt16Array
(ArrayBuffer buffer, int byteOffset) abstract Int16Array
createInt16Array
(ArrayBuffer buffer, int byteOffset, int length) createInt32Array
(int length) createInt32Array
(int[] array) createInt32Array
(ArrayBuffer buffer) createInt32Array
(ArrayBuffer buffer, int byteOffset) abstract Int32Array
createInt32Array
(ArrayBuffer buffer, int byteOffset, int length) createInt8Array
(byte[] array) createInt8Array
(int length) createInt8Array
(ArrayBuffer buffer) createInt8Array
(ArrayBuffer buffer, int byteOffset) abstract Int8Array
createInt8Array
(ArrayBuffer buffer, int byteOffset, int length) createUint16Array
(int length) createUint16Array
(int[] array) createUint16Array
(ArrayBuffer buffer) createUint16Array
(ArrayBuffer buffer, int byteOffset) abstract Uint16Array
createUint16Array
(ArrayBuffer buffer, int byteOffset, int length) createUint32Array
(double[] array) createUint32Array
(int length) createUint32Array
(long[] array) createUint32Array
(ArrayBuffer buffer) createUint32Array
(ArrayBuffer buffer, int byteOffset) abstract Uint32Array
createUint32Array
(ArrayBuffer buffer, int byteOffset, int length) createUint8Array
(int length) createUint8Array
(short[] array) createUint8Array
(ArrayBuffer buffer) createUint8Array
(ArrayBuffer buffer, int byteOffset) abstract Uint8Array
createUint8Array
(ArrayBuffer buffer, int byteOffset, int length) createUint8ClampedArray
(int length) createUint8ClampedArray
(short[] array) createUint8ClampedArray
(ArrayBuffer buffer) createUint8ClampedArray
(ArrayBuffer buffer, int byteOffset) abstract Uint8ClampedArray
createUint8ClampedArray
(ArrayBuffer buffer, int byteOffset, int length) 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.protected boolean
Check if the current environment might possibly support typed arrays.protected boolean
Check if the current environment actually does support typed arrays (including emulation).
-
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
- ifbyteLength
isn't an integral multiple ofelemLength
-
createArrayBuffer
-
createFloat32Array
-
createFloat32Array
-
createFloat64Array
-
createFloat64Array
-
createInt16Array
-
createInt16Array
-
createInt32Array
-
createInt32Array
-
createInt8Array
-
createInt8Array
-
createUint16Array
-
createUint16Array
-
createUint32Array
-
createUint32Array
-
createUint32Array
-
createUint8Array
-
createUint8Array
-
createUint8ClampedArray
-
createUint8ClampedArray
-
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 thecreateXXX
methods.- Returns:
- true if the current environment actually does support typed arrays
-