public static byte[] doubleToBytes(double d){
  return longToBytes(Double.doubleToLongBits(d));
}

public static byte [ ] doubleToBytes ( double d ) { return longToBytes ( Double . doubleToLongBits ( d ) ) ; }
converts primitive double to byte array .
