Java IO Tutorial - Java IntBuffer.put(int[] src, int offset, int length)








Syntax

IntBuffer.put(int[] src, int offset, int length) has the following syntax.

public IntBuffer put(int[] src,  int offset,  int length)

Example

In the following code shows how to use IntBuffer.put(int[] src, int offset, int length) method.

import java.nio.IntBuffer;
/*from w w w  .jav  a 2  s.  co m*/
public class Main {
  public static void main(String[] args) {
    IntBuffer bb = IntBuffer.allocate(10);
    bb.put(new int[]{100,123,123,123,1},0,1);
    System.out.println(bb.toString());

  }
}

The code above generates the following result.