private static void longToByteArray ( long l , byte [ ] ba , int offset ) { for ( int i = 0 ; i < SIZE_OF_LONG ; ++ i ) { final int shift = i << 3 ; // i * 8 ba [ offset + SIZE_OF_LONG - 1 - i ] = ( byte ) ( ( l & ( 0xff L << shift ) ) >>> shift ) ; } }
Converts a long to a byte array .