Java IntBuffer.put(int[] src)

Syntax

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

public final IntBuffer put(int[] src)

Example

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


import java.nio.IntBuffer;
//  w  w w  . j  a  v  a  2s .com
public class Main {
  public static void main(String[] args) {
    IntBuffer bb = IntBuffer.allocate(10);
    bb.put(new int[]{100,123});
    System.out.println(bb.arrayOffset());

  }
}

The code above generates the following result.





















Home »
  Java Tutorial »
    java.nio »




Buffer
ByteBuffer
ByteOrder
CharBuffer
DoubleBuffer
FloatBuffer
IntBuffer
LongBuffer
MappedByteBuffer
ShortBuffer