Code example for ByteBuffer

Methods: getInt, position

0
  } 
 
  @Override 
  public int get(int index)
  { 
    return buffer.getInt(buffer.position() + (index * 4));
  } 
 
  public ByteBuffer getBuffer()
  { 
    return buffer.asReadOnlyBuffer();
  } 
 
  @Override 
  public int compareTo(IntBufferIndexedInts o)
  { 
    return buffer.compareTo(o.getBuffer());
  } 
 
  @Override 
  public Iterator<Integer> iterator()