Example usage for java.nio DoubleBuffer asReadOnlyBuffer

List of usage examples for java.nio DoubleBuffer asReadOnlyBuffer

Introduction

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

Prototype

public abstract DoubleBuffer asReadOnlyBuffer();

Source Link

Document

Returns a read-only 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);// w  w  w. ja va2 s .  c  o  m

    DoubleBuffer bb1 = bb.asReadOnlyBuffer();

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

}