private int toInt(byte[] data)
    {
        if (data == null || data.length != 4)
            return 0x0;

        return (int) ( // NOTE: type cast not necessary for int
        (0xff & data[0]) << 24 | (0xff & data[1]) << 16 | (0xff & data[2]) << 8 | (0xff & data[3]) << 0);
    }
private int toInt ( byte [ ] data ) { if ( data == null || data . length != 4 ) return 0x0 ; return ( int ) ( ( 0xff & data [ 0 ] ) << 24 | ( 0xff & data [ 1 ] ) << 16 | ( 0xff & data [ 2 ] ) << 8 | ( 0xff & data [ 3 ] ) << 0 ) ; }
To int.

@param data
the data
@return the int