public static void longToBytes ( long value , byte [ ] bytes , int offset ) { for ( int i = offset + 7 ; i >= offset ; -- i ) { bytes [ i ] = ( byte ) value ; value = value >> 8 ; } }
A utility method to convert the long into bytes in an array .