Example usage for java.nio IntBuffer arrayOffset

List of usage examples for java.nio IntBuffer arrayOffset

Introduction

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

Prototype

public final int arrayOffset() 

Source Link

Document

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

Usage

From source file:Main.java

public static void main(String[] args) {
    IntBuffer bb = IntBuffer.allocate(10);
    bb.put(100);//from w w  w.j a v  a  2  s  .c o m
    System.out.println(bb.arrayOffset());

}

From source file:Main.java

public static void main(String[] args) {
    IntBuffer bb = IntBuffer.allocate(10);
    bb.put(1, 100);// ww w . j  a v  a  2  s .c o m
    System.out.println(bb.arrayOffset());

}

From source file:Main.java

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

}