public int getInt24 ( int index ) throws IOException { validateIndex ( index , 3 ) ; if ( _isMotorolaByteOrder ) { // Motorola - MSB first (big endian) return ( ( ( int ) getByte ( index ) ) << 16 & 0xFF0000 ) | ( ( ( int ) getByte ( index + 1 ) ) << 8 & 0xFF00 ) | ( ( ( int ) getByte ( index + 2 ) ) & 0xFF ) ; } else { // Intel ordering - LSB first (little endian) return ( ( ( int ) getByte ( index + 2 ) ) << 16 & 0xFF0000 ) | ( ( ( int ) getByte ( index + 1 ) ) << 8 & 0xFF00 ) | ( ( ( int ) getByte ( index ) ) & 0xFF ) ; } }
Get a 24 - bit unsigned integer from the buffer returning it as an int .