Example usage for com.google.gwt.typedarrays.shared TypedArrays createFloat32Array

List of usage examples for com.google.gwt.typedarrays.shared TypedArrays createFloat32Array

Introduction

In this page you can find the example usage for com.google.gwt.typedarrays.shared TypedArrays createFloat32Array.

Prototype

public static Float32Array createFloat32Array(ArrayBuffer buffer, int byteOffset, int length) 

Source Link

Document

Create a Float32Array instance on buffer , starting at byteOffset into the buffer, continuing for length elements.

Usage

From source file:java.nio.DirectReadOnlyFloatBufferAdapter.java

License:Apache License

DirectReadOnlyFloatBufferAdapter(DirectByteBuffer byteBuffer) {
    super((byteBuffer.capacity() >> 2));
    this.byteBuffer = byteBuffer;
    this.byteBuffer.clear();
    this.floatArray = TypedArrays.createFloat32Array(byteBuffer.byteArray.buffer(),
            byteBuffer.byteArray.byteOffset(), capacity);
}

From source file:java.nio.DirectReadWriteFloatBufferAdapter.java

License:Apache License

DirectReadWriteFloatBufferAdapter(DirectReadWriteByteBuffer byteBuffer) {
    super((byteBuffer.capacity() >> 2));
    this.byteBuffer = byteBuffer;
    this.byteBuffer.clear();
    this.floatArray = TypedArrays.createFloat32Array(byteBuffer.byteArray.buffer(),
            byteBuffer.byteArray.byteOffset(), capacity);
}