public int getInt32 ( int index ) throws IOException { validateIndex ( index , 4 ) ; if ( _isMotorolaByteOrder ) { // Motorola - MSB first (big endian) return ( getByte ( index ) << 24 & 0xFF000000 ) | ( getByte ( index + 1 ) << 16 & 0xFF0000 ) | ( getByte ( index + 2 ) << 8 & 0xFF00 ) | ( getByte ( index + 3 ) & 0xFF ) ; } else { // Intel ordering - LSB first (little endian) return ( getByte ( index + 3 ) << 24 & 0xFF000000 ) | ( getByte ( index + 2 ) << 16 & 0xFF0000 ) | ( getByte ( index + 1 ) << 8 & 0xFF00 ) | ( getByte ( index ) & 0xFF ) ; } }
Returns a signed 32 - bit integer from four bytes of data at the specified index the buffer .