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

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

Introduction

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

Prototype

public static Int16Array createInt16Array(ArrayBuffer buffer, int byteOffset, int length) 

Source Link

Document

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

Usage

From source file:java.nio.DirectReadOnlyShortBufferAdapter.java

License:Apache License

DirectReadOnlyShortBufferAdapter(DirectByteBuffer byteBuffer) {
    super((byteBuffer.capacity() >> 1));
    this.byteBuffer = byteBuffer;
    this.byteBuffer.clear();
    this.shortArray = TypedArrays.createInt16Array(byteBuffer.byteArray.buffer(),
            byteBuffer.byteArray.byteOffset(), capacity);
}

From source file:java.nio.DirectReadWriteShortBufferAdapter.java

License:Apache License

DirectReadWriteShortBufferAdapter(DirectReadWriteByteBuffer byteBuffer) {
    super((byteBuffer.capacity() >> 1));
    this.byteBuffer = byteBuffer;
    this.byteBuffer.clear();
    this.shortArray = TypedArrays.createInt16Array(byteBuffer.byteArray.buffer(),
            byteBuffer.byteArray.byteOffset(), capacity);
}