Java IntBuffer.arrayOffset()

Syntax

IntBuffer.arrayOffset() has the following syntax.

public final int arrayOffset()

Example

In the following code shows how to use IntBuffer.arrayOffset() method.


import java.nio.IntBuffer;
//from w  ww  .  j  a v a2s  . c  om
public class Main {
  public static void main(String[] args) {
    IntBuffer bb = IntBuffer.allocate(10);
    bb.put(100);
    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