Example usage for java.nio LongBuffer wrap

List of usage examples for java.nio LongBuffer wrap

Introduction

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

Prototype

public static LongBuffer wrap(long[] array, int start, int len) 

Source Link

Document

Creates a new long buffer by wrapping the given long array.

Usage

From source file:Main.java

public static void main(String[] args) {
    LongBuffer bb = LongBuffer.wrap(new long[] { 0, 1, 2, 3, 4, 5, 6 }, 0, 3);
    bb.put(100L);//  w w w.j a v  a  2 s.c o  m
    System.out.println(Arrays.toString(bb.array()));

}