Example usage for java.nio LongBuffer equals

List of usage examples for java.nio LongBuffer equals

Introduction

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

Prototype

public boolean equals(Object other) 

Source Link

Document

Checks whether this long buffer is equal to another object.

Usage

From source file:Main.java

public static void main(String[] args) {
    LongBuffer longBuffer = LongBuffer.allocate(10);
    longBuffer.put(100);//  w w  w.ja  va2s  .c  o  m

    longBuffer.rewind();

    LongBuffer longBuffer2 = longBuffer.slice();

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

}

From source file:Main.java

public static void main(String[] args) {
    LongBuffer longBuffer = LongBuffer.allocate(10);
    longBuffer.put(100);/*from   w w w.j a  va2s  .c om*/

    longBuffer.rewind();

    LongBuffer longBuffer2 = longBuffer.duplicate();

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

}