Example usage for java.nio FloatBuffer arrayOffset

List of usage examples for java.nio FloatBuffer arrayOffset

Introduction

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

Prototype

public final int arrayOffset() 

Source Link

Document

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

Usage

From source file:Main.java

public static void main(String[] args) {
    FloatBuffer floatBuffer = FloatBuffer.allocate(10);

    floatBuffer.put(0, 1.23F);//  w  w  w.  j  ava2  s .co  m

    floatBuffer.rewind();

    System.out.println(floatBuffer.arrayOffset());

}

From source file:Main.java

public static void main(String[] args) {
    FloatBuffer floatBuffer = FloatBuffer.allocate(10);

    floatBuffer.put(0, 1.23F);//from  w w w .java2s .  c o  m

    floatBuffer.rewind();

    FloatBuffer floatBuffer1 = FloatBuffer.allocate(10);

    floatBuffer1.put(floatBuffer);

    System.out.println(floatBuffer.arrayOffset());

}