public static void writeLong(byte b[], int offset, long value) {
    b[offset++] = (byte) (value >>> 56);
    b[offset++] = (byte) (value >>> 48);
    b[offset++] = (byte) (value >>> 40);
    b[offset++] = (byte) (value >>> 32);
    b[offset++] = (byte) (value >>> 24);
    b[offset++] = (byte) (value >>> 16);
    b[offset++] = (byte) (value >>> 8);
    b[offset] = (byte)value;
  }
public static void writeLong ( byte b [ ] , int offset , long value ) { b [ offset ++ ] = ( byte ) ( value > > > 56 ) ; b [ offset ++ ] = ( byte ) ( value > > > 48 ) ; b [ offset ++ ] = ( byte ) ( value > > > 40 ) ; b [ offset ++ ] = ( byte ) ( value > > > 32 ) ; b [ offset ++ ] = ( byte ) ( value > > > 24 ) ; b [ offset ++ ] = ( byte ) ( value > > > 16 ) ; b [ offset ++ ] = ( byte ) ( value > > > 8 ) ; b [ offset ] = ( byte ) value ; }
Serializes a long into a byte array at a specific offset in big-endian order

@param b byte array in which to write a long value.
@param offset offset within byte array to start writing.
@param value long to write to byte array.