/** * Absolute get method. Reads the <code>int</code> at position <code>index</code>. * * @exception IndexOutOfBoundsException If index is negative or not smaller than the buffer's * limit. */ public int get(int index) { return ByteBufferHelper.getInt(bb, (index << 2) + offset, endian); }
/** * Reads the <code>int</code> at this buffer's current position, and then increments the position. * * @exception BufferUnderflowException If there are no remaining <code>ints</code> in this buffer. */ public int get() { int p = position(); int result = ByteBufferHelper.getInt(bb, (p << 2) + offset, endian); position(p + 1); return result; }