Example usage for java.nio IntBuffer equals

List of usage examples for java.nio IntBuffer equals

Introduction

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

Prototype

public boolean equals(Object other) 

Source Link

Document

Checks whether this int buffer is equal to another object.

Usage

From source file:Main.java

public static void main(String[] args) {
    IntBuffer intBuffer = IntBuffer.allocate(10);
    intBuffer.put(100);/*  ww w .ja v  a2 s  . com*/

    intBuffer.rewind();

    IntBuffer intBuffer2 = intBuffer.slice();

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

}

From source file:Main.java

public static void main(String[] args) {
    IntBuffer intBuffer = IntBuffer.allocate(10);
    intBuffer.put(100);/*from   ww w  . j  av  a  2 s.co  m*/

    intBuffer.rewind();

    IntBuffer intBuffer2 = intBuffer.compact();

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

}

From source file:Main.java

public static void main(String[] args) {
    IntBuffer intBuffer = IntBuffer.allocate(10);
    intBuffer.put(100);// ww  w  . j av a 2s  .c om

    intBuffer.rewind();

    IntBuffer intBuffer2 = intBuffer.duplicate();

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

}