public static void intToBytes ( int value , byte [ ] bytes , int offset ) { bytes [ offset + 3 ] = ( byte ) ( value >>> 0 ) ; bytes [ offset + 2 ] = ( byte ) ( value >>> 8 ) ; bytes [ offset + 1 ] = ( byte ) ( value >>> 16 ) ; bytes [ offset + 0 ] = ( byte ) ( value >>> 24 ) ; }
A utility method to convert an int into bytes in an array .