Example usage for java.nio LongBuffer duplicate

List of usage examples for java.nio LongBuffer duplicate

Introduction

In this page you can find the example usage for java.nio LongBuffer duplicate.

Prototype

public abstract LongBuffer duplicate();

Source Link

Document

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

Usage

From source file:Main.java

public static void main(String[] args) {
    LongBuffer longBuffer = LongBuffer.allocate(10);
    longBuffer.put(100);/*from   www  . ja v  a2s. com*/

    longBuffer.rewind();

    LongBuffer longBuffer2 = longBuffer.duplicate();

    System.out.println(longBuffer2.equals(longBuffer2));

}