public static int shortsToInt ( short s1 , short s2 , boolean swapBytes ) { byte [ ] b = new byte [ 4 ] ; b [ 0 ] = ( byte ) ( s1 >>> 8 ) ; b [ 1 ] = ( byte ) ( s1 >>> 0 ) ; b [ 2 ] = ( byte ) ( s2 >>> 8 ) ; b [ 3 ] = ( byte ) ( s2 >>> 0 ) ; return bytesToInt ( b , false ) ; }
convert two short into a integer