Example usage for java.nio DoubleBuffer slice

List of usage examples for java.nio DoubleBuffer slice

Introduction

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

Prototype

public abstract DoubleBuffer 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) {
    DoubleBuffer bb = DoubleBuffer.allocate(BSIZE);

    bb.put(98765);//from   ww  w  .j  av  a  2s. c  om

    DoubleBuffer bb1 = bb.slice();

    System.out.println(Arrays.toString(bb1.array()));

}