Example usage for java.nio ShortBuffer arrayOffset

List of usage examples for java.nio ShortBuffer arrayOffset

Introduction

In this page you can find the example usage for java.nio ShortBuffer arrayOffset.

Prototype

public final int arrayOffset() 

Source Link

Document

Returns the offset of the short array which this buffer is based on, if there is one.

Usage

From source file:Main.java

public static void main(String[] args) {
    ShortBuffer bb = ShortBuffer.allocate(10);
    bb.put((short) 100);
    System.out.println(bb.arrayOffset());

}

From source file:Main.java

public static void main(String[] args) {
    ShortBuffer bb = ShortBuffer.allocate(10);
    bb.put(new short[] { 100, 123 });
    System.out.println(bb.arrayOffset());

}