public final short getShort ( int index ) { if ( index >= 0 && index < this . size - 1 ) { return ( short ) ( ( ( this . memory [ this . offset + index + 0 ] & 0xff ) << 8 ) | ( ( this . memory [ this . offset + index + 1 ] & 0xff ) ) ) ; } else { throw new IndexOutOfBoundsException ( ) ; } }
Reads two memory at the given position composing them into a short value according to the current byte order .