Example usage for java.nio FloatBuffer slice

List of usage examples for java.nio FloatBuffer slice

Introduction

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

Prototype

public abstract FloatBuffer slice();

Source Link

Document

Returns a sliced buffer that shares its content with this buffer.

Usage

From source file:Main.java

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

    floatBuffer.put(0, 1.23F);//from ww  w .  ja v a  2 s.com

    floatBuffer.rewind();

    FloatBuffer floatBuffer1 = floatBuffer.slice();

    System.out.println(floatBuffer.equals(floatBuffer1));

}